diff options
-rw-r--r-- | os/access.c | 4 | ||||
-rw-r--r-- | os/io.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/os/access.c b/os/access.c index 34478768b..65765799b 100644 --- a/os/access.c +++ b/os/access.c @@ -1458,7 +1458,7 @@ GetHosts ( for (host = validhosts; host; host = host->next) { nHosts++; - n += (((host->len + 3) >> 2) << 2) + sizeof(xHostEntry); + n += pad_to_int32(host->len) + sizeof(xHostEntry); } if (n) { @@ -1474,7 +1474,7 @@ GetHosts ( ((xHostEntry *)ptr)->length = len; ptr += sizeof(xHostEntry); acopy (host->addr, ptr, len); - ptr += ((len + 3) >> 2) << 2; + ptr += pad_to_int32(len); } } else { *data = NULL; @@ -273,7 +273,7 @@ ReadRequestFromClient(ClientPtr client) if (gotnow < sizeof(xBigReq)) { /* Still need more data to tell just how big. */ - needed = sizeof(xBigReq) >> 2; /* needed is in CARD32s now */ + needed = bytes_to_int32(sizeof(xBigReq)); /* needed is in CARD32s now */ need_header = TRUE; } else @@ -377,7 +377,7 @@ ReadRequestFromClient(ClientPtr client) { move_header = TRUE; if (gotnow < sizeof(xBigReq)) - needed = sizeof(xBigReq) >> 2; + needed = bytes_to_int32(sizeof(xBigReq)); else needed = get_big_req_len(request, client); } @@ -445,7 +445,7 @@ ReadRequestFromClient(ClientPtr client) oci->bufptr += (sizeof(xBigReq) - sizeof(xReq)); *(xReq *)oci->bufptr = *request; oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq)); - client->req_len -= (sizeof(xBigReq) - sizeof(xReq)) >> 2; + client->req_len -= bytes_to_int32(sizeof(xBigReq) - sizeof(xReq)); } client->requestBuffer = (pointer)oci->bufptr; #ifdef DEBUG_COMMUNICATION |