diff options
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r-- | coreutils/cut.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c index 179854988..3bac151b2 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -241,9 +241,10 @@ int cut_main(int argc UNUSED_PARAM, char **argv) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | /* add the new list */ | 243 | /* add the new list */ |
244 | cut_lists = xrealloc(cut_lists, sizeof(struct cut_list) * (++nlists)); | 244 | cut_lists = xrealloc_vector(cut_lists, 4, nlists); |
245 | cut_lists[nlists-1].startpos = s; | 245 | cut_lists[nlists].startpos = s; |
246 | cut_lists[nlists-1].endpos = e; | 246 | cut_lists[nlists].endpos = e; |
247 | nlists++; | ||
247 | } | 248 | } |
248 | 249 | ||
249 | /* make sure we got some cut positions out of all that */ | 250 | /* make sure we got some cut positions out of all that */ |