commit c46eda88bcbbcf577ca7a805746b44d63c0e4c0a from: Florian Obser date: Thu Jul 21 16:48:46 2022 UTC Correctly track if we sent more data since the last time we looked. With the narrow scope of bytes_sent_cur it would always be zero, and we would always update progress. Found by llvm's scan-build (Dead store). OK stsp commit - c3821befbed0b67d1b48a5cfa3aaa2e022c58430 commit + c46eda88bcbbcf577ca7a805746b44d63c0e4c0a blob - b8290d0d6137059bea61a547bbbf82d00672571d blob + 69f2244f86117ab0b9aa9b8ad44c2f28052f2f26 --- lib/send.c +++ lib/send.c @@ -342,7 +342,7 @@ got_send_pack(const char *remote_name, struct got_path int i, nours = 0, ntheirs = 0; size_t nalloc_ours = 0, nalloc_theirs = 0; int refs_to_send = 0, refs_to_delete = 0; - off_t bytes_sent = 0; + off_t bytes_sent = 0, bytes_sent_cur = 0; struct pack_progress_arg ppa; uint8_t packsha1[SHA1_DIGEST_LENGTH]; FILE *packfile = NULL; @@ -665,7 +665,6 @@ got_send_pack(const char *remote_name, struct got_path while (!done) { int success = 0; char *refname = NULL; - off_t bytes_sent_cur = 0; if (cancel_cb) { err = (*cancel_cb)(cancel_arg); if (err)