projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
18da615
)
jpwl: Remove non-portable data type u_int16_t (fix issue #796) (#797)
author
Stefan Weil
<sw@weilnetz.de>
Thu, 14 Jul 2016 08:49:17 +0000
(10:49 +0200)
committer
Matthieu Darbois
<mayeut@users.noreply.github.com>
Thu, 14 Jul 2016 08:49:17 +0000
(10:49 +0200)
The type casts which used this data type can be removed by changing
the signature of function swap16. As this function is called with
unsigned variables, this change is reasonable.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
src/bin/jpwl/convert.c
patch
|
blob
|
history
diff --git
a/src/bin/jpwl/convert.c
b/src/bin/jpwl/convert.c
index bf7b564159528d39c4bc9c37457c582e859484c2..9db7e955cb74447fbce3e00fe3e5fedbea7314e3 100644
(file)
--- a/
src/bin/jpwl/convert.c
+++ b/
src/bin/jpwl/convert.c
@@
-187,10
+187,9
@@
static int tga_readheader(FILE *fp, unsigned int *bits_per_pixel,
#ifdef OPJ_BIG_ENDIAN
#ifdef OPJ_BIG_ENDIAN
-static inline
int16_t swap16(
int16_t x)
+static inline
uint16_t swap16(u
int16_t x)
{
{
- return((((u_int16_t)x & 0x00ffU) << 8) |
- (((u_int16_t)x & 0xff00U) >> 8));
+ return(((x & 0x00ffU) << 8) | ((x & 0xff00U) >> 8));
}
#endif
}
#endif