Mercurial > hg > mlmmj
changeset 413:1705c8e709b4
Make sure we don't shadow some vars
author | mmj |
---|---|
date | Fri, 14 Jan 2005 06:39:12 +1100 |
parents | 66991b1776df |
children | 8e19d05d7a72 |
files | src/mylocking.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mylocking.c Fri Jan 14 06:37:11 2005 +1100 +++ b/src/mylocking.c Fri Jan 14 06:39:12 2005 +1100 @@ -29,7 +29,7 @@ int myexcllock(int fd) { - int mylock; + int excllock; struct flock locktype; locktype.l_type = F_WRLCK; @@ -37,15 +37,15 @@ locktype.l_start = 0; locktype.l_len = 0; do { - mylock = fcntl(fd, F_SETLKW, &locktype); - } while(mylock < 0 && errno == EINTR); + excllock = fcntl(fd, F_SETLKW, &locktype); + } while(excllock < 0 && errno == EINTR); - return mylock; + return excllock; } int myunlock(int fd) { - int myunlock; + int unlock; struct flock locktype; locktype.l_type = F_UNLCK; @@ -53,8 +53,8 @@ locktype.l_start = 0; locktype.l_len = 0; do { - myunlock = fcntl(fd, F_SETLKW, &locktype); - } while(myunlock < 0 && errno == EINTR); + unlock = fcntl(fd, F_SETLKW, &locktype); + } while(unlock < 0 && errno == EINTR); - return myunlock; + return unlock; }