]> gitweb.ps.run Git - ps-cgit/blobdiff - html.c
ui-refs.c: Refactor print_tag()
[ps-cgit] / html.c
diff --git a/html.c b/html.c
index d60a41ffd45859e748588f488f2ac8f38f9119ad..8c45ba69daa1482456172281850b29689152581a 100644 (file)
--- a/html.c
+++ b/html.c
@@ -6,6 +6,8 @@
  *   (see COPYING for full license text)
  */
 
+#include "cgit.h"
+#include "html.h"
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -306,11 +308,7 @@ int http_parse_querystring(const char *txt_, void (*fn)(const char *name, const
        if (!txt_)
                return 0;
 
-       o = t = txt = strdup(txt_);
-       if (t == NULL) {
-               printf("Out of memory\n");
-               exit(1);
-       }
+       o = t = txt = xstrdup(txt_);
        while ((c=*t) != '\0') {
                if (c == '=') {
                        *t = '\0';