1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-25 14:46:52 +00:00

Use make format.

This commit is contained in:
Calvin Rose 2020-04-17 13:39:23 -05:00
parent fbe903b277
commit e202d30835

View File

@ -2,21 +2,21 @@
#include <string.h> #include <string.h>
#include <janet.h> #include <janet.h>
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
char *new_str = (char *)malloc(size+1); char *new_str = (char *)malloc(size + 1);
if (new_str == NULL){ if (new_str == NULL) {
return 0; return 0;
} }
memcpy(new_str, data, size); memcpy(new_str, data, size);
new_str[size] = '\0'; new_str[size] = '\0';
/* janet logic */ /* janet logic */
janet_init(); janet_init();
JanetTable *env = janet_core_env(NULL); JanetTable *env = janet_core_env(NULL);
janet_dostring(env, new_str, "main", NULL); janet_dostring(env, new_str, "main", NULL);
janet_deinit(); janet_deinit();
free(new_str); free(new_str);
return 0; return 0;
} }