sync typofix and EOVERFLOW -> ENOMEM - jfconvert - JSON Feed (subset) to sfeed or Atom converter
HTML git clone git://git.codemadness.org/jfconvert
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit a5fd21b50652e9f05cda10eb939ecba2fb90c794
DIR parent ff5861a0f777bfccd432d267edd466f9cc672872
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
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(-)
---
DIR 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");
}
DIR 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;