Fix these cppcheck warnings:
addrtoname.c:1288:11: warning: Checking if unsigned expression 'num'
is less than zero. [unsignedLessThanZero]
if (num <= 0) {
^
addrtoname.c:1308:11: warning: Checking if unsigned expression 'num'
is less than zero. [unsignedLessThanZero]
if (num <= 0) {
^
static struct hnamemem *ptr = NULL;
static u_int num = 0;
- if (num <= 0) {
+ if (num == 0) {
num = 64;
ptr = (struct hnamemem *)calloc(num, sizeof (*ptr));
if (ptr == NULL)
static struct h6namemem *ptr = NULL;
static u_int num = 0;
- if (num <= 0) {
+ if (num == 0) {
num = 64;
ptr = (struct h6namemem *)calloc(num, sizeof (*ptr));
if (ptr == NULL)