Introduction
Introduction Statistics Contact Development Disclaimer Help
sync typofix and EOVERFLOW -> ENOMEM - jfconvert - JSON Feed (subset) to sfeed …
git clone git://git.codemadness.org/jfconvert
Log
Files
Refs
README
LICENSE
---
commit a5fd21b50652e9f05cda10eb939ecba2fb90c794
parent ff5861a0f777bfccd432d267edd466f9cc672872
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 14 Apr 2023 19:15:08 +0200
sync typofix and EOVERFLOW -> ENOMEM
Diffstat:
M jf2sfeed.c | 4 ++--
M json.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/jf2sfeed.c b/jf2sfeed.c
@@ -94,7 +94,7 @@ errx(int exitstatus, const char *fmt, ...)
exit(exitstatus);
}
-/* Convert time fields. Returns a signed (atleast) 64-bit UNIX timestamp.
+/* Convert time fields. Returns a signed (at least) 64-bit UNIX timestamp.
Parameters should be passed as they are in a struct tm:
that is: year = year - 1900, month = month - 1. */
static long long
@@ -284,7 +284,7 @@ string_append(String *s, const char *data, size_t len)
return;
if (s->len >= SIZE_MAX - len) {
- errno = EOVERFLOW;
+ errno = ENOMEM;
err(1, "realloc");
}
diff --git a/json.c b/json.c
@@ -64,7 +64,7 @@ capacity(char **value, size_t *sz, size_t cur, size_t inc)
/* check for addition overflow */
if (cur > SIZE_MAX - inc) {
- errno = EOVERFLOW;
+ errno = ENOMEM;
return -1;
}
need = cur + inc;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.