From 46e58be9cc872aba55dbe89eef9261675722c323 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 1 Aug 2012 14:33:39 +0200 Subject: build: remove unnecessary if-before-free * src/util.c (update_sha1): Remove unnecessary if-before-free, to avoid "make syntax-check" failure. --- src/util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util.c b/src/util.c index d392ffe..9177fda 100644 --- a/src/util.c +++ b/src/util.c @@ -152,8 +152,7 @@ update_sha1 (struct stat const *st, char const *sha1) if (! p) p = __insert_file_id (st, UNKNOWN); else - if (p->sha1) - free (p->sha1); + free (p->sha1); p->sha1 = sha1 ? xstrdup (sha1) : 0; } -- cgit v1.2.1