tools:proc/alloc.c: remove explicit NULL check before free
PATCH 2/8 tools:proc/alloc.c: remove explicit NULL check before free
No need of NULL check before free
Signed-off-by Maninder Singh <[email protected]>
Signed-off-by Akhilesh Kumar <[email protected]>
--- tools/top-LTP/proc/alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/top-LTP/proc/alloc.c +1 -2
@@ -12,8 +12,7 @@void *xcalloc (void *pointer,int size) {void *ret; -if (pointer) -free (pointer); +free (pointer);if (!(ret =calloc (1 , size))) {fprintf (stderr,"xcalloc: allocation error, size = %d\n" , size);exit (1 );
Signature · 6 lines
1.7.9.5 ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list