mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
Use macros for exit values
This commit is contained in:
parent
01617131f1
commit
3ba33321de
4 changed files with 8 additions and 8 deletions
|
@ -90,7 +90,7 @@ int main(int argc, char **argv) {
|
||||||
#else
|
#else
|
||||||
fprintf(stdout, "version not detected\n");
|
fprintf(stdout, "version not detected\n");
|
||||||
#endif
|
#endif
|
||||||
exit(0);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
case 'V': // verbose
|
case 'V': // verbose
|
||||||
verbose = 1;
|
verbose = 1;
|
||||||
|
@ -98,10 +98,10 @@ int main(int argc, char **argv) {
|
||||||
case 'p': ; // --get-socketpath
|
case 'p': ; // --get-socketpath
|
||||||
if (getenv("SWAYSOCK")) {
|
if (getenv("SWAYSOCK")) {
|
||||||
fprintf(stdout, "%s\n", getenv("SWAYSOCK"));
|
fprintf(stdout, "%s\n", getenv("SWAYSOCK"));
|
||||||
exit(0);
|
exit(EXIT_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "sway socket not detected.\n");
|
fprintf(stderr, "sway socket not detected.\n");
|
||||||
exit(1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ void sway_terminate(void) {
|
||||||
}
|
}
|
||||||
list_free(surfaces);
|
list_free(surfaces);
|
||||||
registry_teardown(registry);
|
registry_teardown(registry);
|
||||||
exit(1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, const char **argv) {
|
int main(int argc, const char **argv) {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "ipc-client.h"
|
#include "ipc-client.h"
|
||||||
|
|
||||||
void sway_terminate(void) {
|
void sway_terminate(void) {
|
||||||
exit(1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int numlen(int n) {
|
int numlen(int n) {
|
||||||
|
@ -163,7 +163,7 @@ int main(int argc, char **argv) {
|
||||||
#else
|
#else
|
||||||
fprintf(stdout, "version not detected\n");
|
fprintf(stdout, "version not detected\n");
|
||||||
#endif
|
#endif
|
||||||
exit(0);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
void sway_terminate(void) {
|
void sway_terminate(void) {
|
||||||
exit(1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
@ -52,7 +52,7 @@ int main(int argc, char **argv) {
|
||||||
#else
|
#else
|
||||||
fprintf(stdout, "version not detected\n");
|
fprintf(stdout, "version not detected\n");
|
||||||
#endif
|
#endif
|
||||||
exit(0);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue