From: Adam Dickmeiss Date: Mon, 31 Oct 2011 14:27:05 +0000 (+0100) Subject: Refactor if stmt a bit X-Git-Tag: v2.0.50~5 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=3776ae570114d93706ff320ef573d202e908f98e Refactor if stmt a bit --- diff --git a/index/zebraapi.c b/index/zebraapi.c index 6415172..2e64dd0 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1812,9 +1812,7 @@ ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw) zh->reg = zebra_register_open(zh->service, zh->reg_name, 1, rval ? 1 : 0, zh->res, zh->path_reg); - if (zh->reg) - zh->reg->seqno = seqno; - else + if (!zh->reg) { zebra_unlock(zh->lock_shadow); zebra_unlock(zh->lock_normal); @@ -1827,6 +1825,7 @@ ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw) yaz_log(YLOG_FATAL, "%s", zh->errString); return ZEBRA_FAIL; } + zh->reg->seqno = seqno; zebraExplain_curDatabase(zh->reg->zei, zh->basenames[0]); } else