Skip to content

Commit 48a1bd9

Browse files
committed
knfmt
Ignore-Rev: yes
1 parent 5b7a684 commit 48a1bd9

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

pick.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ selected_choice(void)
299299
}
300300

301301
tty_putp(cursor_invisible, 0);
302-
tty_putp(carriage_return, 1); /* move cursor to first column */
302+
tty_putp(carriage_return, 1); /* move cursor to first column */
303303
if (cursor_position >= tty_columns)
304304
xscroll = cursor_position - tty_columns + 1;
305305
else
@@ -310,7 +310,7 @@ selected_choice(void)
310310
yscroll = selection - choices_lines + 1;
311311
choices_count = print_choices(yscroll, selection);
312312
}
313-
tty_putp(carriage_return, 1); /* move cursor to first column */
313+
tty_putp(carriage_return, 1); /* move cursor to first column */
314314
for (i = j = 0; i < cursor_position; j++)
315315
while (isu8cont(query[++i]))
316316
continue;
@@ -463,10 +463,11 @@ selected_choice(void)
463463
err(1, NULL);
464464
}
465465

466-
if (cursor_position < query_length)
466+
if (cursor_position < query_length) {
467467
memmove(query + cursor_position + length,
468468
query + cursor_position,
469469
query_length - cursor_position);
470+
}
470471

471472
memcpy(query + cursor_position, buf, length);
472473
cursor_position += length;
@@ -834,10 +835,11 @@ print_choices(size_t offset, size_t selection)
834835
if (choice->score == 0 && query_length > 0)
835836
break;
836837

837-
if (i - offset < choices_lines)
838+
if (i - offset < choices_lines) {
838839
print_line(choice->string, choice->length,
839840
i == selection, choice->match_start,
840841
choice->match_end);
842+
}
841843
}
842844

843845
if (i - offset < choices.length && i - offset < choices_lines) {

pty.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
#include <termios.h>
1616
#include <unistd.h>
1717

18-
__dead static void child(int, int, int, char **);
18+
static __dead void child(int, int, int, char **);
1919
static void parent(int, int, const char *);
2020
static char *parsekeys(const char *);
2121
static void sighandler(int);
22-
__dead static void usage(void);
22+
static __dead void usage(void);
2323

2424
/*
2525
* Mandatory environment variables required by pick to operate correctly.
@@ -85,7 +85,7 @@ main(int argc, char *argv[])
8585
return 0;
8686
}
8787

88-
__dead static void
88+
static __dead void
8989
usage(void)
9090
{
9191
fprintf(stderr, "usage: pick-test [-k path] -- utility "
@@ -142,7 +142,7 @@ sighandler(int sig)
142142
gotsig = sig == SIGCHLD;
143143
}
144144

145-
__dead static void
145+
static __dead void
146146
child(int master, int slave, int argc, char **argv)
147147
{
148148
const char **env;

0 commit comments

Comments
 (0)