On 05/09/2016 03:30 PM, Douglas Gilbert wrote:> The maximum return value
from the first scnprintf(sdebug_info ...)
is (sizeof(sdebug_info) - 1)). So strictly speaking the early return
comparison should be "==" for scnprintf and ">=" for snprintf. Given
that snprintf is more dangerous then scnprintf (e.g. with repeated
"k += snprintf(buff + k, buff_len - k, ...)" statements) then I would
prefer to keep scnprintf and yes, ">=" is overkill but will work.
Thanks for the feedback. I'm fine with the other changes in this patch,
hence:
Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html