diff mbox series

[02/19] mdadm: Start update_opt from 0

Message ID 20240522085056.54818-3-xni@redhat.com (mailing list archive)
State Accepted
Headers show
Series mdadm/tests: enhance/fix regression cases | expand

Commit Message

Xiao Ni May 22, 2024, 8:50 a.m. UTC
Before f2e8393bd722 ('Manage&Incremental: code refactor, string to enum'), it uses
NULL to represent it doesn't need to update. So init UOPT_UNDEFINED to 0. This
problem is found by test case 05r6tor0.

Signed-off-by: Xiao Ni <xni@redhat.com>
---
 mdadm.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mariusz Tkaczyk May 23, 2024, 2:22 p.m. UTC | #1
On Wed, 22 May 2024 16:50:39 +0800
Xiao Ni <xni@redhat.com> wrote:

> Before f2e8393bd722 ('Manage&Incremental: code refactor, string to enum'), it
> uses NULL to represent it doesn't need to update. So init UOPT_UNDEFINED to
> 0. This problem is found by test case 05r6tor0.
> 
> Signed-off-by: Xiao Ni <xni@redhat.com>
> ---
Applied! 

Thanks,
Mariusz
diff mbox series

Patch

diff --git a/mdadm.h b/mdadm.h
index b71d7b32ee07..40818941bb16 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -535,7 +535,8 @@  enum special_options {
 };
 
 enum update_opt {
-	UOPT_NAME = 1,
+	UOPT_UNDEFINED = 0,
+	UOPT_NAME,
 	UOPT_PPL,
 	UOPT_NO_PPL,
 	UOPT_BITMAP,
@@ -575,7 +576,6 @@  enum update_opt {
 	UOPT_SPEC_FAILFAST,
 	UOPT_SPEC_NOFAILFAST,
 	UOPT_SPEC_REVERT_RESHAPE_NOBACKUP,
-	UOPT_UNDEFINED
 };
 extern void fprint_update_options(FILE *outf, enum update_opt update_mode);