Code

Merge branch 'maint'
[git.git] / builtin-blame.c
index 2d4a3e150081e350ebe28fd3e677708a94c1f548..bfd562d7d2b897ad4ab3d35dda33701e315b7d5d 100644 (file)
@@ -123,8 +123,7 @@ static inline struct origin *origin_incref(struct origin *o)
 static void origin_decref(struct origin *o)
 {
        if (o && --o->refcnt <= 0) {
-               if (o->file.ptr)
-                       free(o->file.ptr);
+               free(o->file.ptr);
                free(o);
        }
 }
@@ -1894,9 +1893,7 @@ static unsigned parse_score(const char *arg)
 
 static const char *add_prefix(const char *prefix, const char *path)
 {
-       if (!prefix || !prefix[0])
-               return path;
-       return prefix_path(prefix, strlen(prefix), path);
+       return prefix_path(prefix, prefix ? strlen(prefix) : 0, path);
 }
 
 /*