diff options
author | unknown <ingo@mysql.com> | 2004-05-10 21:52:24 +0200 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2004-05-10 21:52:24 +0200 |
commit | 5bd4cb870fd942fa5e7d9011917032773c43b42a (patch) | |
tree | 100d96d030cb4536057abac50692fe2c1efc5f66 /mysys/my_lock.c | |
parent | c207325aaf0cbb3781d72891c9ae95e18c6ea355 (diff) | |
download | mariadb-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.c | 10 |
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 */ |