X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fmgetgroups.c;h=e0aa250ca44daf5bfa9eb95ddc3c4e0619a7fead;hb=bf552416ee94157bd9aa4045b1622234fcf28e91;hp=0f853d6f8b2c1a56aab1cd6140e5c79402f568ad;hpb=51d5e813e9ee6cf23af6c3e96082dc6ecd46d194;p=gnulib.git diff --git a/lib/mgetgroups.c b/lib/mgetgroups.c index 0f853d6f8..e0aa250ca 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-2009 Free Software Foundation, Inc. + Copyright (C) 2007-2011 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; -}