From 7939d7f6558f64055a92a06d5a7845f09b03973c Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Mon, 9 Jan 2017 15:44:19 +1000 Subject: [PATCH] * reformat simdb_error() --- src/database.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/database.c b/src/database.c index c6b727d..0482634 100644 --- a/src/database.c +++ b/src/database.c @@ -156,22 +156,22 @@ simdb_close(simdb_t *db) { const char * simdb_error(int error) { - if (error == SIMDB_SUCCESS) { - return "success"; - } else if (error == SIMDB_ERR_SYSTEM) { - return strerror(errno); - } else if (error == SIMDB_ERR_OOM) { - return "can't allocate memory"; - } else if (error == SIMDB_ERR_CORRUPTDB) { - return "database corrupted"; - } else if (error == SIMDB_ERR_WRONGVERS) { - return "database version differs from library version"; - } else if (error == SIMDB_ERR_READONLY) { - return "database opened in read-only mode"; - } else if (error == SIMDB_ERR_NXRECORD) { - return "no such record in database"; - } - return "unknown error"; + if (error == SIMDB_SUCCESS) { + return "success"; + } else if (error == SIMDB_ERR_SYSTEM) { + return strerror(errno); + } else if (error == SIMDB_ERR_OOM) { + return "can't allocate memory"; + } else if (error == SIMDB_ERR_CORRUPTDB) { + return "database corrupted"; + } else if (error == SIMDB_ERR_WRONGVERS) { + return "database version differs from library version"; + } else if (error == SIMDB_ERR_READONLY) { + return "database opened in read-only mode"; + } else if (error == SIMDB_ERR_NXRECORD) { + return "no such record in database"; + } + return "unknown error"; } int simdb_record_read(simdb_t *db, simdb_rec_t *rec) {