From 4f18e922663731106fbc64dcc0583a7b017ac407 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 10 Aug 2015 19:34:45 +0200 Subject: [PATCH] error.h: Remove is_errno(). There is only one caller of is_errno() which is converted to use ERRNO_TO_PARA_ERROR() in this patch. --- afs.c | 2 +- error.h | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/afs.c b/afs.c index 299d65eb..c4053746 100644 --- a/afs.c +++ b/afs.c @@ -678,7 +678,7 @@ static int make_database_dir(void) get_database_dir(); ret = para_mkdir(database_dir, 0777); - if (ret >= 0 || is_errno(-ret, EEXIST)) + if (ret >= 0 || ret == -ERRNO_TO_PARA_ERROR(EEXIST)) return 1; return ret; } diff --git a/error.h b/error.h index 3818b110..27e9e264 100644 --- a/error.h +++ b/error.h @@ -578,20 +578,6 @@ extern const char **para_errlist[]; /** Set the osl error bit for the given number. */ #define OSL_ERRNO_TO_PARA_ERROR(num) ((num) | (1 << OSL_ERROR_BIT)) -/** Check whether a given number is a system error number. - * - * \param num The value to be checked. - * \param _errno The system error number. - * - * \return True if \a num is paraslash's representation of the system - * error identified by \a _errno. - */ -_static_inline_ bool is_errno(int num, int _errno) -{ - assert(num > 0 && _errno > 0); - return ERRNO_TO_PARA_ERROR(_errno) == num; -} - /** * Paraslash's version of strerror(3). * -- 2.39.2