prlimit: use xalloc libs
PATCH 1/1 prlimit: use xalloc libs
From: Davidlohr Bueso <[email protected]>
Signed-off-by Davidlohr Bueso <[email protected]>
--- sys-utils/prlimit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sys-utils/prlimit.c +1 -1
@@ -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];
Signature · 1 line
1.7.4.1
sys-utils/prlimit.c static int parse_prlim(struct rlimit *lim, char *ops, size_t id) · line 455
Quoted 1 line · Davidlohr Bueso
sys-utils/prlimit.c +1
-0+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
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com