diff options
author | Shaohua Li <shaohua.li@intel.com> | 2008-04-30 12:07:17 -0400 |
---|---|---|
committer | Masami Hiramatsu <mhiramat@redhat.com> | 2008-04-30 12:07:17 -0400 |
commit | a70743a5949f9de0a0d59c4e2587a468d4d6198d (patch) | |
tree | 70226473c12f3fb7a9f2241b89108206e463caa1 /runtime/vsprintf.c | |
parent | 453b58eda7e347076a7df00ce9d15bb0e92f6d66 (diff) | |
download | systemtap-steved-a70743a5949f9de0a0d59c4e2587a468d4d6198d.tar.gz systemtap-steved-a70743a5949f9de0a0d59c4e2587a468d4d6198d.tar.xz systemtap-steved-a70743a5949f9de0a0d59c4e2587a468d4d6198d.zip |
PR5648: Fix unaligned access warning on ia64.
Diffstat (limited to 'runtime/vsprintf.c')
-rw-r--r-- | runtime/vsprintf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index 0bf625a5..dcaa1bc3 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -256,18 +256,18 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) break; case 2: if((str + 1) <= end) - *(int16_t *)str = (int16_t)num; + memcpy(str, &num, 2); str+=2; break; case 4: if((str + 3) <= end) - *(int32_t *)str = num; + memcpy(str, &num, 4); str+=4; break; default: // "%.8b" by default case 8: if((str + 7) <= end) - *(int64_t *)str = num; + memcpy(str, &num, 8); str+=8; break; } |