summaryrefslogtreecommitdiff
path: root/coreutils/od_bloaty.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/od_bloaty.c')
-rw-r--r--coreutils/od_bloaty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index a2eaf11..eb45798 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -735,9 +735,9 @@ decode_format_string(const char *s)
assert(s != next);
s = next;
+ spec = xrealloc_vector(spec, 4, n_specs);
+ memcpy(&spec[n_specs], &tspec, sizeof(spec[0]));
n_specs++;
- spec = xrealloc(spec, n_specs * sizeof(*spec));
- memcpy(&spec[n_specs-1], &tspec, sizeof *spec);
}
}