Introduction
Introduction Statistics Contact Development Disclaimer Help
small fixes - frontends - front-ends for some sites (experiment)
Log
Files
Refs
README
LICENSE
---
commit 478a38c2ab8ebbeb700d2a677b2d525c1e4baaaf
parent b0a8d5b6a5b42748eb87a17b45cd81ab0e9edee2
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 14 Apr 2023 19:46:32 +0200
small fixes
Diffstat:
M json.c | 2 +-
M reddit/cgi.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/json.c b/json.c
@@ -82,7 +82,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;
diff --git a/reddit/cgi.c b/reddit/cgi.c
@@ -58,7 +58,7 @@ parsecgi(void)
if ((p = getparam(query, "page"))) {
if (decodeparam(page, sizeof(page), p) == -1)
page[0] = '\0';
- /* check if it's a number > 0 and < 100 */
+ /* check if it's a number >= 0 and < 100 */
errno = 0;
curpage = strtol(page, NULL, 10);
if (errno || curpage < 0 || curpage > 100) {
@@ -72,7 +72,7 @@ parsecgi(void)
if ((p = getparam(query, "limit"))) {
if (decodeparam(slimit, sizeof(slimit), p) == -1)
slimit[0] = '\0';
- /* check if it's a number >= 0 and < 100 */
+ /* check if it's a number > 0 and < 100 */
errno = 0;
limit = strtol(slimit, NULL, 10);
if (errno || limit <= 0 || limit > 100) {
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.