From 1c54bc5674a54d84112da5191c28a745d448c816 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 2 Jan 2017 23:02:48 -0800 Subject: Add NNI_GET32, NNI_PUT32 macros. --- src/protocol/reqrep/req.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/protocol/reqrep/req.c') diff --git a/src/protocol/reqrep/req.c b/src/protocol/reqrep/req.c index 0879755f..4ce66ab6 100644 --- a/src/protocol/reqrep/req.c +++ b/src/protocol/reqrep/req.c @@ -326,10 +326,7 @@ nni_req_sendfilter(void *arg, nni_msg *msg) id = (req->nextid++) | 0x80000000u; // Request ID is in big endian format. - req->reqid[0] = (uint8_t) (id >> 24); - req->reqid[1] = (uint8_t) (id >> 16); - req->reqid[2] = (uint8_t) (id >> 8); - req->reqid[3] = (uint8_t) (id); + NNI_PUT32(req->reqid, id); if (nni_msg_append_header(msg, req->reqid, 4) != 0) { // Should be ENOMEM. -- cgit v1.2.3-70-g09d2