aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-01-09 11:28:22 -0800
committerGlenn Kasten <gkasten@google.com>2011-01-09 11:38:56 -0800
commit0946b1f6e9223a0a82306e40fc2b41ebddb1f7ef (patch)
tree817733df5653de4dea73988207f2d06978716787
parent015610e64eb728dd031c6b1730b70460d9d298b8 (diff)
downloadandroid_bionic-0946b1f6e9223a0a82306e40fc2b41ebddb1f7ef.tar.gz
android_bionic-0946b1f6e9223a0a82306e40fc2b41ebddb1f7ef.tar.bz2
android_bionic-0946b1f6e9223a0a82306e40fc2b41ebddb1f7ef.zip
Bug 3330205 Put blanks and zeroes in const area
Change-Id: I8f25aebd1ded3617dc60951271767281f73b8684
-rw-r--r--libc/stdio/fvwrite.c2
-rw-r--r--libc/stdio/fvwrite.h2
-rw-r--r--libc/stdio/vfprintf.c4
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'};
/*