* libmisc/utmp.c: Avoid implicit conversion of pointers / chars to

booleans.
	* libmisc/utmp.c: Add brackets and parenthesis.
	* libmisc/utmp.c: Exit with the EXIT_FAILURE status code in case
	of failure.
	* libmisc/utmp.c: Avoid assignments in comparisons.
	* lib/prototypes.h, libmisc/utmp.c: Change setutmp()'s prototype
	to return an int because pututline() and pututxline() may fail.
This commit is contained in:
nekral-guest
2008-06-17 21:13:30 +00:00
parent 9320075030
commit 5f9226b14b
3 changed files with 85 additions and 44 deletions

View File

@@ -262,7 +262,7 @@ extern int set_filesize_limit (int blocks);
/* utmp.c */
extern void checkutmp (bool picky);
extern void setutmp (const char *, const char *, const char *);
extern int setutmp (const char *, const char *, const char *);
/* valid.c */
extern bool valid (const char *, const struct passwd *);