tMake sure variables cannot be uninitialized in download() - sacc - sacc (sacco… | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 687f65e4cda6fdfe5eafd263bb30a091fe3443af | |
parent 42d4251ad320c40f328c7cee077e9f91dac39a6d | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sun, 25 Feb 2018 15:52:17 +0100 | |
Make sure variables cannot be uninitialized in download() | |
Diffstat: | |
sacc.c | 1 + | |
1 file changed, 1 insertion(+), 0 deletions(-) | |
--- | |
diff --git a/sacc.c b/sacc.c | |
t@@ -457,6 +457,7 @@ download(Item *item, int dest) | |
return 0; | |
} | |
+ w = 0; | |
while ((r = read(src, buf, BUFSIZ)) > 0) { | |
while ((w = write(dest, buf, r)) > 0) | |
r -= w; |