diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2017-12-09 06:26:14 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2017-12-09 06:26:14 +0000 |
commit | ed9ccf29c5bc66e5212996aee4bbb1496d2d3108 (patch) | |
tree | aa0c53f299972be15ed469d03536d076f7e049ee /src/sg_rbuf.c | |
parent | e2be6d218fe1f8096b511e3fcbca042002063db3 (diff) | |
download | sg3_utils-ed9ccf29c5bc66e5212996aee4bbb1496d2d3108.tar.gz |
sg_lib: fix sg_memalign() code in the non posix_memalign() case
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@736 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_rbuf.c')
-rw-r--r-- | src/sg_rbuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sg_rbuf.c b/src/sg_rbuf.c index 899618d7..a7c39b68 100644 --- a/src/sg_rbuf.c +++ b/src/sg_rbuf.c @@ -57,7 +57,7 @@ #endif -static const char * version_str = "5.00 20171010"; +static const char * version_str = "5.01 20171209"; static struct option long_options[] = { {"buffer", required_argument, 0, 'b'}, @@ -526,7 +526,7 @@ main(int argc, char * argv[]) } /* perhaps use posix_memalign() instead */ if (op->do_dio) /* align to page boundary */ - rbBuff= (unsigned char *)(((uintptr_t)rawp + psz - 1) & + rbBuff= (unsigned char *)(((sg_uintptr_t)rawp + psz - 1) & (~(psz - 1))); else rbBuff = (unsigned char *)rawp; |