summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbhinav <abhinav.prsai@gmail.com>2025-06-04 20:09:17 +0100
committerAbhinav <abhinav.prsai@gmail.com>2025-06-04 20:09:17 +0100
commitdb5ec074ae55f99c86f145544c4d6039de543b54 (patch)
treec00cb0a74fbd74521510dcc1da1b5d6eb299ed1d /src
parent0582858f8693aa7455c4df5a7ff6440a5c31963d (diff)
formatting and remove warning
Diffstat (limited to 'src')
-rw-r--r--src/parser.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/parser.c b/src/parser.c
index e9b4d16..6b3185a 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -174,7 +174,7 @@ found:
char line[512];
int lineno = 0;
int should_floatn = 0;
- int torun = 0;
+ int torun = 0;
/* Initialize should_float matrix */
for (int j = 0; j < 256; j++) {
@@ -385,37 +385,37 @@ found:
win[len] = '\0';
char *final = strip(win);
- char *comma_ptr;
-
char *cmd = strip(final);
if (*cmd == '"') {
cmd++;
- } else {
- fprintf(stderr, "sxwmrc:%d: exec not enclosed in quotes", lineno);
- }
-
+ }
+ else {
+ fprintf(stderr, "sxwmrc:%d: exec not enclosed in quotes", lineno);
+ }
char *end = cmd + strlen(cmd) - 1;
if (*end == '"') {
*end = '\0';
- } else {
- fprintf(stderr, "sxwmrc:%d: exec not enclosed in quotes", lineno);
- }
-
- printf("DEBUG: exec command '%s'\n", cmd);
- cfg->torun[torun] = strdup(cmd);
-
- if (torun > 254) {
- fprintf(stderr, "sxwmrc:%d: too many execs", lineno);
- } else {
- torun++;
- }
- }
+ }
+ else {
+ fprintf(stderr, "sxwmrc:%d: exec not enclosed in quotes", lineno);
+ }
+
+ printf("DEBUG: exec command '%s'\n", cmd);
+ cfg->torun[torun] = strdup(cmd);
+
+ if (torun > 254) {
+ fprintf(stderr, "sxwmrc:%d: too many execs", lineno);
+ }
+ else {
+ torun++;
+ }
+ }
else {
fprintf(stderr, "sxwmrc:%d: unknown option '%s'\n", lineno, key);
}
}
-
+
fclose(f);
remap_and_dedupe_binds(cfg);
return 0;