aboutsummaryrefslogtreecommitdiff
path: root/lib/common/error_private.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2018-12-29 06:51:10 +0000
committerConrad Meyer <cem@FreeBSD.org>2018-12-29 06:51:10 +0000
commitaf73257b093737838d6086890c91f6ec13291ea7 (patch)
tree2a77a57a2955d56119af575c220abba2c7e4fd30 /lib/common/error_private.c
parent706cfae467a217cc786fd96a72cc2e33c61987e4 (diff)
Diffstat (limited to 'lib/common/error_private.c')
-rw-r--r--lib/common/error_private.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/common/error_private.c b/lib/common/error_private.c
index d004ee636c67..7c1bb67a23f4 100644
--- a/lib/common/error_private.c
+++ b/lib/common/error_private.c
@@ -14,6 +14,10 @@
const char* ERR_getErrorString(ERR_enum code)
{
+#ifdef ZSTD_STRIP_ERROR_STRINGS
+ (void)code;
+ return "Error strings stripped";
+#else
static const char* const notErrorCode = "Unspecified error code";
switch( code )
{
@@ -39,10 +43,12 @@ const char* ERR_getErrorString(ERR_enum code)
case PREFIX(dictionaryCreation_failed): return "Cannot create Dictionary from provided samples";
case PREFIX(dstSize_tooSmall): return "Destination buffer is too small";
case PREFIX(srcSize_wrong): return "Src size is incorrect";
+ case PREFIX(dstBuffer_null): return "Operation on NULL destination buffer";
/* following error codes are not stable and may be removed or changed in a future version */
case PREFIX(frameIndex_tooLarge): return "Frame index is too large";
case PREFIX(seekableIO): return "An I/O error occurred when reading/seeking";
case PREFIX(maxCode):
default: return notErrorCode;
}
+#endif
}