code style: trying to get used to this syntax
This commit is contained in:
parent
9d0c5540d8
commit
8a88c90f3b
|
@ -328,8 +328,9 @@ AccelEnrichment::AccelEnrichment() {
|
||||||
#if ! EFI_UNIT_TEST
|
#if ! EFI_UNIT_TEST
|
||||||
|
|
||||||
static void accelInfo() {
|
static void accelInfo() {
|
||||||
if (logger == NULL)
|
if (!logger) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
// scheduleMsg(logger, "EL accel length=%d", mapInstance.cb.getSize());
|
// scheduleMsg(logger, "EL accel length=%d", mapInstance.cb.getSize());
|
||||||
scheduleMsg(logger, "EL accel th=%.2f/mult=%.2f", engineConfiguration->engineLoadAccelEnrichmentThreshold, engineConfiguration->engineLoadAccelEnrichmentMultiplier);
|
scheduleMsg(logger, "EL accel th=%.2f/mult=%.2f", engineConfiguration->engineLoadAccelEnrichmentThreshold, engineConfiguration->engineLoadAccelEnrichmentMultiplier);
|
||||||
scheduleMsg(logger, "EL decel th=%.2f/mult=%.2f", engineConfiguration->engineLoadDecelEnleanmentThreshold, engineConfiguration->engineLoadDecelEnleanmentMultiplier);
|
scheduleMsg(logger, "EL decel th=%.2f/mult=%.2f", engineConfiguration->engineLoadDecelEnleanmentThreshold, engineConfiguration->engineLoadDecelEnleanmentMultiplier);
|
||||||
|
|
|
@ -284,8 +284,9 @@ int nmea_valid_checksum(const char *message) {
|
||||||
char p;
|
char p;
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
char *starPtr = strrchr(message, '*');
|
char *starPtr = strrchr(message, '*');
|
||||||
if (starPtr == NULL)
|
if (!starPtr) {
|
||||||
return NMEA_CHECKSUM_ERR;
|
return NMEA_CHECKSUM_ERR;
|
||||||
|
}
|
||||||
char *int_message = starPtr + 1;
|
char *int_message = starPtr + 1;
|
||||||
long checksum = hex2int(int_message, 2);
|
long checksum = hex2int(int_message, 2);
|
||||||
|
|
||||||
|
|
|
@ -386,7 +386,7 @@ static void setPinState(const char * msg, OutputPin *pin, LEElement *element DEC
|
||||||
}
|
}
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
if (element == NULL) {
|
if (!element) {
|
||||||
warning(CUSTOM_FSIO_INVALID_EXPRESSION, "invalid expression for %s", msg);
|
warning(CUSTOM_FSIO_INVALID_EXPRESSION, "invalid expression for %s", msg);
|
||||||
} else {
|
} else {
|
||||||
int value = (int)calc.getValue2(pin->getLogicValue(), element PASS_ENGINE_PARAMETER_SUFFIX);
|
int value = (int)calc.getValue2(pin->getLogicValue(), element PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
|
@ -35,7 +35,7 @@ void MenuTree::back(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuTree::nextItem(void) {
|
void MenuTree::nextItem(void) {
|
||||||
if (current->next == NULL) {
|
if (!current->next) {
|
||||||
current = topVisible = current->topOfTheList;
|
current = topVisible = current->topOfTheList;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ void MenuItem::baseConstructor(MenuItem * parent, lcd_line_e lcdLine, const char
|
||||||
|
|
||||||
// root element has NULL parent
|
// root element has NULL parent
|
||||||
if (parent != NULL) {
|
if (parent != NULL) {
|
||||||
if (parent->firstChild == NULL) {
|
if (!parent->firstChild) {
|
||||||
topOfTheList = this;
|
topOfTheList = this;
|
||||||
parent->firstChild = this;
|
parent->firstChild = this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,8 +153,9 @@ int gpiochip_register(const char *name, struct gpiochip_ops *ops, size_t size, v
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no free chips left */
|
/* no free chips left */
|
||||||
if (chip == NULL)
|
if (!chip) {
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* register chip */
|
/* register chip */
|
||||||
chip->name = name;
|
chip->name = name;
|
||||||
|
|
|
@ -342,8 +342,9 @@ int mc33972_add(unsigned int index, const struct mc33972_config *cfg)
|
||||||
|
|
||||||
/* check for valid cs.
|
/* check for valid cs.
|
||||||
* DOTO: remove this check? CS can be driven by SPI */
|
* DOTO: remove this check? CS can be driven by SPI */
|
||||||
if (cfg->spi_config.ssport == NULL)
|
if (!cfg->spi_config.ssport) {
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
chip = &chips[index];
|
chip = &chips[index];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue