diff options
Diffstat (limited to 'lib/includes/hicn/error.h')
-rw-r--r-- | lib/includes/hicn/error.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/includes/hicn/error.h b/lib/includes/hicn/error.h index d769ef693..9926c9cd8 100644 --- a/lib/includes/hicn/error.h +++ b/lib/includes/hicn/error.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Cisco and/or its affiliates. + * Copyright (c) 2021-2022 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -47,6 +47,8 @@ typedef enum extern const char *HICN_LIB_ERROR_STRING[]; +#define HICN_LIB_IS_ERROR(rc) (rc < 0) + #define hicn_strerror(errno) (char *) (HICN_LIB_ERROR_STRING[-errno]) #endif /* HICN_ERROR_H */ |