diff options
author | otto <> | 2008-12-15 19:47:49 +0000 |
---|---|---|
committer | otto <> | 2008-12-15 19:47:49 +0000 |
commit | e31e6e662a88e257063cc2372c7c2e5aec3480ae (patch) | |
tree | d6f993546a17d9242aeeb2e788f50a47a33e75b1 /src | |
parent | d9f3d0f3d6af396a7b74483702c4cd73f07ac08f (diff) | |
download | openbsd-e31e6e662a88e257063cc2372c7c2e5aec3480ae.tar.gz openbsd-e31e6e662a88e257063cc2372c7c2e5aec3480ae.tar.bz2 openbsd-e31e6e662a88e257063cc2372c7c2e5aec3480ae.zip |
shave off more bytes than you expect by declaring a few const local arrays
as static const
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 0f1f088b44..ee4bf9876a 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: malloc.c,v 1.110 2008/11/20 09:05:15 otto Exp $ */ | 1 | /* $OpenBSD: malloc.c,v 1.111 2008/12/15 19:47:49 otto Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> | 3 | * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> |
4 | * | 4 | * |
@@ -319,7 +319,7 @@ malloc_dump(int fd) | |||
319 | static void | 319 | static void |
320 | malloc_exit(void) | 320 | malloc_exit(void) |
321 | { | 321 | { |
322 | const char q[] = "malloc() warning: Couldn't dump stats\n"; | 322 | static const char q[] = "malloc() warning: Couldn't dump stats\n"; |
323 | int save_errno = errno, fd; | 323 | int save_errno = errno, fd; |
324 | 324 | ||
325 | fd = open("malloc.out", O_RDWR|O_APPEND); | 325 | fd = open("malloc.out", O_RDWR|O_APPEND); |
@@ -638,7 +638,7 @@ omalloc_init(struct dir_info *d) | |||
638 | malloc_zero = 1; | 638 | malloc_zero = 1; |
639 | break; | 639 | break; |
640 | default: { | 640 | default: { |
641 | const char q[] = "malloc() warning: " | 641 | static const char q[] = "malloc() warning: " |
642 | "unknown char in MALLOC_OPTIONS\n"; | 642 | "unknown char in MALLOC_OPTIONS\n"; |
643 | write(STDERR_FILENO, q, sizeof(q) - 1); | 643 | write(STDERR_FILENO, q, sizeof(q) - 1); |
644 | break; | 644 | break; |
@@ -656,7 +656,7 @@ omalloc_init(struct dir_info *d) | |||
656 | 656 | ||
657 | #ifdef MALLOC_STATS | 657 | #ifdef MALLOC_STATS |
658 | if (malloc_stats && (atexit(malloc_exit) == -1)) { | 658 | if (malloc_stats && (atexit(malloc_exit) == -1)) { |
659 | const char q[] = "malloc() warning: atexit(2) failed." | 659 | static const char q[] = "malloc() warning: atexit(2) failed." |
660 | " Will not be able to dump stats on exit\n"; | 660 | " Will not be able to dump stats on exit\n"; |
661 | write(STDERR_FILENO, q, sizeof(q) - 1); | 661 | write(STDERR_FILENO, q, sizeof(q) - 1); |
662 | } | 662 | } |