diff options
author | kan <kan@FreeBSD.org> | 2004-07-28 07:20:04 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-07-28 07:20:04 +0000 |
commit | c8e1a3d9de56905f7ad926bcd808a4412886abf9 (patch) | |
tree | df7b615c9bed80c16a40729d4c4177b5ed9ff269 /usr.sbin | |
parent | bc35f3d1a7fbce02f757b2c151b158ed43bfe96e (diff) | |
download | FreeBSD-src-c8e1a3d9de56905f7ad926bcd808a4412886abf9.zip FreeBSD-src-c8e1a3d9de56905f7ad926bcd808a4412886abf9.tar.gz |
Avoid casts as lvalues.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bluetooth/sdpd/profile.c | 9 | ||||
-rw-r--r-- | usr.sbin/ppp/radius.c | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/bluetooth/sdpd/profile.c b/usr.sbin/bluetooth/sdpd/profile.c index d49929f..3ba0159 100644 --- a/usr.sbin/bluetooth/sdpd/profile.c +++ b/usr.sbin/bluetooth/sdpd/profile.c @@ -125,7 +125,8 @@ common_profile_create_service_class_id_list( for (; datalen > 0; datalen --) { SDP_PUT8(SDP_DATA_UUID16, buf); - SDP_PUT16(*((uint16_t const *)data)++, buf); + SDP_PUT16(*((uint16_t const *)data), buf); + data += sizeof(uint16_t); } return (2 + len); @@ -158,9 +159,11 @@ common_profile_create_bluetooth_profile_descriptor_list( SDP_PUT8(SDP_DATA_SEQ8, buf); SDP_PUT8(6, buf); SDP_PUT8(SDP_DATA_UUID16, buf); - SDP_PUT16(*((uint16_t const *)data)++, buf); + SDP_PUT16(*((uint16_t const *)data), buf); + data += sizeof(uint16_t); SDP_PUT8(SDP_DATA_UINT16, buf); - SDP_PUT16(*((uint16_t const *)data)++, buf); + SDP_PUT16(*((uint16_t const *)data), buf); + data += sizeof(uint16_t); } return (2 + len); diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c index df57b3d..1bd92ae 100644 --- a/usr.sbin/ppp/radius.c +++ b/usr.sbin/ppp/radius.c @@ -530,7 +530,7 @@ radius_Process(struct radius *r, int got) * Only point at the String field if we don't think the * peer has misformatted the response. */ - ((const char *)data)++; + data = (const char *)data + 1; len--; } else log_Printf(LogWARN, "Warning: The MS-CHAP-Error " @@ -558,7 +558,7 @@ radius_Process(struct radius *r, int got) * Only point at the String field if we don't think the * peer has misformatted the response. */ - ((const char *)data)++; + data = (const char *)data + 1; len--; } else log_Printf(LogWARN, "Warning: The MS-CHAP2-Success " |