Skip to contentSkip to conversation

pan/symbol.c: remove unnecessary malloc type cast

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

lore
Share & tools
lore
#0 lore raw

PATCH 6/7 pan/symbol.c: remove unnecessary malloc type cast

---
 pan/symbol.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
pan/symbol.c +2 -2
index ca9964a..3752114 100644
@@ -86,7 +86,7 @@ SYM newsym(void)
 {
 	SYM h;
 
-	if ((h = (SYM) malloc(sizeof(struct symh))) == NULL) {
+	if ((h = malloc(sizeof(struct symh))) == NULL) {
 		sym_error = "sym header malloc failed!";
 		return (NULL);
 	}
@@ -101,7 +101,7 @@ static struct sym *mknode(struct sym *next, char *key, void *data)
 {
 	struct sym *n;
 
-	if ((n = (struct sym *)malloc(sizeof(struct sym))) == NULL) {
+	if ((n = malloc(sizeof(struct sym))) == NULL) {
 		sym_error = "sym node malloc failed!";
 		return (NULL);
 	}
Signature · 6 lines
1.7.9.5
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list