Fix some sizeof goofs.

Yay for continually improving gcc warnings :)
This commit is contained in:
Bill Currie 2013-09-26 17:45:30 +09:00
parent 16d899ace5
commit 03fb47d7ba
2 changed files with 2 additions and 2 deletions

View file

@ -160,7 +160,7 @@ static qboolean cam_iterator (ignore_t *ig, llist_node_t *node)
return true;
}
dsprintf (g_cam_test, "%s: ", Info_ValueForKey (cl.players[ig->slot].userinfo, "name"));
if (!strncmp (g_cam_test->str, g_cam_str, sizeof (g_cam_test->str))) {
if (!strncmp (g_cam_test->str, g_cam_str, g_cam_test->size - 1)) {
return g_cam_allowed = false;
} else
return true;

View file

@ -182,7 +182,7 @@ free_type (type_t *type)
free_type (type->t.array.type);
break;
}
memset (type, 0, sizeof (type));
memset (type, 0, sizeof (*type));
FREE (types, type);
}