diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2014-10-18 03:13:05 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2014-10-18 03:13:05 +0000 |
commit | a0b8318edb676d4f06943c1357a9e69f754cb349 (patch) | |
tree | 6f8b7a148e8ab342689bb3b038261634aadd652e /regress | |
parent | a9ffbd0fb5bc2b5f3a02edebc476bac313e53fff (diff) |
Simple malloc() to reallocarray().
ok deraadt@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/ffs/fstest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/ffs/fstest.c b/regress/sys/ffs/fstest.c index acdc9fc8f3a..8b53ca9248b 100644 --- a/regress/sys/ffs/fstest.c +++ b/regress/sys/ffs/fstest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstest.c,v 1.3 2013/08/05 07:17:45 guenther Exp $ */ +/* $OpenBSD: fstest.c,v 1.4 2014/10/18 03:13:04 doug Exp $ */ /* * Copyright (c) 2006-2007 Pawel Jakub Dawidek <pjd@FreeBSD.org> @@ -426,7 +426,7 @@ set_gids(char *gids) ngroups = sysconf(_SC_NGROUPS_MAX); assert(ngroups > 0); - gidset = malloc(sizeof(*gidset) * ngroups); + gidset = reallocarray(NULL, ngroups, sizeof(*gidset)); assert(gidset != NULL); for (i = 0, g = strtok(gids, ","); g != NULL; g = strtok(NULL, ","), i++) { |