build: die early if we lack ocaml, ocamlfind or ocaml-xml-light
[libguestfs.git] / fish / tilde.c
index 4085417..64b5b39 100644 (file)
@@ -22,7 +22,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <ctype.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 &&
-        strncmp (username, pw->pw_name, ulen) == 0)
+        STREQLEN (username, pw->pw_name, ulen))
       return pw->pw_dir;
   }