cut: simplify -fsanitize=leak pacification

* src/set-fields.c (reset_fields): Remove, as it’s not needed for
-fsanitize=leak even when ‘lint’ is defined.  All uses removed.
This commit is contained in:
Paul Eggert committed 2022-01-31 12:07:39 -08:00
1 parent 836617fa12
commit 22a0f9c32e
3 files changed
-14

No files matched your search

-2
View File
@@ -602,7 +602,5 @@ main (int argc, char **argv)
ok = false;
}
IF_LINT (reset_fields ());
return ok ? EXIT_SUCCESS : EXIT_FAILURE;
}
-9
View File
@@ -308,12 +308,3 @@ set_fields (char const *fieldstr, unsigned int options)
frp = xrealloc (frp, n_frp * sizeof (struct field_range_pair));
frp[n_frp - 1].lo = frp[n_frp - 1].hi = UINTMAX_MAX;
}
void
reset_fields (void)
{
n_frp = 0 ;
n_frp_allocated = 0;
free (frp);
frp = NULL;
}
-3
View File
@@ -41,7 +41,4 @@ enum
/* allocates and initializes the FRP array and N_FRP count */
extern void set_fields (char const *fieldstr, unsigned int options);
/* frees memory allocated by set_fields() */
extern void reset_fields (void);
#endif