diff options
author | Christian Neumüller <cn00@gmx.at> | 2014-09-09 14:58:30 +0200 |
---|---|---|
committer | Ethan Chen <intervigil@gmail.com> | 2015-03-11 02:14:48 +0000 |
commit | a3732c055167df76ff7afedcaa59b76be52bb567 (patch) | |
tree | 08893641cea8838cad93cd211676463ba0c51093 /drivers/net/wireless/bcmdhd/include/bcmutils.h | |
parent | 0ef5a06bceb576a1135770111577f7700fe1ef93 (diff) | |
download | kernel_samsung_smdk4412-a3732c055167df76ff7afedcaa59b76be52bb567.zip kernel_samsung_smdk4412-a3732c055167df76ff7afedcaa59b76be52bb567.tar.gz kernel_samsung_smdk4412-a3732c055167df76ff7afedcaa59b76be52bb567.tar.bz2 |
bcmdhd wireless: Fix sprintf/sscanf format strings.
%X is int. This is too wide for the chars used there, so use %hhx instead. Avoid
undefined pointer casts from char* to unsigned int* in sscanf calls.
Also use the already defined MACF and update it with %hhx instead of typing this
long format string all over again.
Add MACF_U which is the same as MACF but with uppercase hex (%hhX instead of %hhx).
Change-Id: Idd2465e0d05bca9b05566abeec05a5ad59a577ad
Diffstat (limited to 'drivers/net/wireless/bcmdhd/include/bcmutils.h')
-rw-r--r-- | drivers/net/wireless/bcmdhd/include/bcmutils.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcmdhd/include/bcmutils.h b/drivers/net/wireless/bcmdhd/include/bcmutils.h index 1b21327..90f8f40 100644 --- a/drivers/net/wireless/bcmdhd/include/bcmutils.h +++ b/drivers/net/wireless/bcmdhd/include/bcmutils.h @@ -669,7 +669,8 @@ extern void *_bcmutils_dummy_fn; #define CRC32_GOOD_VALUE 0xdebb20e3 -#define MACF "%02x:%02x:%02x:%02x:%02x:%02x" +#define MACF "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx" +#define MACF_U "%02hhX:%02hhX:%02hhX:%02hhX:%02hhX:%02hhX" /* upper case hex */ #define ETHERP_TO_MACF(ea) ((struct ether_addr *) (ea))->octet[0], \ ((struct ether_addr *) (ea))->octet[1], \ ((struct ether_addr *) (ea))->octet[2], \ |