diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-03-27 13:19:31 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-03-27 13:19:31 +0100 |
commit | a81a93beca9a077b4254488ba5617b44fca8d0c1 (patch) | |
tree | 4eb17ff1b432f2768ab8c88c267c4984b776380e /src/string.c | |
parent | 1c4b96855c415c48c0b3281b801c2e89fb935061 (diff) | |
parent | faa9f121de6d65800468d87d8eca0e3ff06b4ae0 (diff) |
Merge branch 'release/debian/4.26-1'HEADdebian/4.26-1master
Diffstat (limited to 'src/string.c')
-rw-r--r-- | src/string.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/string.c b/src/string.c index e468063..3a85fa8 100644 --- a/src/string.c +++ b/src/string.c @@ -41,7 +41,7 @@ struct HX_quote_rule { const char *chars; }; -static const char HX_hexenc[16] = "0123456789ABCDEF"; +static const char HX_hexenc[] = "0123456789ABCDEF"; EXPORT_SYMBOL char *HX_basename(const char *s) { @@ -1175,7 +1175,7 @@ EXPORT_SYMBOL unsigned long long HX_strtoull_nsec(const char *s, char **out_end) EXPORT_SYMBOL char *HX_unit_seconds(char *out, size_t outsize, unsigned long long secs, unsigned int flags) { - unsigned long years = 0, months = 0, weeks = 0, days, hours, mins; + unsigned long long years = 0, months = 0, weeks = 0, days, hours, mins; char buf[HXSIZEOF_Z64+4]; if (flags & HXUNIT_YEARS) { years = secs / SECONDS_PER_YEAR; @@ -1197,31 +1197,31 @@ EXPORT_SYMBOL char *HX_unit_seconds(char *out, size_t outsize, secs %= 60; *out = '\0'; if (years > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%luy", years); + snprintf(buf, ARRAY_SIZE(buf), "%lluy", years); HX_strlcat(out, buf, outsize); } if (months == 1) { HX_strlcat(out, "1month", outsize); } else if (months > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%lumonths", months); + snprintf(buf, ARRAY_SIZE(buf), "%llumonths", months); HX_strlcat(out, buf, outsize); } if (weeks == 1) { HX_strlcat(out, "1week", outsize); } else if (weeks > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%luweeks", weeks); + snprintf(buf, ARRAY_SIZE(buf), "%lluweeks", weeks); HX_strlcat(out, buf, outsize); } if (days > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%lud", days); + snprintf(buf, ARRAY_SIZE(buf), "%llud", days); HX_strlcat(out, buf, outsize); } if (hours > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%luh", hours); + snprintf(buf, ARRAY_SIZE(buf), "%lluh", hours); HX_strlcat(out, buf, outsize); } if (mins > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%lumin", mins); + snprintf(buf, ARRAY_SIZE(buf), "%llumin", mins); HX_strlcat(out, buf, outsize); } if (secs > 0 || |