diff options
| author | Stefan Weil <sw@weilnetz.de> | 2016-07-14 10:49:17 +0200 |
|---|---|---|
| committer | Matthieu Darbois <mayeut@users.noreply.github.com> | 2016-07-14 10:49:17 +0200 |
| commit | e40c28c2e89c30ebb682fe2fabef10930e039c1f (patch) | |
| tree | e4d3b2b494855edffaff20a1bf12fd03726e86b9 /src | |
| parent | 18da6155b2b69472d36ef8b13fd82878966b451c (diff) | |
jpwl: Remove non-portable data type u_int16_t (fix issue #796) (#797)
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/jpwl/convert.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/jpwl/convert.c b/src/bin/jpwl/convert.c index bf7b5641..9db7e955 100644 --- 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 -static inline int16_t swap16(int16_t x) +static inline uint16_t swap16(uint16_t x) { - return((((u_int16_t)x & 0x00ffU) << 8) | - (((u_int16_t)x & 0xff00U) >> 8)); + return(((x & 0x00ffU) << 8) | ((x & 0xff00U) >> 8)); } #endif |
