maint/sc: remove useless if-before-free tests

* src/diff.c (compare-files): Remove useless if stmts.
* src/dir.c (diff_dirs): Likewise.
* cfg.mk (local-checks-to-skip): Remove sc_avoid_if_before_free.
This commit is contained in:
Jim Meyering 2009-11-11 19:36:10 +01:00
parent 8075840b39
commit cb0791d7a4
3 changed files with 4 additions and 9 deletions

1
cfg.mk
View File

@ -32,7 +32,6 @@ gpg_key_ID = B9AB9A16
# Tests not to run as part of "make distcheck".
local-checks-to-skip = \
sc_avoid_if_before_free \
sc_cast_of_x_alloc_return_value \
sc_error_message_period \
sc_error_message_uppercase \

View File

@ -1314,10 +1314,8 @@ compare_files (struct comparison const *parent,
pfatal_with_name (_("standard output"));
}
if (free0)
free (free0);
if (free1)
free (free1);
free (free0);
free (free1);
return status;
}

View File

@ -263,10 +263,8 @@ diff_dirs (struct comparison const *cmp,
for (i = 0; i < 2; i++)
{
if (dirdata[i].names)
free (dirdata[i].names);
if (dirdata[i].data)
free (dirdata[i].data);
free (dirdata[i].names);
free (dirdata[i].data);
}
return val;