]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/zstd/tests/regression/result.c
MFV r344063:
[FreeBSD/FreeBSD.git] / sys / contrib / zstd / tests / regression / result.c
1 /*
2  * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under both the BSD-style license (found in the
6  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7  * in the COPYING file in the root directory of this source tree).
8  * You may select, at your option, one of the above-listed licenses.
9  */
10
11 #include "result.h"
12
13 char const* result_get_error_string(result_t result) {
14     switch (result_get_error(result)) {
15         case result_error_ok:
16             return "okay";
17         case result_error_skip:
18             return "skip";
19         case result_error_system_error:
20             return "system error";
21         case result_error_compression_error:
22             return "compression error";
23         case result_error_decompression_error:
24             return "decompression error";
25         case result_error_round_trip_error:
26             return "round trip error";
27     }
28 }