[hackers] [sbase] use struct literal instead of filling each field manually || Evan Gates

From: <git_AT_suckless.org>
Date: Wed, 25 Feb 2015 11:13:35 +0100 (CET)

commit cd7a1002b7082db4251eb9c5ba35f805a4269343
Author: Evan Gates <evan.gates_AT_gmail.com>
Date: Tue Feb 24 18:44:13 2015 -0800

    use struct literal instead of filling each field manually

diff --git a/find.c b/find.c
index 1461895..6dacc2c 100644
--- a/find.c
+++ b/find.c
_AT_@ -853,11 +853,8 @@ parse(int argc, char **argv)
          * if there was an expression but no -print, -exec, or -ok, add -a -print
          * in rpn, not infix
          */
- if (print) {
- out->u.pinfo = find_primary("-print");
- out->type = PRIM;
- out++;
- }
+ if (print)
+ *out++ = (Tok){ .u.pinfo = find_primary("-print"), .type = PRIM };
         if (print == 2)
                 *out++ = and;
 
Received on Wed Feb 25 2015 - 11:13:35 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 25 2015 - 11:24:14 CET