]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Fix coding style
authorJohan Malm <jgm323@gmail.com>
Fri, 24 Sep 2021 21:14:04 +0000 (22:14 +0100)
committerJohan Malm <jgm323@gmail.com>
Fri, 24 Sep 2021 21:14:04 +0000 (22:14 +0100)
src/common/dir.c
src/common/grab-file.c
src/menu/menu.c

index 150005181c4b43f86dfa6a35c5380bd17b927cba..616c96da5498ba6994a5d707de18389e4d17bacb 100644 (file)
@@ -94,7 +94,8 @@ find_dir(struct ctx *ctx)
                        if (!prefix) {
                                continue;
                        }
-                       gchar **prefixes = g_strsplit(prefix, ":", -1);
+                       gchar **prefixes;
+                       prefixes = g_strsplit(prefix, ":", -1);
                        for (gchar **p = prefixes; *p; p++) {
                                ctx->build_path_fn(ctx, *p, d.path);
                                if (debug) {
index 13f01cd5597974509316c087ec62ae2d43aab60f..aad0b489b2d333515cd055a96ca4291f40835e23 100644 (file)
@@ -30,5 +30,5 @@ grab_file(const char *filename)
        }
        free(line);
        fclose(stream);
-       return (buffer.buf);
+       return buffer.buf;
 }
index e226a5165e8a00e35c2e3cef70d184fd658f63dd..d6db59093d5951039148e5ba01709484851ab185 100644 (file)
@@ -20,7 +20,7 @@
 #include "theme.h"
 
 /* state-machine variables for processing <item></item> */
-static bool in_item = false;
+static bool in_item;
 static struct menuitem *current_item;
 
 #define MENUWIDTH (110)
@@ -88,7 +88,7 @@ static void fill_item(char *nodename, char *content, struct menu *menu)
 static void
 entry(xmlNode *node, char *nodename, char *content, struct menu *menu)
 {
-       static bool in_root_menu = false;
+       static bool in_root_menu;
 
        if (!nodename) {
                return;
@@ -130,8 +130,10 @@ static void xml_tree_walk(xmlNode *node, struct menu *menu);
 static void
 traverse(xmlNode *n, struct menu *menu)
 {
+       xmlAttr *attr;
+
        process_node(n, menu);
-       for (xmlAttr *attr = n->properties; attr; attr = attr->next) {
+       for (attr = n->properties; attr; attr = attr->next) {
                xml_tree_walk(attr->children, menu);
        }
        xml_tree_walk(n->children, menu);