Skip to content

remove explicit NULL check before free

Maninder Singh ltp 1 version In review

Get series with b4
b4 am 993022606.810141433919692343.JavaMail.weblogic@epmlwas05b

Versions newest first

  1. v1 Latest7 of 8 patches 1 replyIn review

7 of 8 patches are in this archive. The cover letter announces 8.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8tools:proc/ksym.c: remove explicit NULL check before freetools/top-LTP/proc/ksym.c+1 -20 replies
2/8tools:proc/alloc.c: remove explicit NULL check before freetools/top-LTP/proc/alloc.c+1 -20 replies
3/8tools:proc/readproc.c: remove explicit NULL check before freetools/top-LTP/proc/readproc.c+2 -40 replies
4/8utils/ffsb_fc.c: remove explicit NULL check before freeutils/ffsb-6.0-rc2/ffsb_fc.c+1 -20 replies
5/8network/ns-igmp_querier.c: remove explicit NULL check before freetestcases/network/stress/ns-tools/ns-igmp_querier.c+2 -40 replies
6/8network/ns-mcast_receiver.c: remove explicit NULL check before freetestcases/network/stress/ns-tools/ns-mcast_receiver.c+3 -60 replies
7/8kernel/aio-stress.c: rempve explicit NULL check before freetestcases/kernel/io/ltp-aiodio/aio-stress.c+3 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [LTP] [Patch 0/8] remove explicit NULL check before free

Hi,

Following patch set remove explicit NULL check before free(*ptr), because in free If ptr is NULL, no operation is performed. So no need of NULL check before free.

patches created with below coccinelle patch:-

@@
expression E;
@@
- if (E)
- free(E);
+ free(E);

Thanks
Maninder Singh
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list