the nullptr update
This commit is contained in:
@@ -83,7 +83,7 @@ static void *sensors_thread(void *arg) {
|
||||
|
||||
aio_close(&sensors->aio);
|
||||
applog(LOG_WRN, "sensors thread stopped");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void *display_thread(void *arg) {
|
||||
@@ -168,7 +168,7 @@ static void *display_thread(void *arg) {
|
||||
lcd_flush_buf(&lcd);
|
||||
lcd_close(&lcd);
|
||||
applog(LOG_WRN, "display thread stopped");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
@@ -181,7 +181,7 @@ int main(void) {
|
||||
|
||||
/* malloc memory for the struct */
|
||||
struct sensors_t *sensors = malloc(sizeof(*sensors)); // no actual point in mallocing and it is ever so sligtly slower to access heap vs stack, but its cool
|
||||
if (sensors == NULL) {
|
||||
if (sensors == nullptr) {
|
||||
applog(LOG_ERR, "can't allocate mem for the sensor struct. You don't got %lu bytes bro?", sizeof(*sensors));
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user