From 55cc3615df9045684c70293dcfcbaa26371e46ad Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 16 Apr 2022 15:57:02 -0700 Subject: Stop casting arguments to free() This was needed for some pre-ANSI systems that declared free() to take 'char *' instead of 'void *' arguments, but hasn't been needed in decades. Signed-off-by: Alan Coopersmith --- makeform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makeform.c b/makeform.c index 0899771..a42905d 100644 --- a/makeform.c +++ b/makeform.c @@ -115,7 +115,7 @@ parse_name_and_exit_code_list (char *buttonlist, ButtonRecord **brptr) cp = malloc (len + 1); if (!cp) { - (void) free ((char *) br); + (void) free (br); return -1; } copy = cp; @@ -164,7 +164,7 @@ parse_name_and_exit_code_list (char *buttonlist, ButtonRecord **brptr) fprintf (stderr, "%s: internal error, found extra pairs (should be %d)\n", ProgramName, shouldfind); - (void) free ((char *) br); + (void) free (br); (void) free (copy); return -1; } @@ -183,7 +183,7 @@ parse_name_and_exit_code_list (char *buttonlist, ButtonRecord **brptr) if (npairs != shouldfind) { fprintf (stderr, "%s: internal error found %d instead of %d pairs\n", ProgramName, npairs, shouldfind); - (void) free ((char *) br); + (void) free (br); (void) free (copy); return -1; } -- cgit v1.2.3