Skip to content

Commit a677b94

Browse files
committed
Minor, coding style fixes
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 6552cda commit a677b94

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/exec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ int run(char *cmd, char *log)
199199
int run_interactive(char *cmd, char *fmt, ...)
200200
{
201201
int status, oldout = 1, olderr = 2;
202-
char line[LINE_SIZE];
203202
FILE *fp;
204203

205204
if (!cmd) {
@@ -244,6 +243,7 @@ int run_interactive(char *cmd, char *fmt, ...)
244243

245244
/* Dump any results of cmd on stderr after we've printed [ OK ] or [FAIL] */
246245
if (fp && !debug) {
246+
char line[LINE_SIZE];
247247
size_t len, written;
248248

249249
rewind(fp);
@@ -281,7 +281,7 @@ int exec_runtask(char *cmd, char *args[])
281281
return execvp(_PATH_BSHELL, argv);
282282
}
283283

284-
static void prepare_tty(char *tty, speed_t speed, char *procname, struct rlimit rlimit[])
284+
static void prepare_tty(char *tty, speed_t speed, const char *procname, struct rlimit rlimit[])
285285
{
286286
char name[80];
287287
int fd, dummy;
@@ -351,7 +351,7 @@ static int activate_console(int noclear, int nowait)
351351
dprint(STDERR_FILENO, clr, strlen(clr));
352352
dprint(STDERR_FILENO, msg, strlen(msg));
353353
while ((rc = read(STDIN_FILENO, &ch, 1)) > 0 && ch != '\r' && ch != '\n')
354-
continue;
354+
;
355355

356356
/* On any error (likely EINTR), we avoid starting getty */
357357
if (rc == -1)

src/tty.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,9 @@ int tty_parse_args(struct tty *tty, char *cmd, char **args)
229229
return errno = EINVAL;
230230
}
231231

232-
dbg("Registering %s getty on TTY %s at %s baud with term %s", tty->cmd ? "external" : "built-in",
233-
tty->dev, tty->baud ?: "0", tty->term ?: "N/A");
232+
dbg("Registering %s getty on TTY %s at %s baud with term %s",
233+
tty->cmd ? "external" : "built-in",
234+
tty->dev, tty->baud ?: "0", tty->term ?: "N/A");
234235

235236
/* Built-in getty now comes as standalone program */
236237
if (!tty->cmd) {

0 commit comments

Comments
 (0)