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) {