shithub: orca

Download patch

ref: 691ec7d34cc9cb9237f808de079cc4a947bbd23a
parent: 1328b599385bb0e00fa6638cc7dff941970ebc4d
author: cancel <cancel@cancel.fm>
date: Thu Jan 23 19:23:36 EST 2020

Cleanup

--- a/term_util.c
+++ b/term_util.c
@@ -126,10 +126,8 @@
 }
 
 void qblock_init(Qblock *qb, Qblock_type_tag tag) {
+  *qb = (Qblock){0};
   qb->tag = tag;
-  qb->outer_window = NULL;
-  qb->content_window = NULL;
-  qb->title = NULL;
 }
 
 void qmenu_free(Qmenu *qm);
@@ -275,7 +273,7 @@
 }
 
 bool qmsg_drive(Qmsg *qm, int key, Qmsg_action *out_action) {
-  memset(out_action, 0, sizeof(Qmsg_action));
+  *out_action = (Qmsg_action){0};
   Qmsg_dismiss_mode dm = qm->dismiss_mode;
   switch (dm) {
   case Qmsg_dismiss_mode_explicitly: