This is an automated email from the ASF dual-hosted git repository.

kezhuw pushed a commit to branch branch-3.8
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/branch-3.8 by this push:
     new 1ad8de220 ZOOKEEPER-4604: Fix missing break in switch branch 
COMPLETION_STRING_STAT
1ad8de220 is described below

commit 1ad8de220b5bc521c8c8016cc4c030e338f29b17
Author: Adam Yi <[email protected]>
AuthorDate: Wed Jun 18 20:53:59 2025 +0800

    ZOOKEEPER-4604: Fix missing break in switch branch COMPLETION_STRING_STAT
    
    ZOOKEEPER-4604: Creating a COMPLETION_STRING_STAT overrides acl_result 
completion
    c->c is a union so setting c.acl_result would override c.string_stat_result.
    However, since they're all function pointers pointing to the same function, 
this won't
    cause any issue as c.string_stat_result is still correct. This might cause 
issue if we
    change the type of these completions in the future.
    Reviewers: kezhuw
    Author: adamyi
    Closes #1912 from adamyi/ZOOKEEPER-4604
    
    (cherry picked from commit 4e7b8a3d81a797b986ae3b7759f9c582e5d55691)
    Signed-off-by: Kezhu Wang <[email protected]>
---
 zookeeper-client/zookeeper-client-c/src/zookeeper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/zookeeper-client/zookeeper-client-c/src/zookeeper.c 
b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
index 74b047171..1a36f006c 100644
--- a/zookeeper-client/zookeeper-client-c/src/zookeeper.c
+++ b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
@@ -3623,6 +3623,7 @@ static completion_list_t* 
do_create_completion_entry(zhandle_t *zh, int xid,
         break;
     case COMPLETION_STRING_STAT:
         c->c.string_stat_result = (string_stat_completion_t)dc;
+        break;
     case COMPLETION_ACLLIST:
         c->c.acl_result = (acl_completion_t)dc;
         break;

Reply via email to