summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0x221E2026-04-21 18:38:00 +0200
committer0x221E2026-04-21 18:50:57 +0200
commit118adaf341309db2e1d6bcbe3c6071bb3fbcff98 (patch)
tree2e0b459b83726f586e92f6446ac07f4d2e8fd8f3
parentc9364e9eed5a7fa6e2c8951d4ea07fb5e0d32d38 (diff)
core: add error message on net_init() failure
On net_init failure, the application did not return any error message. To help with error-checking, an stderr is outputted after a bad return from net_init() on main.c
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 48cdcb8..613bfd5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -102,8 +102,10 @@ int main(int argc, char **argv)
return 1;
}
- if (net_init() != 0)
+ if (net_init() != 0) {
+ fprintf(stderr, "curl: network initialization error!");
return 1;
+ }
if(argv[2] == NULL)
cmd_func(0, NULL);