strcasecmp()'s behavior is locale-dependent, and thus unpredictable (and
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 15 Jan 2009 02:40:43 +0000 (02:40 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 15 Jan 2009 02:40:43 +0000 (02:40 +0000)
possibly undesirable - in a Turkish locale, for example, "i" and "I" are
not equal); g_ascii_strcasecmp()'s behavior is not locale-dependent (and
treats "i" and "I" as equal even in a Turkish locale; the strings being
compared against are English, not Turkish, so treating "i" and "I" as
equal is a feature, not a bug).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27236 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-bootp.c

index dbebca197683ee8e97c9f54178e5e18f8c37badc..14773d062bac878993f9b95aae0a9a893d5a0ee4 100644 (file)
@@ -3857,13 +3857,13 @@ bootp_init_protocol(void)
         bootp_opt[ii].text = optiondetail[1];
         type = optiondetail[2]; /* A string to be converted to an ftype enum */
         /* XXX This if statement could be extended to allow for additinonal types */
-        if (strcasecmp(type,"string") == 0)
+        if (g_ascii_strcasecmp(type,"string") == 0)
         {
             bootp_opt[ii].ftype = string;
-        } else if (strcasecmp(type,"ipv4") == 0)
+        } else if (g_ascii_strcasecmp(type,"ipv4") == 0)
         {
             bootp_opt[ii].ftype = ipv4;
-        } else if (strcasecmp(type,"bytes") == 0)
+        } else if (g_ascii_strcasecmp(type,"bytes") == 0)
         {
             bootp_opt[ii].ftype = bytes;
         } else