diff options
-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 " |