code style
This commit is contained in:
parent
83b1ca00a4
commit
0c3f73c2b4
|
@ -294,7 +294,7 @@ static void handleGetStructContent(ts_channel_s *tsChannel, int structId, int si
|
|||
tsState.readPageCommandsCounter++;
|
||||
|
||||
const void *addr = getStructAddr(structId);
|
||||
if (addr == NULL) {
|
||||
if (addr == nullptr) {
|
||||
// todo: add warning code - unexpected structId
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) {
|
|||
int transferred = size;
|
||||
uartSendTimeout(TS_UART_DEVICE, (size_t *)&transferred, buffer, BINARY_IO_TIMEOUT);
|
||||
#else
|
||||
if (tsChannel->channel == NULL)
|
||||
if (tsChannel->channel == nullptr)
|
||||
return;
|
||||
|
||||
// int transferred = chnWriteTimeout(tsChannel->channel, buffer, size, BINARY_IO_TIMEOUT);
|
||||
|
@ -214,7 +214,7 @@ int sr5ReadDataTimeout(ts_channel_s *tsChannel, uint8_t * buffer, int size, int
|
|||
uartReceiveTimeout(TS_UART_DEVICE, &received, buffer, timeout);
|
||||
return (int)received;
|
||||
#else /* TS_UART_DMA_MODE */
|
||||
if (tsChannel->channel == NULL)
|
||||
if (tsChannel->channel == nullptr)
|
||||
return 0;
|
||||
return chnReadTimeout(tsChannel->channel, (uint8_t * )buffer, size, timeout);
|
||||
#endif /* TS_UART_DMA_MODE */
|
||||
|
|
|
@ -103,7 +103,7 @@ void LECalculator::reset(LEElement *element) {
|
|||
}
|
||||
|
||||
void LECalculator::add(LEElement *element) {
|
||||
if (first == NULL) {
|
||||
if (first == nullptr) {
|
||||
first = element;
|
||||
} else {
|
||||
LEElement *last = first;
|
||||
|
@ -411,7 +411,7 @@ LEElement *LEElementPool::parseExpression(const char * line) {
|
|||
while (true) {
|
||||
line = getNextToken(line, parsingBuffer, sizeof(parsingBuffer));
|
||||
|
||||
if (line == NULL) {
|
||||
if (line == nullptr) {
|
||||
/**
|
||||
* No more tokens in this line
|
||||
*/
|
||||
|
@ -419,7 +419,7 @@ LEElement *LEElementPool::parseExpression(const char * line) {
|
|||
}
|
||||
|
||||
LEElement *n = next();
|
||||
if (n == NULL) {
|
||||
if (n == nullptr) {
|
||||
return first;
|
||||
}
|
||||
|
||||
|
@ -432,12 +432,12 @@ LEElement *LEElementPool::parseExpression(const char * line) {
|
|||
* Cannot recognize token
|
||||
*/
|
||||
warning(CUSTOM_ERR_PARSING_ERROR, "unrecognized [%s]", parsingBuffer);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
n->init(action);
|
||||
}
|
||||
|
||||
if (first == NULL) {
|
||||
if (first == nullptr) {
|
||||
first = n;
|
||||
last = n;
|
||||
} else {
|
||||
|
|
|
@ -259,7 +259,7 @@ void set10K_4050K(ThermistorConf *thermistorConf, float pullup) {
|
|||
|
||||
#if EFI_PROD_CODE
|
||||
static void testCltByR(float resistance) {
|
||||
if (logger == NULL) {
|
||||
if (logger == nullptr) {
|
||||
firmwareError(CUSTOM_ERR_THERM, "thermstr not initialized");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ static void timerCallback(PwmConfig *state) {
|
|||
// we are here when PWM gets stopped
|
||||
return;
|
||||
}
|
||||
if (state->executor == NULL) {
|
||||
if (state->executor == nullptr) {
|
||||
firmwareError(CUSTOM_NULL_EXECUTOR, "exec on %s", state->name);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ void TriggerWaveform::addEvent(angle_t angle, trigger_wheel_e const channelIndex
|
|||
for (int i = 0; i < PWM_PHASE_MAX_WAVE_PER_PWM; i++) {
|
||||
SingleChannelStateSequence *wave = &this->wave.channels[i];
|
||||
|
||||
if (wave->pinStates == NULL) {
|
||||
if (wave->pinStates == nullptr) {
|
||||
warning(CUSTOM_ERR_STATE_NULL, "wave pinStates is NULL");
|
||||
setShapeDefinitionError(true);
|
||||
return;
|
||||
|
|
|
@ -161,7 +161,7 @@ static float getSignalPeriodMs(int index) {
|
|||
}
|
||||
|
||||
static void reportWave(Logging *logging, int index) {
|
||||
if (readers[index].hw == NULL) {
|
||||
if (readers[index].hw == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (readers[index].hw->started) {
|
||||
|
|
Loading…
Reference in New Issue