]> diplodocus.org Git - nmh/commitdiff
path.c: Remove path()'s test for expath() returning NULL.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 11 Sep 2017 17:25:20 +0000 (18:25 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 11 Sep 2017 17:25:20 +0000 (18:25 +0100)
All paths out of expath() have it calling mh_xstrdup().

sbr/path.c

index 28d0e77..ecd2eb8 100644 (file)
@@ -34,9 +34,6 @@ path(char *name, int flag)
     char *p, *last;
 
     p = expath(name, flag);
     char *p, *last;
 
     p = expath(name, flag);
-    if (!p)
-        return NULL;
-
     last = p + strlen(p) - 1;
     if (last > p && *last == '/')
        *last = '\0';
     last = p + strlen(p) - 1;
     if (last > p && *last == '/')
        *last = '\0';