]> diplodocus.org Git - nmh/commitdiff
Use HasPrefix() instead of strncmp().
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 23 Oct 2016 22:02:49 +0000 (23:02 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 24 Oct 2016 09:18:56 +0000 (10:18 +0100)
uip/aliasbr.c

index c7ea3a3..069e454 100644 (file)
@@ -182,7 +182,7 @@ alias (char *file)
     FILE *fp;
 
     if (*file != '/'
-           && (strncmp (file, "./", 2) && strncmp (file, "../", 3)))
+            && !HasPrefix(file, "./") && !HasPrefix(file, "../"))
        file = etcpath (file);
     if ((fp = fopen (file, "r")) == NULL) {
        akerrst = file;