Return to sensors.c CVS log | Up to [local] / src / usr.bin / systat |
version 1.28, 2014/07/09 08:04:45 | version 1.29, 2014/10/08 04:10:04 | ||
---|---|---|---|
|
|
||
size_t a = num_alloc + ADD_ALLOC; | size_t a = num_alloc + ADD_ALLOC; | ||
if (a < num_alloc) | if (a < num_alloc) | ||
return NULL; | return NULL; | ||
s = realloc(sensors, a * sizeof(struct sensinfo)); | s = reallocarray(sensors, a, sizeof(struct sensinfo)); | ||
if (s == NULL) | if (s == NULL) | ||
return NULL; | return NULL; | ||
sensors = s; | sensors = s; |