From 91416fc49ab5d8b5f6a266465d915110ad3df120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 27 Jan 2017 15:36:38 +0100 Subject: [PATCH] ver.c: fix hwcmp to match exact string Previously for example 'ver hwcmp PX4FMU_V4PRO' matched on PX4FMU_V4 hardware too. --- src/systemcmds/ver/ver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemcmds/ver/ver.c b/src/systemcmds/ver/ver.c index 2addd45e13..7af6bab40c 100644 --- a/src/systemcmds/ver/ver.c +++ b/src/systemcmds/ver/ver.c @@ -82,7 +82,7 @@ int ver_main(int argc, char *argv[]) if (argc >= 3 && argv[2] != NULL) { /* compare 3rd parameter with px4_board_name() string, in case of match, return 0 */ const char *board_name = px4_board_name(); - ret = strncmp(board_name, argv[2], strlen(board_name)); + ret = strcmp(board_name, argv[2]); if (ret == 0) { PX4_INFO("match: %s", board_name);