Changeset View
Changeset View
Standalone View
Standalone View
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | (void) snprintf(di->errbuf, sizeof (di->errbuf), | ||||
dgettext(TEXT_DOMAIN, | dgettext(TEXT_DOMAIN, | ||||
"The sys_config privilege or diff delegated permission " | "The sys_config privilege or diff delegated permission " | ||||
"is needed\nto discover path names")); | "is needed\nto discover path names")); | ||||
return (-1); | return (-1); | ||||
} else { | } else { | ||||
(void) snprintf(di->errbuf, sizeof (di->errbuf), | (void) snprintf(di->errbuf, sizeof (di->errbuf), | ||||
dgettext(TEXT_DOMAIN, | dgettext(TEXT_DOMAIN, | ||||
"Unable to determine path or stats for " | "Unable to determine path or stats for " | ||||
"object %lld in %s"), obj, dsname); | "object %jd in %s"), (uintmax_t)obj, dsname); | ||||
jhibbits: This would be better done by casting to uintmax_t and using %jd instead. PRIxxxx is generally… | |||||
return (-1); | return (-1); | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* stream_bytes | * stream_bytes | ||||
* | * | ||||
* Prints a file name out a character at a time. If the character is | * Prints a file name out a character at a time. If the character is | ||||
▲ Show 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | if (err == 0) { | ||||
MAXPATHLEN); | MAXPATHLEN); | ||||
if (err) | if (err) | ||||
break; | break; | ||||
} else if (errno == ESRCH) { | } else if (errno == ESRCH) { | ||||
break; | break; | ||||
} else { | } else { | ||||
(void) snprintf(di->errbuf, sizeof (di->errbuf), | (void) snprintf(di->errbuf, sizeof (di->errbuf), | ||||
dgettext(TEXT_DOMAIN, | dgettext(TEXT_DOMAIN, | ||||
"next allocated object (> %lld) find failure"), | "next allocated object (> %jd) find failure"), | ||||
zc.zc_obj); | (uintmax_t)zc.zc_obj); | ||||
di->zerr = errno; | di->zerr = errno; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if (di->zerr) | if (di->zerr) | ||||
return (-1); | return (-1); | ||||
return (0); | return (0); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 416 Lines • Show Last 20 Lines |
This would be better done by casting to uintmax_t and using %jd instead. PRIxxxx is generally frowned upon.