[almanah] vfs: Fix a signed/unsigned integer comparison



commit 654bdda131bd39ae066bd4a7df8e28a41142bb0f
Author: Philip Withnall <philip tecnocode co uk>
Date:   Tue Dec 6 00:57:55 2016 +0000

    vfs: Fix a signed/unsigned integer comparison

 src/vfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/vfs.c b/src/vfs.c
index 08a313a..4735d57 100644
--- a/src/vfs.c
+++ b/src/vfs.c
@@ -219,7 +219,7 @@ _gpgme_seek_cb (void *handle, off_t offset, int whence)
                npm_closure->offset += offset;
                break;
        case SEEK_END:
-               if (offset > 0 || -offset > npm_closure->size) {
+               if (offset > 0 || (gsize) -offset > npm_closure->size) {
                        errno = EINVAL;
                        return -1;
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]