Skip to content

Commit

Permalink
Don't mix declarations and initializers
Browse files Browse the repository at this point in the history
- Declarations comes first, in alphabetical order.

- Initializers comes second, one per line, in alphabetical order.
  • Loading branch information
mptre committed Jun 15, 2016
1 parent 4feddcb commit 9f4d257
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/pick.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ get_choices(void)
char *
eager_strpbrk(const char *string, const char *separators)
{
char *ptr = NULL, *tmp_ptr;
char *tmp_ptr;
char *ptr = NULL;

for (tmp_ptr = strpbrk(string, separators);
tmp_ptr;
Expand All @@ -288,10 +289,11 @@ put_choice(const struct choice *choice)
const struct choice *
selected_choice(void)
{
size_t cursor_position, i, length, query_length, scroll = 0;
char buf[6];
int key, selection = 0, visible_choices_count;
int word_position;
size_t cursor_position, i, length, query_length;
size_t scroll = 0;
char buf[6];
int key, visible_choices_count, word_position;
int selection = 0;

cursor_position = query_length = strlen(query);

Expand Down

0 comments on commit 9f4d257

Please sign in to comment.