From 0946b1f6e9223a0a82306e40fc2b41ebddb1f7ef Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Sun, 9 Jan 2011 11:28:22 -0800 Subject: [PATCH] Bug 3330205 Put blanks and zeroes in const area Change-Id: I8f25aebd1ded3617dc60951271767281f73b8684 --- libc/stdio/fvwrite.c | 2 +- libc/stdio/fvwrite.h | 2 +- libc/stdio/vfprintf.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libc/stdio/fvwrite.c b/libc/stdio/fvwrite.c index 57a57e606..39d06048a 100644 --- a/libc/stdio/fvwrite.c +++ b/libc/stdio/fvwrite.c @@ -48,7 +48,7 @@ __LIBC_HIDDEN__ int __sfvwrite(FILE *fp, struct __suio *uio) { size_t len; - char *p; + const char *p; struct __siov *iov; int w, s; char *nl; diff --git a/libc/stdio/fvwrite.h b/libc/stdio/fvwrite.h index 2344e42e2..96f65de13 100644 --- a/libc/stdio/fvwrite.h +++ b/libc/stdio/fvwrite.h @@ -36,7 +36,7 @@ * I/O descriptors for __sfvwrite(). */ struct __siov { - void *iov_base; + const void *iov_base; size_t iov_len; }; struct __suio { diff --git a/libc/stdio/vfprintf.c b/libc/stdio/vfprintf.c index 2ce0361ae..5a8aa0abc 100644 --- a/libc/stdio/vfprintf.c +++ b/libc/stdio/vfprintf.c @@ -203,9 +203,9 @@ vfprintf(FILE *fp, const char *fmt0, __va_list ap) * below longer. */ #define PADSIZE 16 /* pad chunk size */ - static char blanks[PADSIZE] = + static const char blanks[PADSIZE] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}; - static char zeroes[PADSIZE] = + static const char zeroes[PADSIZE] = {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}; /*