Use get16, get32, put16, and put32 instead of direct casting pointer
[kopensolaris-gnu/glibc.git] / iconvdata / iso-2022-jp.c
index a3c9f7d..decb6c1 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion module for ISO-2022-JP.
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -436,7 +436,8 @@ gconv_end (struct __gconv_step *data)
          }                                                                   \
       }                                                                              \
                                                                              \
-    *((uint32_t *) outptr)++ = ch;                                           \
+    put32 (outptr, ch);                                                              \
+    outptr += 4;                                                             \
   }
 #define EXTRA_LOOP_DECLS       , enum variant var, int *setp
 #define INIT_PARAMS            int set = *setp % 0x100, set2 = *setp / 0x100
@@ -454,7 +455,7 @@ gconv_end (struct __gconv_step *data)
     uint32_t ch;                                                             \
     size_t written = 0;                                                              \
                                                                              \
-    ch = *((uint32_t *) inptr);                                                      \
+    ch = get32 (inptr);                                                              \
                                                                              \
     /* First see whether we can write the character using the currently              \
        selected character set.  */                                           \