From b823c8f9d65eb7cf3338036c2a3fedf5128dedbc Mon Sep 17 00:00:00 2001 From: Mateusz Kusiak Date: Thu, 18 Jan 2024 11:28:41 +0100 Subject: Replace "none" with macro String "none" is used many times throughout the code. Replace "none" strings with predefined macro. Add str_is_none() for comparing strings with "none". Replace str(n)cmp calls with function. Signed-off-by: Mateusz Kusiak Signed-off-by: Mariusz Tkaczyk --- maps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'maps.c') diff --git a/maps.c b/maps.c index b586679a..17f8b54d 100644 --- a/maps.c +++ b/maps.c @@ -137,14 +137,14 @@ mapping_t faultylayout[] = { { "clear", ClearErrors}, { "flush", ClearFaults}, - { "none", ClearErrors}, + { STR_COMMON_NONE, ClearErrors}, { "default", ClearErrors}, { NULL, UnSet } }; mapping_t consistency_policies[] = { { "unknown", CONSISTENCY_POLICY_UNKNOWN}, - { "none", CONSISTENCY_POLICY_NONE}, + { STR_COMMON_NONE, CONSISTENCY_POLICY_NONE}, { "resync", CONSISTENCY_POLICY_RESYNC}, { "bitmap", CONSISTENCY_POLICY_BITMAP}, { "journal", CONSISTENCY_POLICY_JOURNAL}, -- cgit v1.2.3