summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwmtimestatus.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/dwmtimestatus.c b/dwmtimestatus.c
index cd5c879..044e9e7 100644
--- a/dwmtimestatus.c
+++ b/dwmtimestatus.c
@@ -23,7 +23,12 @@ struct status{
struct sigaction *s_act = NULL;
struct status current_status = {0};
-XTextProperty status_props = {0};
+XTextProperty status_props = {
+ .value = (unsigned char*)&current_status.status,
+ .encoding = XA_STRING,
+ .format = 8,
+ .nitems = 0
+};
void sighandler( int si_code, siginfo_t *si_info, void *si_adr ){
int exit_status = EXIT_SUCCESS;
@@ -103,10 +108,6 @@ int main( int argc, char **args ){
assert( sigaction(SIGTERM, (const struct sigaction*)s_act, NULL) != -1 );
assert( sigaction(SIGPIPE, (const struct sigaction*)s_act, NULL) != -1 );
memset( (void*)&current_status, 0, sizeof(struct status) );
- memset( (void*)&status_props, 0, sizeof(XTextProperty) );
- status_props.value = (unsigned char*)&current_status.status;
- status_props.encoding = XA_STRING;
- status_props.format = 8;
const char *optstring = "i:d:f:";
int opt_char = 0;
while ( (opt_char = getopt(argc, args, optstring)) != -1 ){