All of lore.kernel.org
 help / color / mirror / Atom feed
* staging/rtl8192[eu]
@ 2014-08-06 10:18 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2014-08-06 10:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, linux-kernel; +Cc: Joe Perches

Hello,

Is anyone actually interested in the files:

drivers/staging/rtl8192e/rtllib_softmac.c
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c

Both contain the following code:

        if (param->u.wpa_ie.len > MAX_WPA_IE_LEN ||
           (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL))
                return -EINVAL;

and

       if (param->u.crypt.alg != NULL) {
                memcpy(sec.keys[param->u.crypt.idx],
                       param->u.crypt.key,
                       param->u.crypt.key_len);

In each case, the NULL test has a trivial result, because the requested
field is an array inlined within a structure.  In the first case, the
array has size 0, so I guess the intent is to see whether some more space
has been allocated, and in the second case the array contains a string, so
I guess the intent is to see whether something has been stored in the
string.  But I don't know how it is intended to do either operation.

julia

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-06 10:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 10:18 staging/rtl8192[eu] Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.