* lib/groupmem.c, lib/pwmem.c, lib/shadowmem.c: Added brackets and

parenthesis.
	* lib/groupmem.c, lib/pwmem.c, lib/shadowmem.c: Avoid assignments
	in comparisons.
This commit is contained in:
nekral-guest
2008-08-30 18:32:19 +00:00
parent cf4aea18b4
commit 7109072b8f
4 changed files with 51 additions and 14 deletions

View File

@ -45,13 +45,20 @@ struct spwd *__spw_dup (const struct spwd *spent)
{
struct spwd *sp;
if (!(sp = (struct spwd *) malloc (sizeof *sp)))
sp = (struct spwd *) malloc (sizeof *sp);
if (NULL == sp) {
return NULL;
}
*sp = *spent;
if (!(sp->sp_namp = strdup (spent->sp_namp)))
sp->sp_namp = strdup (spent->sp_namp);
if (NULL == sp->sp_namp) {
return NULL;
if (!(sp->sp_pwdp = strdup (spent->sp_pwdp)))
}
sp->sp_pwdp = strdup (spent->sp_pwdp);
if (NULL == sp->sp_pwdp) {
return NULL;
}
return sp;
}