From: Lucas De Marchi Date: Fri, 2 Dec 2011 12:27:15 +0000 (-0200) Subject: index: follow libkmod coding style X-Git-Tag: v1~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e71970ae44c750d8b1658f4984ff82eb266fddcd;p=thirdparty%2Fkmod.git index: follow libkmod coding style --- diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c index 4f19f483..a0f9e0b6 100644 --- a/libkmod/libkmod-index.c +++ b/libkmod/libkmod-index.c @@ -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, '*'); diff --git a/libkmod/libkmod-index.h b/libkmod/libkmod-index.h index 8a8fd315..dc54e176 100644 --- a/libkmod/libkmod-index.h +++ b/libkmod/libkmod-index.h @@ -16,8 +16,8 @@ along with these programs. If not, see . */ -#ifndef MODINITTOOLS_INDEX_H -#define MODINITTOOLS_INDEX_H +#ifndef _LIBKMOD_INDEX_H +#define _LIBKMOD_INDEX_H #include @@ -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