diff options
-rw-r--r-- | common.c | 4 | ||||
-rw-r--r-- | scope.c | 2 | ||||
-rw-r--r-- | table11.c | 2 |
3 files changed, 5 insertions, 3 deletions
@@ -239,7 +239,9 @@ SetUpConnectionSocket( debug(4,(stderr, "Warning: Failed to establish listening connections on some transports\n")); } - ListenTransFds = (int *) malloc (ListenTransCount * sizeof (int)); + ListenTransFds = malloc (ListenTransCount * sizeof (int)); + if (ListenTransFds == NULL) + panic("Can't allocate memory for ListenTransFds"); for (i = 0; i < ListenTransCount; i++) { @@ -489,7 +489,7 @@ CMDBreak ( *minorname = ':'; /* restore string for error message */ return CMDSyntax; } - bp = (BP *) malloc (sizeof (BP)); + bp = malloc (sizeof (BP)); bp->number = ++breakPointNumber; bp->request = request; bp->minorop = minorop; @@ -147,7 +147,7 @@ CreateValueRec ( int i; bucket = &buckets[HASH(key)]; - value = (ValuePtr) malloc (sizeof (ValueRec) + size * sizeof (unsigned long)); + value = malloc (sizeof (ValueRec) + (size * sizeof (unsigned long))); if (!value) return; value->values = (unsigned long *) (value + 1); |