OSDN Git Service

block/vvfat: Remove pointless check of NDEBUG
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 21 Feb 2023 23:15:54 +0000 (00:15 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 27 Feb 2023 21:29:02 +0000 (22:29 +0100)
Since commit 262a69f428 ("osdep.h: Prohibit disabling
assert() in supported builds") 'NDEBUG' can not be defined,
so '#ifndef NDEBUG' is dead code. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230221232520.14480-5-philmd@linaro.org>

block/vvfat.c

index d7d775b..fd45e86 100644 (file)
@@ -2784,13 +2784,10 @@ static int handle_commits(BDRVVVFATState* s)
             fail = -2;
             break;
         case ACTION_WRITEOUT: {
-#ifndef NDEBUG
-            /* these variables are only used by assert() below */
             direntry_t* entry = array_get(&(s->directory),
                     commit->param.writeout.dir_index);
             uint32_t begin = begin_of_direntry(entry);
             mapping_t* mapping = find_mapping_for_cluster(s, begin);
-#endif
 
             assert(mapping);
             assert(mapping->begin == begin);