]> git.mdlowis.com Git - proto/labwc.git/commitdiff
CodeStyle
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 9 Jan 2022 04:48:27 +0000 (05:48 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 9 Jan 2022 06:37:39 +0000 (06:37 +0000)
src/common/nodename.c
src/config/mousebind.c
src/config/rcxml.c
src/cursor.c
src/menu/menu.c

index 486598697a610b4c444fd6d179f0ded771135972..3c6e2446903a2d04657d994f44e46581cc1e3e4b 100644 (file)
@@ -22,8 +22,9 @@ nodename(xmlNode *node, char *buf, int len)
                char c;
                while ((c = *name++) != 0) {
                        *p++ = tolower(c);
-                       if (!--len)
+                       if (!--len) {
                                return buf;
+                       }
                }
                *p = 0;
                node = node->parent;
index fdbd34d08f2d8655ae9dc4e924b3f7eb360edfc5..37962c3e271d9bb9f23c0069a8b9d1890e114909 100644 (file)
@@ -18,8 +18,9 @@ mousebind_button_from_str(const char *str, uint32_t *modifiers)
                while (strlen(str) >= 2 && str[1] == '-') {
                        char modname[2] = {str[0], 0};
                        uint32_t parsed_modifier = parse_modifier(modname);
-                       if (!parsed_modifier)
+                       if (!parsed_modifier) {
                                goto invalid;
+                       }
                        *modifiers |= parsed_modifier;
                        str += 2;
                }
index 5bf6e8114dfbb0daef466caa476ae99fd1f083fd..a0bd9397aa4c792b99a00f6e3246eb899f46e9f7 100644 (file)
@@ -660,8 +660,9 @@ rcxml_read(const char *filename)
        buf_init(&b);
        while (getline(&line, &len, stream) != -1) {
                char *p = strrchr(line, '\n');
-               if (p)
+               if (p) {
                        *p = '\0';
+               }
                buf_add(&b, line);
        }
        free(line);
index 6e4475d12206f98f906021c3bca19bc12a5eae7d..204d762bb1dda770506387c61aabba7741ac0664 100644 (file)
@@ -481,8 +481,9 @@ handle_release_mousebinding(struct view *view, struct server *server,
                        case MOUSE_ACTION_RELEASE:
                                break;
                        case MOUSE_ACTION_CLICK:
-                               if (mousebind->pressed_in_context)
+                               if (mousebind->pressed_in_context) {
                                        break;
+                               }
                                continue;
                        default:
                                continue;
@@ -497,8 +498,9 @@ handle_release_mousebinding(struct view *view, struct server *server,
         * regardless of whether activated or not
         */
        wl_list_for_each(mousebind, &rc.mousebinds, link) {
-               if (mousebind->button == button)
+               if (mousebind->button == button) {
                        mousebind->pressed_in_context = false;
+               }
        }
        return activated_any && activated_any_frame;
 }
@@ -551,12 +553,14 @@ handle_press_mousebinding(struct view *view, struct server *server,
                                 * the release event, unless the press event is
                                 * counted as a DOUBLECLICK.
                                 */
-                               if (!double_click)
+                               if (!double_click) {
                                        mousebind->pressed_in_context = true;
+                               }
                                continue;
                        case MOUSE_ACTION_DOUBLECLICK:
-                               if (!double_click)
+                               if (!double_click) {
                                        continue;
+                               }
                                break;
                        case MOUSE_ACTION_PRESS:
                                break;
index 328f4183433bd806f97386326a57326bbdb131b5..ef28392df34c48e34dc79e710a44dab8cc8735ae 100644 (file)
@@ -261,8 +261,9 @@ parse_xml(const char *filename, struct server *server)
        buf_init(&b);
        while (getline(&line, &len, stream) != -1) {
                char *p = strrchr(line, '\n');
-               if (p)
+               if (p) {
                        *p = '\0';
+               }
                buf_add(&b, line);
        }
        free(line);