From 0fba3a00059437a62d6ac727a35ae085dd5c6ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 16 Dec 1998 10:24:55 +0000 Subject: Add verbose flag, and support functions. Brucify the Makefile. Differentiate atime and mtime in fetch*Stat(). Fix a few pointer bugs. Tweak some error messages. Don't #include sys/param.h and stdio.h in fetch.h. Document that sys/param.h and stdio.h must be #included before fetch.h. --- lib/libfetch/fetch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/libfetch/fetch.c') diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c index 20cf6756fa2c..1dba89e061f2 100644 --- a/lib/libfetch/fetch.c +++ b/lib/libfetch/fetch.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: fetch.c,v 1.5 1998/11/05 19:48:17 des Exp $ + * $Id: fetch.c,v 1.6 1998/11/06 22:14:08 des Exp $ */ #include @@ -40,6 +40,9 @@ #include "common.h" +int fetchLastErrCode; + + /*** Local data **************************************************************/ /* @@ -205,7 +208,7 @@ fetchParseURL(char *URL) else URL += 2; p = strpbrk(URL, "/@"); - if (*p == '@') { + if (p && *p == '@') { /* username */ for (q = URL, i = 0; (*q != ':') && (*q != '@'); q++) if (i < URL_USERLEN) -- cgit v1.2.3