]> mj.ucw.cz Git - libucw.git/blobdiff - lib/url.c
Add directory to all includes.
[libucw.git] / lib / url.c
index 9b031694ef09613f7ca36327399c3dc6475cbb45..e3f431ad4c61dc825a39095d3cdc59a27eb57ba3 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -8,9 +8,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "lib.h"
-#include "url.h"
-#include "string.h"
+#include "lib/lib.h"
+#include "lib/url.h"
+#include "lib/chartype.h"
 
 /* Escaping and de-escaping */
 
@@ -302,7 +302,6 @@ copy:                                       /* Combine part of old URL with the new one */
 int
 url_normalize(struct url *u, struct url *b)
 {
-  byte *k;
   int err;
 
   /* Basic checks */
@@ -375,14 +374,14 @@ url_canonicalize(struct url *u)
   kill_end_dot(u->host);
   if ((!u->rest || !*u->rest) && url_proto_path_flags[u->protoid])
     u->rest = "/";
-  if (c = strchr(u->rest, '#'))                /* Kill fragment reference */
+  if (u->rest && (c = strchr(u->rest, '#')))   /* Kill fragment reference */
     *c = 0;
   return 0;
 }
 
 /* Pack a broken-down URL */
 
-byte *
+static byte *
 append(byte *d, byte *s, byte *e)
 {
   if (d)