bnxt_en: Extend maximum length of version string by 1 byte
authorSimon Horman <horms@kernel.org>
Tue, 13 Aug 2024 14:32:55 +0000 (15:32 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 15 Aug 2024 03:36:16 +0000 (20:36 -0700)
commitffff7ee843c351ce71d6e0d52f0f20bea35e18c9
treed6d7d066bead7e34178096cb32d1a968649ec138
parent2984e69a24affc8e5624069b7bb44593e09037e8
bnxt_en: Extend maximum length of version string by 1 byte

This corrects an out-by-one error in the maximum length of the package
version string. The size argument of snprintf includes space for the
trailing '\0' byte, so there is no need to allow extra space for it by
reducing the value of the size argument by 1.

Found by inspection.
Compile tested only.

Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20240813-bnxt-str-v2-1-872050a157e7@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c