]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Remove Error Strings with ZSTD_STRIP_ERROR_STRINGS
authorW. Felix Handte <w@felixhandte.com>
Sat, 17 Nov 2018 00:44:41 +0000 (16:44 -0800)
committerW. Felix Handte <w@felixhandte.com>
Tue, 18 Dec 2018 21:36:39 +0000 (13:36 -0800)
lib/common/error_private.c

index d39e1a7ad5d270ae97a3f286ac59ccc8b380b9f0..692e66b221909614521203b681346ab26c2ff199 100644 (file)
@@ -14,6 +14,9 @@
 
 const char* ERR_getErrorString(ERR_enum code)
 {
+#ifdef ZSTD_STRIP_ERROR_STRINGS
+    return "Error strings stripped";
+#else
     static const char* const notErrorCode = "Unspecified error code";
     switch( code )
     {
@@ -46,4 +49,5 @@ const char* ERR_getErrorString(ERR_enum code)
     case PREFIX(maxCode):
     default: return notErrorCode;
     }
+#endif
 }