#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <ctype.h>
#include <assert.h>
#include <pwd.h>
#include <sys/types.h>
str = malloc (len);
if (str == NULL) {
perror ("malloc");
- exit (1);
+ exit (EXIT_FAILURE);
}
strcpy (str, home);
strcat (str, rest);
str = malloc (len);
if (str == NULL) {
perror ("malloc");
- exit (1);
+ exit (EXIT_FAILURE);
}
strcpy (str, home);
setpwent ();
while ((pw = getpwent ()) != NULL) {
if (strlen (pw->pw_name) == ulen &&
- strncmp (username, pw->pw_name, ulen) == 0)
+ STREQLEN (username, pw->pw_name, ulen))
return pw->pw_dir;
}