summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstderr64 <stderr64@null.net>2026-06-11 15:52:28 +0300
committerstderr64 <stderr64@null.net>2026-06-11 15:52:28 +0300
commite3f4c754edc461a04a679d0d52dedc2be718ad06 (patch)
treeefee0050f7ff5a6eaae0c405562cf0e918f071ca
parent0e75d8366bbd6b287a6804758177fc47fc89062d (diff)
downloaddwmtimestatus-master.tar.gz
dwmtimestatus-master.tar.zst
Only initialize current_status struct once with memset HEAD master
-rw-r--r--.gitignore1
-rw-r--r--dwmtimestatus.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 1377554..1d89776 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
+dwmtimestatus
*.swp
diff --git a/dwmtimestatus.c b/dwmtimestatus.c
index 3408e8c..3bf0fda 100644
--- a/dwmtimestatus.c
+++ b/dwmtimestatus.c
@@ -102,7 +102,7 @@ int main( int argc, char **args ){
assert( sigaction(SIGINT, (const struct sigaction*)s_act, NULL) != -1 );
assert( sigaction(SIGTERM, (const struct sigaction*)s_act, NULL) != -1 );
assert( sigaction(SIGPIPE, (const struct sigaction*)s_act, NULL) != -1 );
- struct status current_status = {0};
+ struct status current_status;
memset( (void*)&current_status, 0, sizeof(struct status) );
const char *optstring = "i:d:f:";
int opt_char = 0;