[PATCH iproute2 v3] iplink_can: add missing `]' of the bitrate, dbitrate and termination arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The command "ip --details link show canX" misses the closing bracket
`]' of the bitrate, the dbitrate and the termination arrays. The --json
output is not impacted.

Change the first argument of close_json_array() from PRINT_JSON to
PRINT_ANY to fix the problem. The second argument was already set
correctly.

Fixes: 67f3c7a5cc0d ("iplink_can: use PRINT_ANY to factorize code and fix signedness")
Reported-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
Acked-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
Signed-off-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
---

I just realized that I forgot to adjust the subject prefix to point to
iproute2. So here is the v3. Sorry for the noise.

** Changelog **

v2 -> v3

  * no change in code.
  * Set the subject prefix to [PATCH iproute2] instead of [PATCH].

v1 -> v2

  * no change in code.
  * Remove garbage text due to copy/paste mistake in the Reported-by
    tag of the commit message.
  * add Acked-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>.
---
 ip/iplink_can.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ip/iplink_can.c b/ip/iplink_can.c
index 0e670a6c..9bbe3d95 100644
--- a/ip/iplink_can.c
+++ b/ip/iplink_can.c
@@ -519,7 +519,7 @@ static void can_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 				   i < bitrate_cnt - 1 ? "%8u, " : "%8u",
 				   bitrate_const[i]);
 		}
-		close_json_array(PRINT_JSON, " ]");
+		close_json_array(PRINT_ANY, " ]");
 	}
 
 	/* data bittiming is irrelevant if fixed bitrate is defined */
@@ -606,7 +606,7 @@ static void can_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 				   i < dbitrate_cnt - 1 ? "%8u, " : "%8u",
 				   dbitrate_const[i]);
 		}
-		close_json_array(PRINT_JSON, " ]");
+		close_json_array(PRINT_ANY, " ]");
 	}
 
 	if (tb[IFLA_CAN_TERMINATION_CONST] && tb[IFLA_CAN_TERMINATION]) {
@@ -623,7 +623,7 @@ static void can_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 			print_hu(PRINT_ANY, NULL,
 				 i < trm_cnt - 1 ? "%hu, " : "%hu",
 				 trm_const[i]);
-		close_json_array(PRINT_JSON, " ]");
+		close_json_array(PRINT_ANY, " ]");
 	}
 
 	if (tb[IFLA_CAN_CLOCK]) {
-- 
2.35.1




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux