From 423c3955d97dc84986be08ed0074d8eb58c624ef Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Fri, 25 Apr 2014 17:38:08 -0400 Subject: * various: Assume ISO C89-compliant free() implementation. --- main.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 4659099..e5f7d38 100644 --- a/main.c +++ b/main.c @@ -996,8 +996,7 @@ find_and_set_default_shell (const char *token) batch_mode_shell = 1; #endif - if (atoken) - free (atoken); + free (atoken); return (sh_found); } @@ -2405,9 +2404,8 @@ main (int argc, char **argv, char **envp) db_level = orig_db_level; - /* Free the makefile mtimes (if we allocated any). */ - if (makefile_mtimes) - free (makefile_mtimes); + /* Free the makefile mtimes. */ + free (makefile_mtimes); } /* Set up 'MAKEFLAGS' again for the normal targets. */ @@ -2793,8 +2791,7 @@ decode_switches (int argc, const char **argv, int env) if (cs->type == string) { char **val = (char **)cs->value_ptr; - if (*val) - free (*val); + free (*val); *val = xstrdup (coptarg); break; } @@ -3365,11 +3362,8 @@ clean_jobserver (int status) sub-makes. Also reset job_slots since it will be put on the command line, not in MAKEFLAGS. */ job_slots = default_job_slots; - if (jobserver_fds) - { - free (jobserver_fds); - jobserver_fds = 0; - } + free (jobserver_fds); + jobserver_fds = 0; } } -- cgit v1.2.3