summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-16 15:58:42 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-16 15:58:42 -0700
commita2d2c371a11302d8df204527119c6ec91cc9e898 (patch)
tree2ed6ce9c842d53f9f74aee2ae4fb6a5394563953
parent55cc3615df9045684c70293dcfcbaa26371e46ad (diff)
Stop casting function return values to void
This was used to make lint stop warning that you weren't checking the return value. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--makeform.c10
-rw-r--r--readfile.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/makeform.c b/makeform.c
index a42905d..7aa8fa5 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 (br);
+ free (br);
return -1;
}
copy = cp;
@@ -164,8 +164,8 @@ 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 (br);
- (void) free (copy);
+ free (br);
+ free (copy);
return -1;
}
@@ -183,8 +183,8 @@ 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 (br);
- (void) free (copy);
+ free (br);
+ free (copy);
return -1;
}
diff --git a/readfile.c b/readfile.c
index 122020f..3e752e7 100644
--- a/readfile.c
+++ b/readfile.c
@@ -63,21 +63,21 @@ get_data_from_file (char *filename, int *len_return)
fp = fopen (filename, "r");
if (!fp) {
perror(filename);
- (void) free (cp);
+ free (cp);
return NULL;
}
count = fread (cp, 1, statbuf.st_size, fp);
if (count == 0 && statbuf.st_size != 0) {
perror(filename);
- (void) free (cp);
- (void) fclose (fp);
+ free (cp);
+ fclose (fp);
return NULL;
}
cp[count] = '\0'; /* since we allocated one extra */
*len_return = count;
- (void) fclose (fp);
+ fclose (fp);
return cp;
}