Skip to contentSkip to conversation

lib/random_range.c: remove unnecessary malloc type cast

PATCH In review Maninder Singh 1 participant 1 message Jun 15, 2015 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 7/7 lib/random_range.c: remove unnecessary malloc type cast

---
 lib/random_range.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/random_range.c +1 -1
index 1d88dd2..510a4a1 100644
@@ -121,7 +121,7 @@ int parse_ranges(char *str, int defmin, int defmax, int defmult,
 	}
 
 	tmpstr = strdup(str);
-	ranges = (struct range *)malloc((ncommas + 1) * sizeof(struct range));
+	ranges = malloc((ncommas + 1) * sizeof(struct range));
 	rp = ranges;
 
 	tok = strtok(tmpstr, ",");
Signature · 6 lines
1.7.9.5
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list