]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add missing casts detected by OpenBSD
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 4 Oct 2009 09:48:56 +0000 (22:48 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 4 Oct 2009 09:48:56 +0000 (22:48 +1300)
helpers/basic_auth/NCSA/basic_ncsa_auth.cc

index 12aa83f23739568da834f7d8f69a27f6bd70c857..a7f3de977a00487846fddb44d38a279a58bcdbe1 100644 (file)
@@ -58,7 +58,7 @@ typedef struct _user_data {
 static void
 my_free(void *p)
 {
-    user_data *u = p;
+    user_data *u = static_cast<user_data*>(p);
     xfree(u->user);
     xfree(u->passwd);
     xfree(u);
@@ -94,7 +94,7 @@ read_passwd_file(const char *passwdfile)
         user = strtok(buf, ":\n\r");
         passwd = strtok(NULL, ":\n\r");
         if ((strlen(user) > 0) && passwd) {
-            u = xmalloc(sizeof(*u));
+            u = static_cast<user_data*>(xmalloc(sizeof(*u)));
             u->user = xstrdup(user);
             u->passwd = xstrdup(passwd);
             hash_join(hash, (hash_link *) u);