diff options
Diffstat (limited to 'swaynag/main.c')
-rw-r--r-- | swaynag/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/swaynag/main.c b/swaynag/main.c index 88007818..0c94cb1a 100644 --- a/swaynag/main.c +++ b/swaynag/main.c | |||
@@ -32,12 +32,20 @@ int main(int argc, char **argv) { | |||
32 | 32 | ||
33 | struct swaynag_button *button_close = | 33 | struct swaynag_button *button_close = |
34 | calloc(sizeof(struct swaynag_button), 1); | 34 | calloc(sizeof(struct swaynag_button), 1); |
35 | if (!button_close) { | ||
36 | perror("calloc"); | ||
37 | return EXIT_FAILURE; | ||
38 | } | ||
35 | button_close->text = strdup("X"); | 39 | button_close->text = strdup("X"); |
36 | button_close->type = SWAYNAG_ACTION_DISMISS; | 40 | button_close->type = SWAYNAG_ACTION_DISMISS; |
37 | list_add(swaynag.buttons, button_close); | 41 | list_add(swaynag.buttons, button_close); |
38 | 42 | ||
39 | swaynag.details.button_details = | 43 | swaynag.details.button_details = |
40 | calloc(sizeof(struct swaynag_button), 1); | 44 | calloc(sizeof(struct swaynag_button), 1); |
45 | if (!swaynag.details.button_details) { | ||
46 | perror("calloc"); | ||
47 | return EXIT_FAILURE; | ||
48 | } | ||
41 | swaynag.details.button_details->text = strdup("Toggle details"); | 49 | swaynag.details.button_details->text = strdup("Toggle details"); |
42 | swaynag.details.button_details->type = SWAYNAG_ACTION_EXPAND; | 50 | swaynag.details.button_details->type = SWAYNAG_ACTION_EXPAND; |
43 | 51 | ||