diff options
author | Denys Vlasenko | 2017-09-12 17:54:28 +0200 |
---|---|---|
committer | Denys Vlasenko | 2017-09-12 17:54:28 +0200 |
commit | b5a0396716e6ef2882ae40b2b62b4ef6e8e21da0 (patch) | |
tree | b380b46b3c4bc5c8ddc30b2cffd3402f7268ccb2 | |
parent | b278ac0e607aa971c46706be63c580a2fd88dd56 (diff) | |
download | busybox-b5a0396716e6ef2882ae40b2b62b4ef6e8e21da0.zip busybox-b5a0396716e6ef2882ae40b2b62b4ef6e8e21da0.tar.gz |
networking/interface.c: remove superfluous "& 0377"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/interface.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/networking/interface.c b/networking/interface.c index c5c8f2c..1191858 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -223,7 +223,7 @@ static char* FAST_FUNC UNSPEC_print(unsigned char *ptr) pos = buff; for (i = 0; i < sizeof(struct sockaddr); i++) { /* careful -- not every libc's sprintf returns # bytes written */ - sprintf(pos, "%02X-", (*ptr++ & 0377)); + sprintf(pos, "%02X-", *ptr++); pos += 3; } /* Erase trailing "-". Works as long as sizeof(struct sockaddr) != 0 */ @@ -704,9 +704,8 @@ static char* FAST_FUNC ether_print(unsigned char *ptr) { char *buff; buff = xasprintf("%02X:%02X:%02X:%02X:%02X:%02X", - (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377), - (ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377) - ); + ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5] + ); return auto_string(buff); } |