IPs* ips = calloc(MAXIPS, sizeof(*ips));
for (i=0;i<MAXIPS;i++)
{
if ((ips+i)==NULL)
{
printf("not this time\n");
// Will never execute
// Unless you meant *(ips+i) == NULL
// Or also ips[i] == NULL
}
else
{
if ( (rc<=destr) || (rc<=0.1) )
{
(ips+i)=NULL;
// You meant *(ips+i) = NULL; ?
// Or also ips[i] = NULL; ?
}
}
}
But you seem to need to check what that pointer points to, so you need to dereference it. The two ways you can do that are: *(ips + i) or ips[i]. They are equivalent, but the index form is more descriptive in my view.