queue.c: use snprintf(NULL, 0, ...) instead of strlen() arithmetic