Edit fuzz' .c files to be C, not C++

This commit is contained in:
Nigel Tao committed 2018-05-03 08:15:29 +10:00
1 parent 5ad9055572
commit 2a97a1ad29
4 files changed
+16 -8

No files matched your search

+9 -1
View File
@@ -28,7 +28,11 @@ void intentional_segfault() {
void fuzz(wuffs_base__io_reader src_reader, uint32_t hash);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
#ifdef __cplusplus
extern "C" {
#endif
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Hash input as per https://en.wikipedia.org/wiki/Jenkins_hash_function
size_t i = 0;
uint32_t hash = 0;
@@ -50,6 +54,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return 0;
}
#ifdef __cplusplus
} // extern "C"
#endif
#ifdef WUFFS_CONFIG__FUZZLIB_MAIN
#include <errno.h>