change strncasecmp() == 0 to STRCASEEQLEN()
[libguestfs.git] / fish / fish.c
index 869366b..3f534de 100644 (file)
@@ -762,7 +762,7 @@ cmdline (char *argv[], int optind, int argc)
   params = &argv[optind];
 
   /* Search for end of command list or ":" ... */
-  while (optind < argc && strcmp (argv[optind], ":") != 0)
+  while (optind < argc && STRNEQ (argv[optind], ":"))
     optind++;
 
   if (optind == argc) {
@@ -1340,7 +1340,7 @@ resolve_win_path (const char *path)
   char *ret;
   size_t i;
 
-  if (strncasecmp (path, "win:", 4) != 0) {
+  if (STRCASENEQLEN (path, "win:", 4)) {
     ret = strdup (path);
     if (ret == NULL)
       perror ("strdup");
@@ -1350,7 +1350,7 @@ resolve_win_path (const char *path)
   path += 4;
 
   /* Drop drive letter, if it's "C:". */
-  if (strncasecmp (path, "c:", 2) == 0)
+  if (STRCASEEQLEN (path, "c:", 2))
     path += 2;
 
   if (!*path) {