summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb/chpw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/krb5/krb/chpw.c')
-rw-r--r--src/lib/krb5/krb/chpw.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/krb5/krb/chpw.c b/src/lib/krb5/krb/chpw.c
index 851a9ecdda..f5f68d5623 100644
--- a/src/lib/krb5/krb/chpw.c
+++ b/src/lib/krb5/krb/chpw.c
@@ -43,8 +43,8 @@ krb5int_mk_chpw_req(krb5_context context,
/* length */
- *ptr++ = (packet->length>> 8) & 0xff;
- *ptr++ = packet->length & 0xff;
+ store_16_be(packet->length, ptr);
+ ptr += 2;
/* version == 0x0001 big-endian */
@@ -53,8 +53,8 @@ krb5int_mk_chpw_req(krb5_context context,
/* ap_req length, big-endian */
- *ptr++ = (ap_req->length>>8) & 0xff;
- *ptr++ = ap_req->length & 0xff;
+ store_16_be(ap_req->length, ptr);
+ ptr += 2;
/* ap-req data */
@@ -306,14 +306,14 @@ krb5int_mk_setpw_req(krb5_context context,
** build the packet -
*/
/* put in the length */
- *ptr++ = (packet->length>>8) & 0xff;
- *ptr++ = packet->length & 0xff;
+ store_16_be(packet->length, ptr);
+ ptr += 2;
/* put in the version */
*ptr++ = (char)0xff;
*ptr++ = (char)0x80;
/* the ap_req length is big endian */
- *ptr++ = (ap_req->length>>8) & 0xff;
- *ptr++ = ap_req->length & 0xff;
+ store_16_be(ap_req->length, ptr);
+ ptr += 2;
/* put in the request data */
memcpy(ptr, ap_req->data, ap_req->length);
ptr += ap_req->length;