|
diff --git a/shared.c b/shared.c index 06693b0..077934f 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) |
@@ -150,3 +157,3 @@ void cgit_global_config_cb(const char *name, const char *value) |
150 | else if (!strcmp(name, "snapshots")) |
157 | else if (!strcmp(name, "snapshots")) |
151 | cgit_snapshots = atoi(value); |
158 | cgit_snapshots = cgit_parse_snapshots_mask(value); |
152 | else if (!strcmp(name, "enable-index-links")) |
159 | else if (!strcmp(name, "enable-index-links")) |
@@ -192,3 +199,3 @@ void cgit_global_config_cb(const char *name, const char *value) |
192 | else if (cgit_repo && !strcmp(name, "repo.snapshots")) |
199 | else if (cgit_repo && !strcmp(name, "repo.snapshots")) |
193 | cgit_repo->snapshots = cgit_snapshots * atoi(value); |
200 | cgit_repo->snapshots = cgit_snapshots & cgit_parse_snapshots_mask(value); /* XXX: &? */ |
194 | else if (cgit_repo && !strcmp(name, "repo.enable-log-filecount")) |
201 | else if (cgit_repo && !strcmp(name, "repo.enable-log-filecount")) |
|