summaryrefslogtreecommitdiff
path: root/mysys/my_lock.c
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2004-05-10 21:52:24 +0200
committerunknown <ingo@mysql.com>2004-05-10 21:52:24 +0200
commit5bd4cb870fd942fa5e7d9011917032773c43b42a (patch)
tree100d96d030cb4536057abac50692fe2c1efc5f66 /mysys/my_lock.c
parentc207325aaf0cbb3781d72891c9ae95e18c6ea355 (diff)
downloadmariadb-git-5bd4cb870fd942fa5e7d9011917032773c43b42a.tar.gz
Update casts from very old my_lock.c source.
Diffstat (limited to 'mysys/my_lock.c')
-rw-r--r--mysys/my_lock.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mysys/my_lock.c b/mysys/my_lock.c
index 5058c301adb..8f915d6003a 100644
--- a/mysys/my_lock.c
+++ b/mysys/my_lock.c
@@ -117,10 +117,12 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
#if defined(HAVE_FCNTL)
{
struct flock lock;
- lock.l_type= (short) locktype;
- lock.l_whence=0L;
- lock.l_start=(long) start;
- lock.l_len=(long) length;
+
+ lock.l_type= (short) locktype;
+ lock.l_whence= SEEK_SET;
+ lock.l_start= (off_t) start;
+ lock.l_len= (off_t) length;
+
if (MyFlags & MY_DONT_WAIT)
{
if (fcntl(fd,F_SETLK,&lock) != -1) /* Check if we can lock */