Since size_t is unsigned, better use (unsigned long) and %lu to print

a size_t. Spotted by kleink.
This commit is contained in:
martin 2003-02-19 19:15:28 +00:00
parent f7418ccd14
commit d47d521c0f

View File

@ -344,7 +344,7 @@ rc_getstring(struct rcfile *rcp, const char *section, const char *key,
if (error)
return error;
if (strlen(value) >= maxlen) {
warnx("line too long for key '%s' in section '%s', max = %ld\n", key, section, (long)maxlen);
warnx("line too long for key '%s' in section '%s', max = %lu\n", key, section, (unsigned long)maxlen);
return EINVAL;
}
strcpy(dest, value);