Remove dirname() code

We no longer allow complicated name structures, so this code has become
pointless.

Signed-off-by: Joern Engel <joern@logfs.org>
diff --git a/cancd.c b/cancd.c
index b560ff0..467ecab 100644
--- a/cancd.c
+++ b/cancd.c
@@ -374,28 +374,14 @@
 
 static void do_output(char *buf, int len, struct sockaddr_in *addr, socklen_t socklen)
 {
-	int fd, rc;
+	int fd;
 	const char *name;
-	char *tmp, *dir;
 	struct source_ip *sip = get_source_ip(addr);
 
 	name = sip->filename;
 	if (!name)
 		return;
 
-	tmp = strdup(name);
-	if (!tmp) {
-		syslog(LOG_ERR, "Unable to allocate memory while logging to \"%s\"", name);
-		return;
-	}
-
-	dir = dirname(tmp);
-	rc = make_tree(dir, 0700);
-	free(tmp);
-
-	if (rc)
-		return;
-
 	fd = open(name, O_WRONLY | O_APPEND | O_CREAT, 0600);
 	if (fd < 0)
 		syslog(LOG_ERR, "Unable to open \"%s\": %s", name, strerror(errno));