Skip to content

Commit 795d4a5

Browse files
committed
Revert wrong NULL replacement
1 parent 1caf186 commit 795d4a5

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

targets/AzureRTOS/SiliconLabs/_nanoCLR/System.Device.I2c/nano_sl_i2cspm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void I2CSPM_Init(I2CSPM_Init_TypeDef *init)
3232
CMU_Clock_TypeDef i2cClock;
3333
I2C_Init_TypeDef i2cInit;
3434

35-
EFM_ASSERT(init != nullptr);
35+
EFM_ASSERT(init != NULL);
3636

3737
#if defined(_CMU_HFPERCLKEN0_MASK)
3838
CMU_ClockEnable(cmuClock_HFPER, true);

targets/ESP32/_common/Target_System_IO_FileSystem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool Storage_UnMountSDCard(int driveIndex)
6161
return false;
6262
}
6363

64-
card = nullptr;
64+
card = NULL;
6565

6666
return true;
6767
}

targets/ESP32/_common/targetHAL_ConfigStorageLittlefs.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ FILE *ConfigStorage_OpenFile(
160160
// Open SPIFFS config storage
161161
FILE *file = fopen(fileName, isWrite ? (isAppend ? "a" : "w") : "r");
162162

163-
if (file != nullptr)
163+
if (file != NULL)
164164
{
165165
return file;
166166
}
167167

168168
ESP_LOGE(TAG, "NANO: Failed to open file (%s)", fileName);
169169

170-
return nullptr;
170+
return NULL;
171171
}
172172

173173
//
@@ -375,9 +375,9 @@ HAL_CONFIGURATION_NETWORK *ConfigStorage_FindNetworkConfigurationBlocks()
375375
HAL_CONFIGURATION_NETWORK *networkConfigs = (HAL_CONFIGURATION_NETWORK *)platform_malloc(allocationSize);
376376

377377
// check allocation
378-
if (networkConfigs == nullptr)
378+
if (networkConfigs == NULL)
379379
{
380-
return nullptr;
380+
return NULL;
381381
}
382382

383383
// clear memory
@@ -421,9 +421,9 @@ HAL_CONFIGURATION_NETWORK_WIRELESS80211 *ConfigStorage_FindNetworkWireless80211C
421421
(HAL_CONFIGURATION_NETWORK_WIRELESS80211 *)platform_malloc(allocationSize);
422422

423423
// check allocation
424-
if (networkWirelessConfigs == nullptr)
424+
if (networkWirelessConfigs == NULL)
425425
{
426-
return nullptr;
426+
return NULL;
427427
}
428428

429429
// clear memory
@@ -467,9 +467,9 @@ HAL_CONFIGURATION_NETWORK_WIRELESSAP *ConfigStorage_FindNetworkWirelessAPConfigu
467467
(HAL_CONFIGURATION_NETWORK_WIRELESSAP *)platform_malloc(allocationSize);
468468

469469
// check allocation
470-
if (networkWirelessAPConfigs == nullptr)
470+
if (networkWirelessAPConfigs == NULL)
471471
{
472-
return nullptr;
472+
return NULL;
473473
}
474474

475475
// clear memory
@@ -517,9 +517,9 @@ HAL_CONFIGURATION_X509_CERTIFICATE *ConfigStorage_FindX509CertificateConfigurati
517517
(HAL_CONFIGURATION_X509_CERTIFICATE *)platform_malloc(allocationSize);
518518

519519
// check allocation
520-
if (certificateStore == nullptr)
520+
if (certificateStore == NULL)
521521
{
522-
return nullptr;
522+
return NULL;
523523
}
524524

525525
// clear memory
@@ -535,9 +535,9 @@ HAL_CONFIGURATION_X509_CERTIFICATE *ConfigStorage_FindX509CertificateConfigurati
535535
(HAL_Configuration_X509CaRootBundle *)platform_malloc(sizeof(HAL_Configuration_X509CaRootBundle));
536536

537537
// check allocation
538-
if (certificate == nullptr)
538+
if (certificate == NULL)
539539
{
540-
return nullptr;
540+
return NULL;
541541
}
542542

543543
// clear memory
@@ -595,9 +595,9 @@ HAL_CONFIGURATION_X509_DEVICE_CERTIFICATE *IRAM_ATTR ConfigStorage_FindX509Devic
595595
(HAL_CONFIGURATION_X509_DEVICE_CERTIFICATE *)platform_malloc(allocationSize);
596596

597597
// check allocation
598-
if (deviceCertificate == nullptr)
598+
if (deviceCertificate == NULL)
599599
{
600-
return nullptr;
600+
return NULL;
601601
}
602602

603603
// clear memory
@@ -613,9 +613,9 @@ HAL_CONFIGURATION_X509_DEVICE_CERTIFICATE *IRAM_ATTR ConfigStorage_FindX509Devic
613613
(HAL_Configuration_X509DeviceCertificate *)platform_malloc(sizeof(HAL_Configuration_X509DeviceCertificate));
614614

615615
// check allocation
616-
if (certificate == nullptr)
616+
if (certificate == NULL)
617617
{
618-
return nullptr;
618+
return NULL;
619619
}
620620

621621
// clear memory
@@ -652,7 +652,7 @@ bool ConfigurationManager_GetConfigurationBlockFromStorage(
652652

653653
handle = ConfigStorage_OpenFile(configuration, configurationIndex, false, false);
654654

655-
if (handle != nullptr)
655+
if (handle != NULL)
656656
{
657657
readSize = ConfigStorage_ReadFile(handle, configurationBlock, maxBlockSize);
658658

@@ -675,7 +675,7 @@ int32_t ConfigurationManager_GetConfigurationBlockSize(
675675

676676
handle = ConfigStorage_OpenFile(configuration, configurationIndex, false, false);
677677

678-
if (handle != nullptr)
678+
if (handle != NULL)
679679
{
680680
readSize = ConfigStorage_FileSize(handle);
681681

targets/TI_SimpleLink/_nanoCLR/targetPAL_Events.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bool Events_Initialize_Platform()
2424
Clock_Params params;
2525

2626
Clock_Params_init(&params);
27-
params.arg = nullptr;
27+
params.arg = NULL;
2828
params.startFlag = FALSE;
2929
params.period = 0;
3030

@@ -56,7 +56,7 @@ void Events_SetBoolTimer(bool *timerCompleteFlag, uint32_t millisecondsFromNow)
5656
// we assume only 1 can be active, abort previous just in case
5757
Clock_stop(boolEventsTimer);
5858

59-
if (timerCompleteFlag != nullptr)
59+
if (timerCompleteFlag != NULL)
6060
{
6161
// As only one timer running at a time we will just save it
6262
saveTimerCompleteFlag = timerCompleteFlag;

targets/TI_SimpleLink/_nanoCLR/targetPAL_Time.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ HRESULT Time_Initialize()
2323
Clock_Params params;
2424

2525
Clock_Params_init(&params);
26-
params.arg = nullptr;
26+
params.arg = NULL;
2727
params.startFlag = FALSE;
2828
params.period = 0;
2929

0 commit comments

Comments
 (0)