summaryrefslogtreecommitdiff
path: root/usr/src/lib/libnsl/key/publickey.c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2017-11-28 13:31:39 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2017-11-28 13:31:39 +0000
commitd34c3f35352d3d27e8f1c35be3da4cb32b1486db (patch)
tree8982518d7b4721262697807b6f47acd134c813d6 /usr/src/lib/libnsl/key/publickey.c
parent2ba2c786fc7f279dff78bdfdb8d6f8c63b445314 (diff)
parenta71e11eee4676204c7609c4c9703cc98fbf4669d (diff)
downloadillumos-joyent-d34c3f35352d3d27e8f1c35be3da4cb32b1486db.tar.gz
[illumos-gate merge]
commit a71e11eee4676204c7609c4c9703cc98fbf4669d 8855 libnsl: variable 'p' set but not used commit 10fb0c97e3ab2d7cb9ece84c177e49668137d68f 8851 libast: parameter/variable set but not used commit 1d2945e8b51a96806bfb1bc3cb0b1cf6732925e4 8847 libadm: variable 'daynum' set but not used commit df9cdf1096bbdb93cb9c2bb9d089a7804dc1d809 8845 libima: variable set but not used commit d87d03b4c0f66bf125e607ef8b0d9c5481040d20 8842 libmail: right-hand operand of comma expression has no effect commit 38fc59d1a32bf4ebde45c04f9e8a896ccc3db337 8840 libtnfctl: variable 'ret_pp' set but not used commit 100ea781a0fa9beb2f6704a2e6f207a83aa2a853 8837 libsmedia: variable 'retformat' set but not used commit 3c0e18f37537a4cc1475e6f715030b5457141261 8836 libsum: 'id' defined but not used commit 8659a363582025a151043e8e5450174179fd637b 8834 libpp: 'id' defined but not used commit a9ecb23444fb4086c2f46388f05df21dca317b58 8832 libdll: 'id' defined but not used commit bb4d45692c48b2f803f7ec1f690be050a0b2bf05 8831 mpapi: variable 'status' set but not used commit c532a89174aae7a12b4a8cef1517e723d26ff477 8829 librdc: variable 'trc' set but not used
Diffstat (limited to 'usr/src/lib/libnsl/key/publickey.c')
-rw-r--r--usr/src/lib/libnsl/key/publickey.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/usr/src/lib/libnsl/key/publickey.c b/usr/src/lib/libnsl/key/publickey.c
index 7796883fd0..c08233253f 100644
--- a/usr/src/lib/libnsl/key/publickey.c
+++ b/usr/src/lib/libnsl/key/publickey.c
@@ -116,8 +116,8 @@ static DEFINE_NSS_DB_ROOT(db_root);
*/
/* ARGSUSED */
static int
-str2key(const char *instr, int lenstr,
- void *ent, char *buffer, int buflen) {
+str2key(const char *instr, int lenstr, void *ent, char *buffer, int buflen)
+{
if (lenstr + 1 > buflen)
return (NSS_STR_PARSE_ERANGE);
/*
@@ -342,20 +342,19 @@ getsecretkey(const char *netname, char *skey, const char *passwd)
*/
static int
extract_secret_g(
- char *raw, /* in */
- char *private, /* out */
- int prilen, /* in */
- char *passwd, /* in */
- char *netname, /* in */
- keylen_t keylen, /* in */
- algtype_t algtype) /* in */
-
+ char *raw, /* in */
+ char *private, /* out */
+ int prilen, /* in */
+ char *passwd, /* in */
+ char *netname, /* in */
+ keylen_t keylen, /* in */
+ algtype_t algtype) /* in */
{
char *buf = malloc(strlen(raw) + 1); /* private tmp buf */
char *p;
if (!buf || !passwd || !raw || !private || !prilen ||
- !VALID_KEYALG(keylen, algtype)) {
+ !VALID_KEYALG(keylen, algtype)) {
if (private)
*private = NUL;
if (buf)
@@ -535,8 +534,10 @@ netname2hashname(
void
__getpublickey_flush_g(const char *netname, keylen_t keylen, algtype_t algtype)
{
- char *p, hashname[MAXNETNAMELEN+1];
- p = netname2hashname(netname, hashname, MAXNETNAMELEN, keylen, algtype);
+ char hashname[MAXNETNAMELEN+1];
+
+ (void) netname2hashname(netname, hashname, MAXNETNAMELEN, keylen,
+ algtype);
}
/*
@@ -544,11 +545,11 @@ __getpublickey_flush_g(const char *netname, keylen_t keylen, algtype_t algtype)
*/
int
__getpublickey_cached_g(const char netname[], /* in */
- keylen_t keylen, /* in */
- algtype_t algtype, /* in */
- char *pkey, /* out */
- size_t pkeylen, /* in */
- int *from_cache) /* in/out */
+ keylen_t keylen, /* in */
+ algtype_t algtype, /* in */
+ char *pkey, /* out */
+ size_t pkeylen, /* in */
+ int *from_cache) /* in/out */
{
int needfree = 1, res, err;
struct __nsw_switchconfig *conf;