fix some new compiler warnings

This commit is contained in:
Fabian Greffrath 2024-02-23 14:58:05 +01:00
parent 00d4fdab39
commit e5cb9fc650
2 changed files with 5 additions and 2 deletions

View File

@ -3320,7 +3320,10 @@ boolean deh_GetData(char *s, char *k, long *l, char **strval, FILE *fpout)
if (*t == '=') break;
buffer[i] = *t; // copy it
}
buffer[--i] = '\0'; // terminate the key before the '='
if (i > 0)
{
buffer[--i] = '\0'; // terminate the key before the '='
}
if (!*t) // end of string with no equal sign
{
okrc = false;

View File

@ -324,7 +324,7 @@ static void NET_Query_ParseResponse(net_addr_t *addr, net_packet_t *packet,
target = GetTargetForAddr(addr, true);
broadcast_target = GetTargetForAddr(NULL, false);
target->state = QUERY_TARGET_QUERIED;
target->query_time = broadcast_target->query_time;
target->query_time = broadcast_target ? broadcast_target->query_time : 0;
}
if (target->state != QUERY_TARGET_RESPONDED)