From: miod Date: Sat, 18 Feb 2023 15:22:40 +0000 (+0000) Subject: Fix possibly uninitialized variable in editor_allocspace(); ok krw@ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e1ee966aa69fbb46cc0d0d4ae39cd4a7d02ac874;p=openbsd Fix possibly uninitialized variable in editor_allocspace(); ok krw@ --- diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index a3e263f306d..986ed1233bb 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.402 2023/02/07 14:30:48 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.403 2023/02/18 15:22:40 miod Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -625,7 +625,7 @@ again: /* Find largest chunk of free space. */ chunk = free_chunks(lp, -1); - chunksize = 0; + chunkstart = chunksize = 0; for (; chunk->start != 0 || chunk->stop != 0; chunk++) { start = chunk->start; stop = chunk->stop;