Skip to content

Commit

Permalink
kconfig: minor style fixes in symbol-search code
Browse files Browse the repository at this point in the history
Two minor style fixes:
  - no space before/after parenthesis in function definition
  - no {} for single-line if()

And one grammar fix in a comment.

Reported-by: Jean Delvare <[email protected]>
Signed-off-by: "Yann E. MORIN" <[email protected]>
Cc: Jean Delvare <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
  • Loading branch information
yann-morin-1998 committed Jul 16, 2013
1 parent f6eb6e4 commit 803b351
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ struct sym_match {
* - first, symbols that match exactly
* - then, alphabetical sort
*/
static int sym_rel_comp( const void *sym1, const void *sym2 )
static int sym_rel_comp(const void *sym1, const void *sym2)
{
struct sym_match *s1 = *(struct sym_match **)sym1;
struct sym_match *s2 = *(struct sym_match **)sym2;
Expand Down Expand Up @@ -1014,17 +1014,16 @@ struct symbol **sym_re_search(const char *pattern)
void *tmp;
size += 16;
tmp = realloc(sym_match_arr, size * sizeof(struct sym_match *));
if (!tmp) {
if (!tmp)
goto sym_re_search_free;
}
sym_match_arr = tmp;
}
sym_calc_value(sym);
tmp_sym_match = (struct sym_match*)malloc(sizeof(struct sym_match));
if (!tmp_sym_match)
goto sym_re_search_free;
tmp_sym_match->sym = sym;
/* As regexec return 0, we know we have a match, so
/* As regexec returned 0, we know we have a match, so
* we can use match[0].rm_[se]o without further checks
*/
tmp_sym_match->so = match[0].rm_so;
Expand Down

0 comments on commit 803b351

Please sign in to comment.