Error if high/low temp is identical

master
Kenny Levinsen 2020-09-20 17:25:38 +02:00
parent 81d87e3c47
commit 20a40d450b
1 changed files with 6 additions and 0 deletions

6
main.c
View File

@ -404,6 +404,12 @@ int main(int argc, char *argv[]) {
}
}
if (ctx.high_temp == ctx.low_temp) {
fprintf(stderr, "high (%d) and low (%d) temperature must not be identical\n",
ctx.high_temp, ctx.low_temp);
return -1;
}
struct wl_display *display = wl_display_connect(NULL);
if (display == NULL) {
fprintf(stderr, "failed to create display\n");