if ((myname = getlogin()) == NULL) {
struct passwd *pp;
- if ((pp = getpwuid (getuid())) != NULL)
+ if ((pp = getpwuid(getuid())) != NULL)
myname = pp->pw_name;
}
printf("Name (%s:%s): ", host, myname);
}
*aname = mh_xmalloc((size_t) strlen(myname) + 1);
- strcpy (*aname, myname);
+ strcpy(*aname, myname);
}
if (!*apass) {
}
*apass = mh_xmalloc((size_t) strlen(mypass) + 1);
- strcpy (*apass, mypass);
+ strcpy(*apass, mypass);
}
}
if (tokval[0] == 0)
return (0);
for (t = toktabs; t->tokstr; t++)
- if (!strcmp(t->tokstr, tokval))
+ if (strcmp(t->tokstr, tokval)==0)
return (t->tval);
return (ID);
}