]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
index: follow libkmod coding style
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 2 Dec 2011 12:27:15 +0000 (10:27 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 2 Dec 2011 12:29:36 +0000 (10:29 -0200)
libkmod/libkmod-index.c
libkmod/libkmod-index.h

index 4f19f483f9395f56261dd0773e4f52f1e54208bc..a0f9e0b6dbf5e3c3bad5a727bc433a1fda23f753 100644 (file)
@@ -310,11 +310,12 @@ static struct index_node_f *index_readroot(struct index_file *in)
 static struct index_node_f *index_readchild(const struct index_node_f *parent,
                                            int ch)
 {
-       if (parent->first <= ch && ch <= parent->last)
+       if (parent->first <= ch && ch <= parent->last) {
                return index_read(parent->file,
                                       parent->children[ch - parent->first]);
-       else
-               return NULL;
+       }
+
+       return NULL;
 }
 
 static char *index_search__node(struct index_node_f *node, const char *key, int i)
@@ -333,6 +334,7 @@ static char *index_search__node(struct index_node_f *node, const char *key, int
                                return NULL;
                        }
                }
+
                i += j;
 
                if (key[i] == '\0') {
@@ -452,6 +454,7 @@ static void index_searchwild__node(struct index_node_f *node,
                                return;
                        }
                }
+
                i += j;
 
                child = index_readchild(node, '*');
index 8a8fd315d80469c01efb3f9d9c01b0d9e9b5a4ad..dc54e176962292f690871675e95ef287df2ef851 100644 (file)
@@ -16,8 +16,8 @@
     along with these programs.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifndef MODINITTOOLS_INDEX_H
-#define MODINITTOOLS_INDEX_H
+#ifndef _LIBKMOD_INDEX_H
+#define _LIBKMOD_INDEX_H
 
 #include <stdint.h>
 
@@ -162,4 +162,4 @@ struct index_value *index_searchwild(struct index_file *index, const char *key);
 
 void index_values_free(struct index_value *values);
 
-#endif /* MODINITTOOLS_INDEX_H */
+#endif