diff options
author | Jim Meyering <meyering@redhat.com> | 2012-08-01 14:33:39 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-08-01 15:05:42 +0200 |
commit | 46e58be9cc872aba55dbe89eef9261675722c323 (patch) | |
tree | 15804bacf2b199c36920c0881ffe1cdd1f01274c | |
parent | 1118f832efe3920ffe9b57cdd8c0af1ac9a76993 (diff) | |
download | patch-46e58be9cc872aba55dbe89eef9261675722c323.tar.gz |
build: remove unnecessary if-before-free
* src/util.c (update_sha1): Remove unnecessary if-before-free,
to avoid "make syntax-check" failure.
-rw-r--r-- | src/util.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; } |