diff --git a/builtin-blame.c b/builtin-blame.c
index 1cf254dcca7f814694741ce5ea1ec2b88a26706f..bfd562d7d2b897ad4ab3d35dda33701e315b7d5d 100644 (file)
--- a/builtin-blame.c
+++ b/builtin-blame.c
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);
}
}
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);
}
/*
* bottom commits we would reach while traversing as
* uninteresting.
*/
- prepare_revision_walk(&revs);
+ if (prepare_revision_walk(&revs))
+ die("revision walk setup failed");
if (is_null_sha1(sb.final->object.sha1)) {
char *buf;