[segyio] 55/376: Preserve constness ieee <-> ibm float
Jørgen Kvalsvik
jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
jokva-guest pushed a commit to branch debian
in repository segyio.
commit 43ee5e0a71259e6051a93d69211cff9eca4d8e1f
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date: Wed Oct 19 14:01:20 2016 +0200
Preserve constness ieee <-> ibm float
---
src/segyio/segy.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/segyio/segy.c b/src/segyio/segy.c
index a7efb16..c863ac7 100644
--- a/src/segyio/segy.c
+++ b/src/segyio/segy.c
@@ -70,9 +70,9 @@ void ibm2ieee(void* to, const void* from, int len) {
register int exp; /* exponent */
register int sgn; /* sign */
- for (; len-- > 0; to = (char*) to + 4, from = (char*) from + 4) {
+ for (; len-- > 0; to = (char*) to + 4, from = (const char*) from + 4) {
/* split into sign, exponent, and fraction */
- fr = ntohl(*(int32_t*) from); /* pick up value */
+ fr = ntohl(*(const int32_t*) from); /* pick up value */
sgn = fr >> 31; /* save sign */
fr <<= 1; /* shift sign out */
exp = fr >> 25; /* save exponent */
@@ -118,9 +118,9 @@ void ieee2ibm(void* to, const void* from, int len) {
register int exp; /* exponent */
register int sgn; /* sign */
- for (; len-- > 0; to = (char*) to + 4, from = (char*) from + 4) {
+ for (; len-- > 0; to = (char*) to + 4, from = (const char*) from + 4) {
/* split into sign, exponent, and fraction */
- fr = *(unsigned*) from; /* pick up value */
+ fr = *(const unsigned*) from; /* pick up value */
sgn = fr >> 31; /* save sign */
fr <<= 1; /* shift sign out */
exp = fr >> 24; /* save exponent */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/segyio.git
More information about the debian-science-commits
mailing list