diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-30 19:56:05 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-30 19:57:10 +0100 |
commit | 8daaa5d99bfd848c76f98de952289a26f93cca3c (patch) | |
tree | 4b4bda79c4bc8979372aee2d7ac865decda224b6 | |
parent | afaacdeb8d98420fafd6c2ae428e404e60b239f2 (diff) | |
download | samba-8daaa5d99bfd848c76f98de952289a26f93cca3c.tar.gz samba-8daaa5d99bfd848c76f98de952289a26f93cca3c.tar.bz2 samba-8daaa5d99bfd848c76f98de952289a26f93cca3c.zip |
Fix some IBM checker warnings
(This used to be commit 0341b0be49fef5e6003a170100388b5c47a41e67)
-rw-r--r-- | source3/torture/cmd_vfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index f3b98862fe..82a28bd868 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -575,7 +575,7 @@ static NTSTATUS cmd_fstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, } fd = atoi(argv[1]); - if (fd < 0 || fd > 1024) { + if (fd < 0 || fd >= 1024) { printf("fstat: error=%d (file descriptor out of range)\n", EBADF); return NT_STATUS_OK; } @@ -710,7 +710,7 @@ static NTSTATUS cmd_fchmod(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, fd = atoi(argv[1]); mode = atoi(argv[2]); - if (fd < 0 || fd > 1024) { + if (fd < 0 || fd >= 1024) { printf("fchmod: error=%d (file descriptor out of range)\n", EBADF); return NT_STATUS_OK; } @@ -763,7 +763,7 @@ static NTSTATUS cmd_fchown(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, uid = atoi(argv[2]); gid = atoi(argv[3]); fd = atoi(argv[1]); - if (fd < 0 || fd > 1024) { + if (fd < 0 || fd >= 1024) { printf("fchown: faliure=%d (file descriptor out of range)\n", EBADF); return NT_STATUS_OK; } @@ -822,7 +822,7 @@ static NTSTATUS cmd_ftruncate(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int ar fd = atoi(argv[1]); off = atoi(argv[2]); - if (fd < 0 || fd > 1024) { + if (fd < 0 || fd >= 1024) { printf("ftruncate: error=%d (file descriptor out of range)\n", EBADF); return NT_STATUS_OK; } |