From bed1c78ac0c0d105b373259df3e65681fcc0d680 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 4 Dec 2017 12:31:53 -0800 Subject: Use NULL rather than 0 in vargs. Top bits count too! --- toys/pending/stty.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'toys/pending/stty.c') diff --git a/toys/pending/stty.c b/toys/pending/stty.c index 315ff16d..4ed33ce1 100644 --- a/toys/pending/stty.c +++ b/toys/pending/stty.c @@ -357,7 +357,7 @@ static void make_sane(struct termios *t) "-ixoff", "-iutf8", "-iuclc", "-ixany", "imaxbel", "-xcase", "-olcuc", "-ocrnl", "opost", "-ofill", "onlcr", "-onocr", "-onlret", "nl0", "cr0", "tab0", "bs0", "vt0", "ff0", "isig", "-tostop", "-ofdel", "-echoprt", - "echoctl", "echoke", "-extproc", "-flusho", "cs8", 0); + "echoctl", "echoke", "-extproc", "-flusho", "cs8", NULL); memset(t->c_cc, 0, NCCS); t->c_cc[VINTR] = 0x3; t->c_cc[VQUIT] = 0x1c; @@ -423,25 +423,25 @@ static void do_stty() // Already done as a side effect. } else if (!strcmp(arg, "cooked")) { set_options(&new, "brkint", "ignpar", "istrip", "icrnl", "ixon", - "opost", "isig", "icanon", 0); + "opost", "isig", "icanon", NULL); } else if (!strcmp(arg, "evenp") || !strcmp(arg, "parity")) { - set_options(&new, "parenb", "cs7", "-parodd", 0); + set_options(&new, "parenb", "cs7", "-parodd", NULL); } else if (!strcmp(arg, "oddp")) { - set_options(&new, "parenb", "cs7", "parodd", 0); + set_options(&new, "parenb", "cs7", "parodd", NULL); } else if (!strcmp(arg, "-parity") || !strcmp(arg, "-evenp") || !strcmp(arg, "-oddp")) { - set_options(&new, "-parenb", "cs8", 0); + set_options(&new, "-parenb", "cs8", NULL); } else if (!strcmp(arg, "raw")) { // POSIX and "man stty" differ wildly. This is "man stty". set_options(&new, "-ignbrk", "-brkint", "-ignpar", "-parmrk", "-inpck", "-istrip", "-inlcr", "-igncr", "-icrnl", "-ixon", "-ixoff", "-iuclc", - "-ixany", "-imaxbel", "-opost", "-isig", "-icanon", "-xcase", 0); + "-ixany", "-imaxbel", "-opost", "-isig", "-icanon", "-xcase", NULL); new.c_cc[VMIN] = 1; new.c_cc[VTIME] = 0; } else if (!strcmp(arg, "nl")) { - set_options(&new, "-icrnl", "-ocrnl", 0); + set_options(&new, "-icrnl", "-ocrnl", NULL); } else if (!strcmp(arg, "-nl")) { - set_options(&new, "icrnl", "ocrnl", "-inlcr", "-igncr", 0); + set_options(&new, "icrnl", "ocrnl", "-inlcr", "-igncr", NULL); } else if (!strcmp(arg, "ek")) { new.c_cc[VERASE] = 0x7f; new.c_cc[VKILL] = 0x15; -- cgit v1.2.3