Skip to content

Commit 5289763

Browse files
bzbarsky-applepull[bot]
authored andcommitted
Make VerifyOrDo spelling clearer. (#18741)
It took me a bit to figure out what the "Ordo" thing being verified was.
1 parent 56a75cb commit 5289763

File tree

6 files changed

+587
-587
lines changed

6 files changed

+587
-587
lines changed

examples/chip-tool/templates/tests/partials/test_step.zapt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{{~#*inline "maybePICS"}}
44
{{#if PICS}}
5-
VerifyOrdo(!ShouldSkip("{{PICS}}"), return ContinueOnChipMainThread(CHIP_NO_ERROR));
5+
VerifyOrDo(!ShouldSkip("{{PICS}}"), return ContinueOnChipMainThread(CHIP_NO_ERROR));
66
{{/if}}
77
{{/inline~}}
88

src/lib/support/CodeUtils.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -593,20 +593,20 @@ inline void chipDie(void)
593593
} while (false)
594594

595595
/**
596-
* @def VerifyOrdo(expr, ...)
596+
* @def VerifyOrDo(expr, ...)
597597
*
598598
* @brief
599599
* do something if expression evaluates to false
600600
*
601601
* Example usage:
602602
*
603603
* @code
604-
* VerifyOrdo(param != nullptr, LogError("param is nullptr"));
604+
* VerifyOrDo(param != nullptr, LogError("param is nullptr"));
605605
* @endcode
606606
*
607607
* @param[in] expr A Boolean expression to be evaluated.
608608
*/
609-
#define VerifyOrdo(expr, ...) \
609+
#define VerifyOrDo(expr, ...) \
610610
do \
611611
{ \
612612
if (!(expr)) \

src/platform/ESP32/KeyValueStoreManagerImpl.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t
7878
ReturnErrorOnFailure(handle.Open(kNamespace, NVS_READONLY));
7979

8080
char keyHash[NVS_KEY_NAME_MAX_SIZE];
81-
VerifyOrdo(HashIfLongKey(key, keyHash) == false, key = keyHash);
81+
VerifyOrDo(HashIfLongKey(key, keyHash) == false, key = keyHash);
8282

8383
ReturnMappedErrorOnFailure(nvs_get_blob(handle, key, value, &value_size));
8484

@@ -98,7 +98,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value,
9898
ReturnErrorOnFailure(handle.Open(kNamespace, NVS_READWRITE));
9999

100100
char keyHash[NVS_KEY_NAME_MAX_SIZE];
101-
VerifyOrdo(HashIfLongKey(key, keyHash) == false, key = keyHash);
101+
VerifyOrDo(HashIfLongKey(key, keyHash) == false, key = keyHash);
102102

103103
ReturnMappedErrorOnFailure(nvs_set_blob(handle, key, value, value_size));
104104

@@ -115,7 +115,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key)
115115
ReturnErrorOnFailure(handle.Open(kNamespace, NVS_READWRITE));
116116

117117
char keyHash[NVS_KEY_NAME_MAX_SIZE];
118-
VerifyOrdo(HashIfLongKey(key, keyHash) == false, key = keyHash);
118+
VerifyOrDo(HashIfLongKey(key, keyHash) == false, key = keyHash);
119119

120120
ReturnMappedErrorOnFailure(nvs_erase_key(handle, key));
121121

0 commit comments

Comments
 (0)