--------------------- PatchSet 11704 Date: 2007/09/24 13:08:36 Author: hno Branch: HEAD Tag: (none) Log: cleanup logfile udp:// parsing slightly to be more consistent with the other log modules Members: src/logfile_mod_udp.c:1.5->1.6 Index: squid/src/logfile_mod_udp.c =================================================================== RCS file: /cvsroot/squid/squid/src/logfile_mod_udp.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- squid/src/logfile_mod_udp.c 24 Sep 2007 12:42:58 -0000 1.5 +++ squid/src/logfile_mod_udp.c 24 Sep 2007 13:08:36 -0000 1.6 @@ -1,5 +1,5 @@ /* - * $Id: logfile_mod_udp.c,v 1.5 2007/09/24 12:42:58 hno Exp $ + * $Id: logfile_mod_udp.c,v 1.6 2007/09/24 13:08:36 hno Exp $ * * DEBUG: section 50 Log file handling * AUTHOR: Adrian Chadd @@ -149,17 +149,16 @@ logfile_mod_udp_open(Logfile * lf, const char *path, size_t bufsz, int fatal_flag) { l_udp_t *ll; + struct sockaddr_in addr; + char *strAddr; ll = xcalloc(1, sizeof(*ll)); lf->data = ll; - struct sockaddr_in addr; - char *strAddr; - if (strncmp(lf->path + 4, "//", 2) == 0) { - strAddr = xstrdup(lf->path + 6); - } else { - strAddr = xstrdup(lf->path + 4); + if (strncmp(path, "//", 2) == 0) { + path += 2; } + strAddr = xstrdup(path); if (!parse_sockaddr(strAddr, &addr)) { if (lf->flags.fatal) { fatalf("Invalid UDP logging address '%s'\n", lf->path);