diff options
| author | Devin J. Pohly <djpohly@gmail.com> | 2020-04-23 22:20:54 -0500 | 
|---|---|---|
| committer | Devin J. Pohly <djpohly@gmail.com> | 2020-04-23 23:35:54 -0500 | 
| commit | 60c887f3c0f24c01d53d0adaf0cc4027dc629340 (patch) | |
| tree | 6731286ce776cf474eee09ba111858d80621ec6e /dwl.c | |
| parent | 84da7b4470e45cc09602028797abad55d3d6148b (diff) | |
use exit code macros everywhere
Diffstat (limited to 'dwl.c')
| -rw-r--r-- | dwl.c | 14 | 
1 files changed, 7 insertions, 7 deletions
| @@ -924,7 +924,7 @@ run(char *startup_cmd)  	const char *socket = wl_display_add_socket_auto(dpy);  	if (!socket) {  		wlr_backend_destroy(backend); -		exit(1); +		exit(EXIT_FAILURE);  	}  	/* Start the backend. This will enumerate outputs and inputs, become the DRM @@ -932,7 +932,7 @@ run(char *startup_cmd)  	if (!wlr_backend_start(backend)) {  		wlr_backend_destroy(backend);  		wl_display_destroy(dpy); -		exit(1); +		exit(EXIT_FAILURE);  	}  	/* Now that outputs are initialized, choose initial selmon based on @@ -952,13 +952,13 @@ run(char *startup_cmd)  		if (startup_pid < 0) {  			perror("startup: fork");  			wl_display_destroy(dpy); -			exit(1); +			exit(EXIT_FAILURE);  		}  		if (startup_pid == 0) {  			execl("/bin/sh", "/bin/sh", "-c", startup_cmd, (void *)NULL);  			perror("startup: execl");  			wl_display_destroy(dpy); -			exit(1); +			exit(EXIT_FAILURE);  		}  	}  	/* Run the Wayland event loop. This does not return until you exit the @@ -1323,12 +1323,12 @@ main(int argc, char *argv[])  			break;  		default:  			printf("Usage: %s [-s startup command]\n", argv[0]); -			return 0; +			return EXIT_FAILURE;  		}  	}  	if (optind < argc) {  		printf("Usage: %s [-s startup command]\n", argv[0]); -		return 0; +		return EXIT_FAILURE;  	}  	/* The Wayland display is managed by libwayland. It handles accepting @@ -1341,5 +1341,5 @@ main(int argc, char *argv[])  	/* Once wl_display_run returns, we shut down the server. */  	wl_display_destroy_clients(dpy);  	wl_display_destroy(dpy); -	return 0; +	return EXIT_SUCCESS;  } | 
