From: Jim Meyering Date: Sat, 26 Sep 2009 17:40:54 +0000 (+0200) Subject: maint: remove useless casts to avoid "make syntax-check" failures X-Git-Tag: v1.3.13~18 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=cf608a221f703cf79b58d35495ab6c2fe40cc9a2;p=debian%2Fgzip maint: remove useless casts to avoid "make syntax-check" failures * gzip.c (do_exit): Remove anachronistic cast. * inflate.c (huft_free): Likewise. * util.c (add_envopt): Likewise. * vms/vms.c (vms_expand_args): Likewise. --- diff --git a/gzip.c b/gzip.c index 71e0674..6f437e0 100644 --- a/gzip.c +++ b/gzip.c @@ -1830,7 +1830,7 @@ local void do_exit(exitcode) if (in_exit) exit(exitcode); in_exit = 1; if (env != NULL) free(env), env = NULL; - if (args != NULL) free((char*)args), args = NULL; + if (args != NULL) free(args), args = NULL; FREE(inbuf); FREE(outbuf); FREE(d_buf); diff --git a/inflate.c b/inflate.c index 71ce8ef..928326d 100644 --- a/inflate.c +++ b/inflate.c @@ -512,7 +512,7 @@ struct huft *t; /* table to free */ while (p != (struct huft *)NULL) { q = (--p)->v.t; - free((char*)p); + free(p); p = q; } return 0; diff --git a/util.c b/util.c index f375bf8..1272f56 100644 --- a/util.c +++ b/util.c @@ -392,7 +392,7 @@ char *add_envopt(argcp, argvp, env) /* Allocate the new argv array, with an extra element just in case * the original arg list did not end with a NULL. */ - nargv = (char **) xcalloc (*argcp + 1, sizeof (char *)); + nargv = xcalloc (*argcp + 1, sizeof (char *)); oargv = *argvp; *argvp = nargv; diff --git a/vms/vms.c b/vms/vms.c index 51b891a..c9276ed 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -26,7 +26,7 @@ vms_expand_args(old_argc, argv) int context, status; char buf[255], *p; - vms_argv = (char**)xmalloc((max_files+1)*sizeof(char*)); + vms_argv = xmalloc((max_files+1)*sizeof(char*)); vms_argv[new_argc++] = **argv; @@ -46,14 +46,14 @@ vms_expand_args(old_argc, argv) vms_argv[new_argc++] = argv[0][i]; } } else { - p = (char*)xmalloc(strlen(buf)+1); + p = xmalloc(strlen(buf)+1); strcpy(p, buf); if (new_argc < max_files) { vms_argv[new_argc++] = p; } while (find_file_c(argv[0][i], buf, sizeof(buf), &context) & 1 == 1) { - p = (char*)xmalloc(strlen(buf)+1); + p = xmalloc(strlen(buf)+1); strcpy(p, buf); if (new_argc < max_files) { vms_argv[new_argc++] = p;