From bc558c75dcad12c7f45443c8e191b554b5d0c887 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 27 Jan 2009 17:06:05 +0000 Subject: [PATCH] windows-dcache-20090127 LICENSE MIT Use the optimized rx_Read32 call instead of the slower rx_Read when reading 32-bit integer values. --- src/WINNT/afsd/cm_dcache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/WINNT/afsd/cm_dcache.c b/src/WINNT/afsd/cm_dcache.c index d9f99fdb7..89f4963fe 100644 --- a/src/WINNT/afsd/cm_dcache.c +++ b/src/WINNT/afsd/cm_dcache.c @@ -1506,7 +1506,7 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp code = StartRXAFS_FetchData64(rxcallp, &tfid, biod.offset.QuadPart, biod.length); if (code == 0) { - temp = rx_Read(rxcallp, (char *) &nbytes_hi, sizeof(afs_int32)); + temp = rx_Read32(rxcallp, &nbytes_hi); if (temp == sizeof(afs_int32)) { nbytes_hi = ntohl(nbytes_hi); } else { @@ -1540,7 +1540,7 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp } if (code == 0) { - temp = rx_Read(rxcallp, (char *)&nbytes, sizeof(afs_int32)); + temp = rx_Read32(rxcallp, &nbytes); if (temp == sizeof(afs_int32)) { nbytes = ntohl(nbytes); FillInt64(length_found, nbytes_hi, nbytes); @@ -1561,7 +1561,7 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp /* now copy the data out of the pipe and put it in the buffer */ if (code == 0) { - temp = rx_Read(rxcallp, (char *)&nbytes, sizeof(afs_int32)); + temp = rx_Read32(rxcallp, &nbytes); if (temp == sizeof(afs_int32)) { nbytes = ntohl(nbytes); if (nbytes > biod.length) -- 2.39.5