X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmgetgroups.c;h=ebe9daca3be2814da459a9b2ff56a00d54226093;hb=3d25ec76d62050ec9a2f0cf861b66122132f1539;hp=5c79915bcc314e6adab6ec0165503c2c0be88118;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/lib/mgetgroups.c b/lib/mgetgroups.c index 5c79915bc..ebe9daca3 100644 --- a/lib/mgetgroups.c +++ b/lib/mgetgroups.c @@ -1,6 +1,6 @@ /* mgetgroups.c -- return a list of the groups a user or current process is in - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ #endif #include "getugroups.h" -#include "xalloc.h" +#include "xalloc-oversized.h" static gid_t * realloc_groupbuf (gid_t *g, size_t num) @@ -193,14 +193,3 @@ mgetgroups (char const *username, gid_t gid, gid_t **groups) return ng; } - -/* Like mgetgroups, but call xalloc_die on allocation failure. */ - -int -xgetgroups (char const *username, gid_t gid, gid_t **groups) -{ - int result = mgetgroups (username, gid, groups); - if (result == -1 && errno == ENOMEM) - xalloc_die (); - return result; -}