]> diplodocus.org Git - nmh/commitdiff
Don't `else' after return. Simplify control flow.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 20 Oct 2016 22:27:42 +0000 (23:27 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 20 Oct 2016 22:38:54 +0000 (23:38 +0100)
uip/mkstemp.c

index 259c3ed..f4215c0 100644 (file)
@@ -109,10 +109,10 @@ build_template(const char *directory, const char *prefix, const char *suffix) {
         template[len-1] = '\0';
 
         return template;
-    } else {
-        perror("malloc");
-        return NULL;
     }
+
+    perror("malloc");
+    return NULL;
 }