diff options
author | Richard Palethorpe <rpalethorpe@suse.com> | 2020-05-12 15:28:23 +0100 |
---|---|---|
committer | Petr Vorel <pvorel@suse.cz> | 2020-05-13 10:19:39 +0200 |
commit | 578091e55524a9bd997fb4fc1471ceab7bdaf13f (patch) | |
tree | 50567d34d8ad223d8d4486a844da6c89bc1253e7 /testcases | |
parent | a957b18062f6bab17b1b424a52554fe71a479cf1 (diff) |
pty04: Remove unnecessary volatile and style fix
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Diffstat (limited to 'testcases')
-rw-r--r-- | testcases/kernel/pty/pty04.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testcases/kernel/pty/pty04.c b/testcases/kernel/pty/pty04.c index 252babe92..4e16707e3 100644 --- a/testcases/kernel/pty/pty04.c +++ b/testcases/kernel/pty/pty04.c @@ -92,7 +92,7 @@ static struct ldisc_info ldiscs[] = { {N_SLCAN, "N_SLCAN", CAN_MTU}, }; -static volatile int ptmx, pts, sk, mtu, no_check; +static int ptmx, pts, sk, mtu, no_check; static int set_ldisc(int tty, const struct ldisc_info *ldisc) { @@ -173,13 +173,15 @@ static void write_pty(const struct ldisc_info *ldisc) written = 0; - ret = TST_RETRY_FUNC(try_write(ptmx, data, len, &written), TST_RETVAL_NOTNULL); + ret = TST_RETRY_FUNC(try_write(ptmx, data, len, &written), + TST_RETVAL_NOTNULL); if (ret < 0) tst_brk(TBROK | TERRNO, "Failed 1st write to PTY"); tst_res(TPASS, "Wrote PTY 1"); written = 0; - ret = TST_RETRY_FUNC(try_write(ptmx, data, len, &written), TST_RETVAL_NOTNULL); + ret = TST_RETRY_FUNC(try_write(ptmx, data, len, &written), + TST_RETVAL_NOTNULL); if (ret < 0) tst_brk(TBROK | TERRNO, "Failed 2nd write to PTY"); @@ -312,7 +314,7 @@ static void read_netdev(const struct ldisc_info *ldisc) tst_res(TPASS, "Read netdev 2"); TST_CHECKPOINT_WAKE(0); - while((rlen = read(sk, data, plen)) > 0) + while ((rlen = read(sk, data, plen)) > 0) check_data(ldisc, data, rlen); tst_res(TPASS, "Reading data from netdev interrupted by hangup"); |