reduce strstr use in xkb parser
authorMike Blumenkrantz <zmike@samsung.com>
Fri, 4 Apr 2014 19:14:08 +0000 (15:14 -0400)
committerMike Blumenkrantz <zmike@samsung.com>
Fri, 4 Apr 2014 19:14:08 +0000 (15:14 -0400)
CID 1039849

src/modules/xkbswitch/e_mod_parse.c

index 6f815e443d5321a2a9e1cf869d35127d6aa7ae26..fa21d35bc874019554278786594cb8095afddc40 100644 (file)
@@ -236,9 +236,9 @@ parse_rules(void)
                      /* A hack to get it to parse right if
                       * the group name contains a space
                       */
-                     if (strstr(p, "  "))
+                     p = strstr(p, "  ");
+                     if (p)
                        {
-                          p = strstr(p, "  ");
                           while (p[0] == ' ')
                             ++p;
                        }