[PATCH] staging: rtl8712: Replace snprintf with scnprintf

Dan Carpenter dan.carpenter at oracle.com
Wed Oct 2 12:06:22 UTC 2019


On Wed, Oct 02, 2019 at 05:12:14PM +0530, Rohit Sarkar wrote:
> On Wed, Oct 02, 2019 at 01:57:22PM +0300, Dan Carpenter wrote:
> > 
> > We could leave it as is or change it to "MAX_WPA_IE_LEN - 1".  But I
> > feel like the default should be to leave it as is unless there is a good
> > reason.
> 
> Makes sense, although greg has already merged this. I guess I will
> remove the redundant check then.

You could remove it, but I feel like it's better to check for
"== MAX_WPA_IE_LEN - 1".  They're effectively the same, but to me it
feels cleaner to be explicit how we're handling truncated data.

regards,
dan carpenter



More information about the devel mailing list