]> gitweb.ps.run Git - ps-cgit/blobdiff - shared.c
added snapshot filename to the link
[ps-cgit] / shared.c
index 1a5b866e86630df4964961086edbb0ea1ec0d48e..65fc8b25d25a165a70ee49e2916cfd4cb69071ad 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -86,6 +86,13 @@ int chk_positive(int result, char *msg)
        return result;
 }
 
+int chk_non_negative(int result, char *msg)
+{
+       if (result < 0)
+               die("%s: %s",msg, strerror(errno));
+       return result;
+}
+
 struct repoinfo *add_repo(const char *url)
 {
        struct repoinfo *ret;