Commit: 60aff70e6809d093530b67476501d46028d5f6ca
Parent: 7f1664f713b957a1cd58e8de1f533e416adb7d17
Author: Randy Palamar
Date: Sun, 2 Apr 2023 22:38:44 -0600
fix some incorrect assignments from moving flag parsing up
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sct.c b/sct.c
@@ -199,7 +199,8 @@ int
main(int argc, char **argv)
{
int screen, screens;
- int screen_specified, screen_first, screen_last, crtc_specified;
+ int screen_specified = -1, screen_first = 0, screen_last = -1;
+ int crtc_specified = -1;
struct temp_status temp = { .temp = DELTA_MIN, .brightness = -1.0 };
int dflag = 0;
@@ -238,10 +239,7 @@ main(int argc, char **argv)
die("XOpenDisplay: can't open display\n");
screens = XScreenCount(dpy);
- screen_first = 0;
screen_last = screens - 1;
- screen_specified = -1;
- crtc_specified = -1;
if (screen_specified >= screens) {
XCloseDisplay(dpy);