Переглянути джерело

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
Adam Yi 3 тижнів тому
батько
коміт
4e7b8a3d81
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      zookeeper-client/zookeeper-client-c/src/zookeeper.c

+ 1 - 0
zookeeper-client/zookeeper-client-c/src/zookeeper.c

@@ -3624,6 +3624,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;