summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-04-13 18:51:12 +0200
committerMartin Roth <martinroth@google.com>2016-04-15 16:18:57 +0200
commitc42b7864851040b2ec19adc93f8635bcaf1e652b (patch)
treed484a064445d346bc69c459361cfcd87aada70aa /src/include
parentb3ee03c404e0a26dc338a26f7ce01ddb8dafaaec (diff)
downloadcoreboot-c42b7864851040b2ec19adc93f8635bcaf1e652b.tar.xz
stddef.h: fix zeroptr's definition
As Aaron pointed out, the old definition made the compiler emit two memory accesses, to 0 (for derefencing) and then reading at whatever address could be read from there. Change-Id: I5cdd53f5bd2d2397c43f09f3e5fa46be08744b01 Found-by: Aaron Durbin <adurbin@chromium.org> Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/14342 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/stddef.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/stddef.h b/src/include/stddef.h
index 35326ed6c6..d0308d2580 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -39,7 +39,7 @@ typedef unsigned int wint_t;
* undefined behaviour and do whatever" trickery in compilers.
* Use when you _really_ need to read32(zeroptr) (ie. read address 0).
*/
-extern void *zeroptr;
+extern char zeroptr[];
#endif
#endif /* STDDEF_H */