(hdb_lock): make gcc happy by initializing a variable
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9162 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -102,7 +102,8 @@ hdb_free_key(Key *key)
|
|||||||
krb5_error_code
|
krb5_error_code
|
||||||
hdb_lock(int fd, int operation)
|
hdb_lock(int fd, int operation)
|
||||||
{
|
{
|
||||||
int i, code;
|
int i, code = 0;
|
||||||
|
|
||||||
for(i = 0; i < 3; i++){
|
for(i = 0; i < 3; i++){
|
||||||
code = flock(fd, (operation == HDB_RLOCK ? LOCK_SH : LOCK_EX) | LOCK_NB);
|
code = flock(fd, (operation == HDB_RLOCK ? LOCK_SH : LOCK_EX) | LOCK_NB);
|
||||||
if(code == 0 || errno != EWOULDBLOCK)
|
if(code == 0 || errno != EWOULDBLOCK)
|
||||||
|
Reference in New Issue
Block a user