Arjen de Korte
2010-Oct-20 14:16 UTC
[Nut-upsdev] [nut-commits] svn commit r2594 - branches/bcmxcp/drivers
Citeren Chetan Agarwal <chetanagarwal-guest op alioth.debian.org>:> + sPartNumber[16] = 0;This is redundant. The snprintf function will take care of properly terminating the string with a '\0' character, you don't need to do that yourself.> + snprintf(sPartNumber, 16, "%s", answer + BCMXCP_CONFIG_BLOCK_PART_NUMBER);Don't hardcode '16' here, use 'sizeof(sPartNumber)' instead. Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected)