From 3776ae570114d93706ff320ef573d202e908f98e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 31 Oct 2011 15:27:05 +0100 Subject: [PATCH] Refactor if stmt a bit --- index/zebraapi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 1.7.10.4