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

tison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 248cc091d ZOOKEEPER-4761: CLI tool read saved clientid fail (#2079)
248cc091d is described below

commit 248cc091d440659a819bdd44fe5b41a38321a929
Author: gycherish <[email protected]>
AuthorDate: Tue Oct 17 22:20:17 2023 +0800

    ZOOKEEPER-4761: CLI tool read saved clientid fail (#2079)
    
    Co-authored-by: gycherish <[email protected]>
    Co-authored-by: tison <[email protected]>
---
 zookeeper-client/zookeeper-client-c/src/cli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zookeeper-client/zookeeper-client-c/src/cli.c 
b/zookeeper-client/zookeeper-client-c/src/cli.c
index 823ed72a5..c34be8d59 100644
--- a/zookeeper-client/zookeeper-client-c/src/cli.c
+++ b/zookeeper-client/zookeeper-client-c/src/cli.c
@@ -924,7 +924,7 @@ int main(int argc, char **argv) {
     if (clientIdFile) {
         fh = fopen(clientIdFile, "r");
         if (fh) {
-            if (fread(&myid, sizeof(myid), 1, fh) != sizeof(myid)) {
+            if (fread(&myid, sizeof(myid), 1, fh) != 1) {
                 memset(&myid, 0, sizeof(myid));
             }
             fclose(fh);

Reply via email to