fmd_serd_eng_t *sgp;
sgp = malloc(sizeof (fmd_serd_eng_t));
+ if (sgp == NULL) {
+ perror("malloc");
+ exit(EXIT_FAILURE);
+ }
memset(sgp, 0, sizeof (fmd_serd_eng_t));
sgp->sg_name = strdup(name);
+ if (sgp->sg_name == NULL) {
+ perror("strdup");
+ exit(EXIT_FAILURE);
+ }
+
sgp->sg_flags = FMD_SERD_DIRTY;
sgp->sg_n = n;
sgp->sg_t = t;
shp->sh_hashlen = FMD_STR_BUCKETS;
shp->sh_hash = calloc(shp->sh_hashlen, sizeof (void *));
shp->sh_count = 0;
+
+ if (shp->sh_hash == NULL) {
+ perror("calloc");
+ exit(EXIT_FAILURE);
+ }
+
}
void
fmd_serd_eng_discard(sgp, list_tail(&sgp->sg_list));
sep = malloc(sizeof (fmd_serd_elem_t));
+ if (sep == NULL) {
+ perror("malloc");
+ exit(EXIT_FAILURE);
+ }
sep->se_hrt = hrt;
list_insert_head(&sgp->sg_list, sep);
}
void
-fmd_serd_eng_gc(fmd_serd_eng_t *sgp)
+fmd_serd_eng_gc(fmd_serd_eng_t *sgp, void *arg)
{
+ (void) arg;
fmd_serd_elem_t *sep, *nep;
hrtime_t hrt;