Skip to contentSkip to conversation

utils/ffsb_fc.c: remove explicit NULL check before free

PATCH In review Maninder Singh 1 participant 1 message Jun 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 4/8 utils/ffsb_fc.c: remove explicit NULL check before free

No need of NULL check before free

---
 utils/ffsb-6.0-rc2/ffsb_fc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
utils/ffsb-6.0-rc2/ffsb_fc.c +1 -2
index 60b6313..c383a6a 100644
@@ -99,8 +99,7 @@ void fc_set_num_totalthreads(ffsb_config_t * fc, int num)
 
 void fc_set_callout(ffsb_config_t * fc, char *callout)
 {
-	if (fc->callout)
-		free(fc->callout);
+	free(fc->callout);
 	fc->callout = ffsb_strdup(callout);
 }
 
Signature · 7 lines
1.7.9.5

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