[almanah] VFS: use g_open & g_close
- From: Álvaro Peña <alvaropg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [almanah] VFS: use g_open & g_close
- Date: Wed, 31 Dec 2014 14:48:26 +0000 (UTC)
commit 12b56df8262ecc72af0b32049e84110909f6fe98
Author: Álvaro Peña <alvaropg gmail com>
Date: Wed Dec 31 15:48:07 2014 +0100
VFS: use g_open & g_close
src/vfs.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/vfs.c b/src/vfs.c
index eae2578..c50d320 100644
--- a/src/vfs.c
+++ b/src/vfs.c
@@ -1073,7 +1073,7 @@ almanah_vfs_delete (__attribute__ ((unused)) sqlite3_vfs *pVfs, const char *zPat
int rc;
rc = unlink (zPath);
- if (rc!=0 && errno==ENOENT ) return SQLITE_OK;
+ if (rc != 0 && errno == ENOENT) return SQLITE_OK;
if( rc==0 && dirSync) {
int dfd;
@@ -1087,12 +1087,12 @@ almanah_vfs_delete (__attribute__ ((unused)) sqlite3_vfs *pVfs, const char *zPat
zDir[i] = '\0';
/* Open a file-descriptor on the directory. Sync. Close. */
- dfd = open (zDir, O_RDONLY, 0);
+ dfd = g_open (zDir, O_RDONLY, 0);
if (dfd < 0) {
rc = -1;
} else {
rc = fsync (dfd);
- close (dfd);
+ g_close (dfd, NULL);
}
}
return (rc == 0 ? SQLITE_OK : SQLITE_IOERR_DELETE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]