How about this?

if (WPA_SSID_MIN_CHAR_SIZE && ((new_ssid_string->len) < WPA_SSID_MIN_CHAR_SIZE))

As long as WPA_SSID_MIN_CHAR_SIZE is defined as 0, the compiler will probably 
just optimize it away, but if it ever changes to a value greater than zero, 
your check will be there.

- Chris




From: Stig Bjørlykke
Sent: Wed 5/13/2009 6:37 AM
To: Developer support list for Wireshark
Subject: [Wireshark-dev] Warnings in airpcap_dlg.c


Hi.

We have some warnings in airpcap_dlg.c where we check an unsigned
variable against a define with value zero.
Any ideas how we should fix this?  Removing the check is not what I wanted.

The code is like this:

#define WPA_SSID_MIN_CHAR_SIZE 0
GString *new_ssid_string;

if (((new_ssid_string->len) < WPA_SSID_MIN_CHAR_SIZE))


-- 
Stig Bjørlykke
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe
CONFIDENTIALITY NOTICE: The contents of this email are confidential
and for the exclusive use of the intended recipient. If you receive this
email in error, please delete it from your system immediately and 
notify us either by email, telephone or fax. You should not copy,
forward, or otherwise disclose the content of the email.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to