struct tm t;
if (literal ||
- localtime_r(&local_time, &t) == NULL ||
+ localtime_r(&time, &t) == NULL ||
strftime(propbuf, proplen, "%a %b %e %k:%M %Y",
&t) == 0)
- (void) snprintf(propbuf, proplen, "%llu", val);
+ (void) snprintf(propbuf, proplen, "%llu", (u_longlong_t) val);
}
break;
while (n >= 1024) {
n /= 1024;
- i++;
+ index++;
}
- u = " KMGTPE"[i];
+ u = " KMGTPE"[index];
- if (i == 0) {
+ if (index == 0) {
- (void) snprintf(buf, buflen, "%llu", n);
+ (void) snprintf(buf, buflen, "%llu", (u_longlong_t) n);
- } else if ((num & ((1ULL << 10 * i) - 1)) == 0) {
+ } else if ((num & ((1ULL << 10 * index) - 1)) == 0) {
/*
* If this is an even multiple of the base, always display
* without any decimal precision.