commit 20f65f4dab52f9b4432a8f69987a485852777d85
parent 5cc2cb4d8ed4f3866cc99a3c2e50e4f244f6f836
Author: sin <sin@2f30.org>
Date: Sun, 17 Feb 2019 11:26:40 +0000
Move var decl to inner scope
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dedup.c b/dedup.c
@@ -423,12 +423,12 @@ dedup(int fd, char *msg)
}
if (ent->nblks > 0) {
- size_t size;
-
/* Calculate hash and add this entry to the index */
SHA256_Final(ent->md, &ctx);
if (msg != NULL && msg[0] != '\0') {
+ size_t size;
+
size = strlen(msg) + 1;
if (size > sizeof(ent->msg))
size = sizeof(ent->msg);