commit: 1a27d14be31df6f0b8b735986c61e3db27de39b3
parent 73a04f2dd3faea132f01c810ad5bfdd0b5e08daa
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 27 Apr 2024 09:27:10 +0200
cmd/truncate: Make sure tr is initialized
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmd/truncate.c b/cmd/truncate.c
@@ -31,7 +31,10 @@ main(int argc, char *argv[])
int open_flags = O_WRONLY | O_CREAT | O_NONBLOCK;
bool size_set = false;
- struct truncation tr;
+ struct truncation tr = {
+ .op = OP_SET,
+ .size = 0,
+ };
char *ref_file = NULL;
int c = -1;