Citeren Chetan Agarwal <[email protected]>:
+ 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) _______________________________________________ Nut-upsdev mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
