diff --git a/src/main.c b/src/main.c index 92fa58d..45721e2 100644 --- a/src/main.c +++ b/src/main.c @@ -175,14 +175,14 @@ int main(void) { /* see if another instance is up, quit if it is */ if (get_instance_lock() < 0) - return 1; + return 0; /* 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) { applog(LOG_ERR, "can't allocate mem for the sensor struct. You don't got %lu bytes bro?", sizeof(struct sensors_t)); free(sensors); - return 2; + return 1; } applog(LOG_INF, "sensor struct allocated, size is %lu bytes", sizeof(struct sensors_t));