diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-04 00:51:24 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-04 00:51:24 +0000 |
| commit | 6e08614e69757475a3b9f8417cc8c7124047d0b9 (patch) | |
| tree | 8b0d2224aeea72f36ec8509b92f5387be11df2bd /util/nvmutil | |
| parent | 8143f95b417ea042268172c313f01c09550b53ee (diff) | |
util/nvmutil: reset fd/rfd to negative one
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 4104cb53..46714a23 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -69,8 +69,8 @@ static uint16_t macbuf[3]; static off_t partsize; static int flags; -static int rfd; -static int fd; +static int rfd = -1; +static int fd = -1; static int part; static int invert; static int part_modified[2]; @@ -173,7 +173,8 @@ reset_global_state(void) part_modified[1] = 0; fname = ""; cmd = NULL; - fd = 0; + fd = -1; + rfd = -1; part = 0; memset(macbuf, 0, sizeof(macbuf)); |
