From: Sebastian Hammer Date: Wed, 19 Apr 1995 09:24:01 +0000 (+0000) Subject: Fixed bug in zass_open - variable initialized after use X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=a1b0ce967a250e6bb5df41d763766f53028aa7bb;p=egate.git Fixed bug in zass_open - variable initialized after use --- diff --git a/zlayer/Makefile b/zlayer/Makefile index 84f119c..a2f13dc 100644 --- a/zlayer/Makefile +++ b/zlayer/Makefile @@ -2,7 +2,10 @@ # Europagate, 1995 # # $Log: Makefile,v $ -# Revision 1.10 1995/04/19 07:31:28 adam +# Revision 1.11 1995/04/19 09:24:01 quinn +# Fixed bug in zass_open - variable initialized after use +# +# Revision 1.10 1995/04/19 07:31:28 adam # Minor changes. # # Revision 1.9 1995/04/17 11:26:52 quinn @@ -31,20 +34,20 @@ # SHELL=/bin/sh -ZDEFS=-DLOW_TO_HIGH -Dfar= -ZPRE=/home/proj/zdist/zdist102b1-1/libz3950 -ZINC=-I$(ZPRE) -ZLIB=$(ZPRE)/libz3950.a +#ZDEFS=-DLOW_TO_HIGH -Dfar= +#ZPRE=/home/proj/zdist/zdist102b1-1/libz3950 +#ZINC=-I$(ZPRE) +#ZLIB=$(ZPRE)/libz3950.a -#ZINC=-I../../yaz/include -#ZDEFS= # -DUSE_XTIMOSI -#ZLIB=../../yaz/lib/libyaz.a +ZINC=-I../../yaz/include +ZDEFS= # -DUSE_XTIMOSI +ZLIB=../../yaz/lib/libyaz.a INCLUDE=-I. -I../include $(ZINC) #CFLAGS=-g -Wall -pedantic -ansi TPROG1=test LIB=../lib/libzass.a -PO=zaccess.o +PO=zaccess-yaz.o CPP=$(CC) -E DEFS=$(INCLUDE) CFILES=zaccess.c diff --git a/zlayer/zaccess-yaz.c b/zlayer/zaccess-yaz.c index f8615d9..62d3ef2 100644 --- a/zlayer/zaccess-yaz.c +++ b/zlayer/zaccess-yaz.c @@ -4,7 +4,10 @@ * Z39.50 API for the Email gateway - YAZ version * * $Log: zaccess-yaz.c,v $ - * Revision 1.1 1995/04/17 11:26:53 quinn + * Revision 1.2 1995/04/19 09:24:02 quinn + * Fixed bug in zass_open - variable initialized after use + * + * Revision 1.1 1995/04/17 11:26:53 quinn * Added YAZ version of zaccess * * @@ -193,14 +196,14 @@ ZASS zass_open(char *host, int port) return 0; } gw_log(ZASS_DEBUG, ZASS_TYPE, "connected ok"); + p->inbuf = 0; + p->inbuflen = 0; if (send_initreq(p) < 0 || receive_initres(p) < 0) { gw_log(GW_LOG_FATAL, ZASS_TYPE, "Failed to initialize"); return 0; } gw_log(ZASS_DEBUG, ZASS_TYPE, "Sent init request"); - p->inbuf = 0; - p->inbuflen = 0; return p; }