* [PATCH] prlimit: use xalloc libs
@ 2011-12-20 11:58 Davidlohr Bueso
2011-12-20 12:14 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2011-12-20 11:58 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
From: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
sys-utils/prlimit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index c785909..8235eb1 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -452,7 +452,7 @@ static int parse_prlim(struct rlimit *lim, char *ops, size_t id)
static int add_prlim(char *ops, struct list_head *lims, size_t id)
{
- struct prlimit *lim = calloc(1, sizeof(*lim));
+ struct prlimit *lim = xcalloc(1, sizeof(*lim));
INIT_LIST_HEAD(&lim->lims);
lim->desc = &prlimit_desc[id];
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] prlimit: use xalloc libs
2011-12-20 11:58 [PATCH] prlimit: use xalloc libs Davidlohr Bueso
@ 2011-12-20 12:14 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2011-12-20 12:14 UTC (permalink / raw)
To: Davidlohr Bueso; +Cc: util-linux
On Tue, Dec 20, 2011 at 12:58:16PM +0100, Davidlohr Bueso wrote:
> + struct prlimit *lim = xcalloc(1, sizeof(*lim));
Applied, thanks.
It would be nice to have a script tools/checkxalloc.sh to check if
all code where we include "xalloc.h" use stuff from this file only.
Volunteers? :-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-20 12:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20 11:58 [PATCH] prlimit: use xalloc libs Davidlohr Bueso
2011-12-20 12:14 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).