]> sjero.net Git - wget/blobdiff - src/utils.c
NEWS: cite --start-pos
[wget] / src / utils.c
index f87853dc5489b9e3748184793fc6d3a9f0c8d5ed..4354668c187e3f522b507846b2d5330dd2b169d4 100644 (file)
@@ -703,7 +703,7 @@ unique_create (const char *name, bool binary, char **opened_name)
       xfree (uname);
       uname = unique_name (name, false);
     }
-  if (opened_name && fp != NULL)
+  if (opened_name)
     {
       if (fp)
         *opened_name = uname;
@@ -1024,9 +1024,9 @@ match_tail (const char *string, const char *tail, bool fold_case)
     return false;  /* tail is longer than string.  */
 
   if (!fold_case)
-    return strcmp (string + pos, tail);
+    return !strcmp (string + pos, tail);
   else
-    return strcasecmp (string + pos, tail);
+    return !strcasecmp (string + pos, tail);
 }
 
 /* Checks whether string S matches each element of ACCEPTS.  A list