From 9063bb9e0032935913e04f650f49abd3dcb257d2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 7 May 2020 15:00:22 -0700 Subject: [PATCH] shearwater: remove stale remnants of manual string interface code Minimize unnecessary differences with Jef's upstream code. The shearwater parser uses the generif field-cache code, and doesn't need to have the snprintf workarounds for MSC, or include stdio.h etc. The field-cache code takes care of this. [ To be precise: the field-cache code _should_ have taken care of this, but didn't: it used 'memcpy()' in a macro, but didn't include the required header. Removing it from the shearwater code exposed this issue with the field-cache header, and this fixes that ] Signed-off-by: Linus Torvalds --- src/field-cache.h | 2 ++ src/shearwater_predator_parser.c | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/field-cache.h b/src/field-cache.h index 0fc21d5..ec8a7f4 100644 --- a/src/field-cache.h +++ b/src/field-cache.h @@ -1,3 +1,5 @@ +#include + #define MAXGASES 16 #define MAXSTRINGS 32 diff --git a/src/shearwater_predator_parser.c b/src/shearwater_predator_parser.c index bb69e8e..1be4383 100644 --- a/src/shearwater_predator_parser.c +++ b/src/shearwater_predator_parser.c @@ -20,13 +20,6 @@ */ #include -#include -#include -#include - -#ifdef _MSC_VER -#define snprintf _snprintf -#endif #include