Module Name: src Committed By: christos Date: Fri May 8 12:06:11 UTC 2009
Modified Files: src/dist/ipf/lib: load_http.c Log Message: reorder code to avoid uninitalized variable. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/dist/ipf/lib/load_http.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/dist/ipf/lib/load_http.c diff -u src/dist/ipf/lib/load_http.c:1.2 src/dist/ipf/lib/load_http.c:1.3 --- src/dist/ipf/lib/load_http.c:1.2 Thu May 7 17:07:34 2009 +++ src/dist/ipf/lib/load_http.c Fri May 8 08:06:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: load_http.c,v 1.2 2009/05/07 21:07:34 christos Exp $ */ +/* $NetBSD: load_http.c,v 1.3 2009/05/08 12:06:11 christos Exp $ */ /* * Copyright (C) 2006 by Darren Reed. @@ -35,16 +35,16 @@ rtop = NULL; rbot = NULL; + myurl = strdup(url); + if (myurl == NULL) + goto done; + rem = sizeof(buffer); left = snprintf(buffer, rem, "GET %s HTTP/1.0\r\n", url); if (left < 0 || left > rem) goto done; rem -= left; - myurl = strdup(url); - if (myurl == NULL) - goto done; - s = myurl + 7; /* http:// */ t = strchr(s, '/'); if (t == NULL) {