silence compiler warnings
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
This commit is contained in:
parent
5a6ddf3b57
commit
9f7f3b013e
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
static bool path_exists(const char *p)
|
static bool path_exists(const char *p)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
return stat(p, &sb) == 0;
|
return stat(p, &sb) == 0;
|
||||||
|
@ -166,7 +166,7 @@ extern struct group *prefix_getgrnam(const char *name)
|
|||||||
fg = fopen(group_db_file, "rt");
|
fg = fopen(group_db_file, "rt");
|
||||||
if(!fg)
|
if(!fg)
|
||||||
return NULL;
|
return NULL;
|
||||||
while(grp = fgetgrent(fg)) {
|
while((grp = fgetgrent(fg)) != NULL) {
|
||||||
if(!strcmp(name, grp->gr_name))
|
if(!strcmp(name, grp->gr_name))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ extern struct group *prefix_getgrgid(gid_t gid)
|
|||||||
fg = fopen(group_db_file, "rt");
|
fg = fopen(group_db_file, "rt");
|
||||||
if(!fg)
|
if(!fg)
|
||||||
return NULL;
|
return NULL;
|
||||||
while(grp = fgetgrent(fg)) {
|
while((grp = fgetgrent(fg)) != NULL) {
|
||||||
if(gid == grp->gr_gid)
|
if(gid == grp->gr_gid)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ extern struct passwd *prefix_getpwuid(uid_t uid)
|
|||||||
fg = fopen(passwd_db_file, "rt");
|
fg = fopen(passwd_db_file, "rt");
|
||||||
if(!fg)
|
if(!fg)
|
||||||
return NULL;
|
return NULL;
|
||||||
while(pwd = fgetpwent(fg)) {
|
while((pwd = fgetpwent(fg)) != NULL) {
|
||||||
if(uid == pwd->pw_uid)
|
if(uid == pwd->pw_uid)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ extern struct passwd *prefix_getpwnam(const char* name)
|
|||||||
fg = fopen(passwd_db_file, "rt");
|
fg = fopen(passwd_db_file, "rt");
|
||||||
if(!fg)
|
if(!fg)
|
||||||
return NULL;
|
return NULL;
|
||||||
while(pwd = fgetpwent(fg)) {
|
while((pwd = fgetpwent(fg)) != NULL) {
|
||||||
if(!strcmp(name, pwd->pw_name))
|
if(!strcmp(name, pwd->pw_name))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -246,7 +246,7 @@ extern struct spwd *prefix_getspnam(const char* name)
|
|||||||
fg = fopen(spw_db_file, "rt");
|
fg = fopen(spw_db_file, "rt");
|
||||||
if(!fg)
|
if(!fg)
|
||||||
return NULL;
|
return NULL;
|
||||||
while(sp = fgetspent(fg)) {
|
while((sp = fgetspent(fg)) != NULL) {
|
||||||
if(!strcmp(name, sp->sp_namp))
|
if(!strcmp(name, sp->sp_namp))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user