From 213f98cbb51e6cb611c18f184d6cb4c1240df903 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Wed, 17 Dec 2014 16:47:49 -0500 Subject: [PATCH] Bug 1073003 - Fix warnings about macro redefinitions by changing macros to constants. r=ehsan --HG-- extra : rebase_source : 6ddd2bf8892e6ff87df19c4d48a2341418436371 extra : source : 63994e7cc7aa9d437ffc775462d9aa0e0fadb8b6 --- dom/wifi/WifiUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/wifi/WifiUtils.cpp b/dom/wifi/WifiUtils.cpp index 140e32f4054b..1d753e110956 100644 --- a/dom/wifi/WifiUtils.cpp +++ b/dom/wifi/WifiUtils.cpp @@ -13,7 +13,7 @@ using namespace mozilla::dom; #define BUFFER_SIZE 4096 #define COMMAND_SIZE 256 -#define PROPERTY_VALUE_MAX 80 +const uint32_t kPropertyValueMax = 80; // Intentionally not trying to dlclose() this handle. That's playing // Russian roulette with security bugs. @@ -38,7 +38,7 @@ GetSharedLibrary() static bool GetWifiP2pSupported() { - char propP2pSupported[PROPERTY_VALUE_MAX]; + char propP2pSupported[kPropertyValueMax]; property_get("ro.moz.wifi.p2p_supported", propP2pSupported, "0"); return (0 == strcmp(propP2pSupported, "1")); } @@ -379,7 +379,7 @@ public: // Concrete class to use to access the wpa supplicant. WpaSupplicant::WpaSupplicant() { - char propVersion[PROPERTY_VALUE_MAX]; + char propVersion[kPropertyValueMax]; property_get("ro.build.version.sdk", propVersion, "0"); mSdkVersion = strtol(propVersion, nullptr, 10);