1- From 586b8d1808d18149a872f0ee1dc8903b9f9e8750 Mon Sep 17 00:00:00 2001
1+ From e245f2d71d44d2a858517321a01d3ca71147042f Mon Sep 17 00:00:00 2001
22From: Michael Forney <mforney@mforney.org>
33Date: Sun, 7 Jul 2019 21:53:16 -0700
44Subject: [PATCH] Don't omit second operand to '?' operator
55
66---
7- src/kd_ioctl.c | 2 +-
8- src/open.c | 5 +++--
9- src/prctl.c | 8 ++++----
10- src/strace.c | 8 ++++----
11- src/strauss.c | 4 +++-
12- src/util.c | 2 +-
13- 6 files changed, 16 insertions(+), 13 deletions(-)
7+ src/open.c | 5 +++--
8+ src/prctl.c | 8 ++++----
9+ src/strace.c | 8 ++++----
10+ src/strauss.c | 4 +++-
11+ src/util.c | 2 +-
12+ 5 files changed, 15 insertions(+), 12 deletions(-)
1413
15- diff --git a/src/kd_ioctl.c b/src/kd_ioctl.c
16- index ada23d536..fddbd38fb 100644
17- --- a/src/kd_ioctl.c
18- +++ b/src/kd_ioctl.c
19- @@ -457,7 +457,7 @@ kd_kbd_str_entry(struct tcb *const tcp, const kernel_ulong_t arg,
20-
21- if (print_quoted_string((char *) val.kb_string,
22- MIN(max_strlen,
23- - (unsigned int) ret ?: sizeof(val.kb_string)),
24- + ret ? (unsigned int) ret : sizeof(val.kb_string)),
25- QUOTE_OMIT_TRAILING_0))
26- tprint_more_data_follows();
27-
2814diff --git a/src/open.c b/src/open.c
2915index 6356c5831..df59ea999 100644
3016--- a/src/open.c
@@ -42,10 +28,10 @@ index 6356c5831..df59ea999 100644
4228
4329 const char *
4430diff --git a/src/prctl.c b/src/prctl.c
45- index f6b4dd741..951133a83 100644
31+ index dbabb3a18..712715b98 100644
4632--- a/src/prctl.c
4733+++ b/src/prctl.c
48- @@ -92 ,10 +92 ,10 @@ sprint_sve_val(kernel_ulong_t arg, bool aux)
34+ @@ -98 ,10 +98 ,10 @@ sprint_sve_val(kernel_ulong_t arg, bool aux)
4935 if (!aux && flags && xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE)
5036 {
5137 xsprintf(out, "%#" PRI_klx " /* %s%s%#" PRI_klx " */",
@@ -58,7 +44,7 @@ index f6b4dd741..951133a83 100644
5844 }
5945
6046 return out;
61- @@ -128 ,10 +128 ,10 @@ sprint_sme_val(kernel_ulong_t arg, bool aux)
47+ @@ -134 ,10 +134 ,10 @@ sprint_sme_val(kernel_ulong_t arg, bool aux)
6248 if (!aux && flags && xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE)
6349 {
6450 xsprintf(out, "%#" PRI_klx " /* %s%s%#" PRI_klx " */",
@@ -72,10 +58,10 @@ index f6b4dd741..951133a83 100644
7258
7359 return out;
7460diff --git a/src/strace.c b/src/strace.c
75- index 9c87e34ed..13904f6e1 100644
61+ index 1a9d53bc8..9ac16c8c3 100644
7662--- a/src/strace.c
7763+++ b/src/strace.c
78- @@ -2609 ,7 +2609 ,7 @@ init(int argc, char *argv[])
64+ @@ -2649 ,7 +2649 ,7 @@ init(int argc, char *argv[])
7965 break;
8066 case GETOPT_TS:
8167 tflag_long_set = true;
@@ -84,7 +70,7 @@ index 9c87e34ed..13904f6e1 100644
8470 error_opt_arg(c, lopt, optarg);
8571 break;
8672 case 'T':
87- @@ -2683 ,7 +2683 ,7 @@ init(int argc, char *argv[])
73+ @@ -2723 ,7 +2723 ,7 @@ init(int argc, char *argv[])
8874 error_opt_arg(c, lopt, optarg);
8975 break;
9076 case GETOPT_TIPS:
@@ -93,7 +79,7 @@ index 9c87e34ed..13904f6e1 100644
9379 error_opt_arg(c, lopt, optarg);
9480 break;
9581 case GETOPT_ARGV0:
96- @@ -2729 ,10 +2729 ,10 @@ init(int argc, char *argv[])
82+ @@ -2772 ,10 +2772 ,10 @@ init(int argc, char *argv[])
9783 qualify_kvm(optarg);
9884 break;
9985 case GETOPT_QUAL_QUIET:
@@ -131,7 +117,7 @@ index bec85021b..5d49f950a 100644
131117 strauss[MIN(3 + i, strauss_lines - 1)]);
132118 }
133119diff --git a/src/util.c b/src/util.c
134- index efd390577..5e87559dc 100644
120+ index ada3ba76a..a88dd008d 100644
135121--- a/src/util.c
136122+++ b/src/util.c
137123@@ -640,7 +640,7 @@ printsocket(struct tcb *tcp, int fd, const char *path)
0 commit comments