]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
mdssvc: use a helper variable in mds_add_result()
authorRalph Boehme <slow@samba.org>
Mon, 10 May 2021 09:04:38 +0000 (11:04 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Jun 2021 05:08:29 +0000 (05:08 +0000)
No change in behaviour.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14740

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/mdssvc/mdssvc.c

index 0df29dc9b1e8ebcc811e7e09fa5303698d69afc4..1b0badc4851b4ace4b618c8a40d9a184b7874041 100644 (file)
@@ -554,17 +554,19 @@ bool mds_add_result(struct sl_query *slq, const char *path)
 
        ino64 = sb.st_ex_ino;
        if (slq->cnids) {
+               bool found;
+
                /*
                 * Check whether the found element is in the requested
                 * set of IDs. Note that we're faking CNIDs by using
                 * filesystem inode numbers here
                 */
-               ok = bsearch(&ino64,
-                            slq->cnids,
-                            slq->cnids_num,
-                            sizeof(uint64_t),
-                            cnid_comp_fn);
-               if (!ok) {
+               found = bsearch(&ino64,
+                               slq->cnids,
+                               slq->cnids_num,
+                               sizeof(uint64_t),
+                               cnid_comp_fn);
+               if (!found) {
                        return false;
                }
        }