Fix fscan return val check
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 19 Jun 2009 12:53:26 +0000 (14:53 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 19 Jun 2009 12:53:26 +0000 (14:53 +0200)
index/zebraapi.c

index 7e2382d..343c89d 100644 (file)
@@ -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);