Unidiff2 files changed, 8 insertions, 0 deletions
|
diff --git a/cgit.h b/cgit.h index f01f6c9..6937c42 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -159,2 +159,3 @@ extern int chk_zero(int result, char *msg); |
159 | extern int chk_positive(int result, char *msg); |
159 | extern int chk_positive(int result, char *msg); |
| |
160 | extern int chk_non_negative(int result, char *msg); |
160 | |
161 | |
|
|
diff --git a/shared.c b/shared.c index 1a5b866..65fc8b2 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -88,2 +88,9 @@ int chk_positive(int result, char *msg) |
88 | |
88 | |
| |
89 | int chk_non_negative(int result, char *msg) |
| |
90 | { |
| |
91 | if (result < 0) |
| |
92 | die("%s: %s",msg, strerror(errno)); |
| |
93 | return result; |
| |
94 | } |
| |
95 | |
89 | struct repoinfo *add_repo(const char *url) |
96 | struct repoinfo *add_repo(const char *url) |
|