summaryrefslogtreecommitdiff
path: root/src/string.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2025-03-16 12:48:47 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2025-03-16 12:48:47 +0100
commit3aa2b0a6657b0ebd1618ee684f8ae31cd8bf127b (patch)
tree42a3aaef992613eab55c5154ca7d207a4f70ef99 /src/string.c
parent5acefbd715c8720abc5d8ccd5349e1d9589739df (diff)
parentcec79a3f5578da4a9f9085282389482edf45c81b (diff)
Update upstream source from tag 'upstream/4.26'
Update to upstream version '4.26' with Debian dir 21e0b48e0d5c4f3b261c10cb65f0ca9fa00fd732
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c16
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 ||