aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorGravatar Rob Landley <rob@landley.net>2006-03-01 16:39:45 +0000
committerGravatar Rob Landley <rob@landley.net>2006-03-01 16:39:45 +0000
commite7c43b66d74ee9902a6732122788a7a16bcfbf18 (patch)
treeebb8583e9e1265588592614c0b4878daded44125 /editors
parent93f2286e6e59dab5eed14b5912a79254031c5a62 (diff)
downloadbusybox-e7c43b66d74ee9902a6732122788a7a16bcfbf18.tar.gz
busybox-e7c43b66d74ee9902a6732122788a7a16bcfbf18.tar.bz2
Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
from before "if(x) free(x)".
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/editors/sed.c b/editors/sed.c
index b08eae4dc..f58f442e8 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -556,10 +556,8 @@ static void add_cmd(char *cmdstr)
}
/* If we glued multiple lines together, free the memory. */
- if(add_cmd_line) {
- free(add_cmd_line);
- add_cmd_line=NULL;
- }
+ free(add_cmd_line);
+ add_cmd_line=NULL;
}
/* Append to a string, reallocating memory as necessary. */