Commit cb22ab20 authored by John Oldman's avatar John Oldman Committed by Greg Kroah-Hartman

staging: rtl8712/: Using comparison to true is error prone

clear below issues reported by checkpatch.pl:

CHECK: Using comparison to true is error prone
CHECK: Comparison to NULL should be written "!oldest"
Signed-off-by: default avatarJohn Oldman <john.oldman@polehill.co.uk>
Link: https://lore.kernel.org/r/20200710113113.1648-1-john.oldman@polehill.co.ukSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a3232e64
...@@ -264,13 +264,13 @@ struct wlan_network *r8712_get_oldest_wlan_network( ...@@ -264,13 +264,13 @@ struct wlan_network *r8712_get_oldest_wlan_network(
phead = &scanned_queue->queue; phead = &scanned_queue->queue;
plist = phead->next; plist = phead->next;
while (1) { while (1) {
if (end_of_queue_search(phead, plist) == true) if (end_of_queue_search(phead, plist))
break; break;
pwlan = container_of(plist, struct wlan_network, list); pwlan = container_of(plist, struct wlan_network, list);
if (pwlan->fixed != true) { if (!pwlan->fixed) {
if (oldest == NULL || if (!oldest ||
time_after((unsigned long)oldest->last_scanned, time_after((unsigned long)oldest->last_scanned,
(unsigned long)pwlan->last_scanned)) (unsigned long)pwlan->last_scanned))
oldest = pwlan; oldest = pwlan;
} }
plist = plist->next; plist = plist->next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment