summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4939f46)
"port" is int, rather than unsigned. No biggy since at this point we
already know that port > 0.
Found by cppcheck.
struct servent *se = getservbyport(htons(port), transport);
if (se == NULL)
struct servent *se = getservbyport(htons(port), transport);
if (se == NULL)
- snprintf(service, sizeof(service), "%u", port);
+ snprintf(service, sizeof(service), "%d", port);
else
snprintf(service, sizeof(service), "%s", se->s_name);
}
else
snprintf(service, sizeof(service), "%s", se->s_name);
}