From: Adam Dickmeiss Date: Fri, 19 Jun 2009 12:53:26 +0000 (+0200) Subject: Fix fscan return val check X-Git-Tag: v2.0.38~5 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ce0c8ffd1c3471504b638f6b47a0e85bf1b6f24f;p=idzebra-moved-to-github.git Fix fscan return val check --- diff --git a/index/zebraapi.c b/index/zebraapi.c index 7e2382d..343c89d 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1634,7 +1634,7 @@ static void zebra_get_state(ZebraHandle zh, char *val, int *seqno) if (f) { - if (fscanf(f, "%c %d", val, seqno)) + if (fscanf(f, "%c %d", val, seqno) != 2) { yaz_log(YLOG_ERRNO|YLOG_WARN, "fscan fail %s", state_fname);