git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: die early if we lack ocaml, ocamlfind or ocaml-xml-light
[libguestfs.git]
/
fish
/
tilde.c
diff --git
a/fish/tilde.c
b/fish/tilde.c
index
4085417
..
64b5b39
100644
(file)
--- a/
fish/tilde.c
+++ b/
fish/tilde.c
@@
-22,7
+22,6
@@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <ctype.h>
#include <assert.h>
#include <pwd.h>
#include <sys/types.h>
#include <assert.h>
#include <pwd.h>
#include <sys/types.h>
@@
-111,7
+110,7
@@
find_home_for_username (const char *username, size_t ulen)
setpwent ();
while ((pw = getpwent ()) != NULL) {
if (strlen (pw->pw_name) == ulen &&
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;
}
return pw->pw_dir;
}