Commit e640e493 authored by Niels Möller's avatar Niels Möller
Browse files

(seed_file_lock): Compare return value from

fcntl to -1; according to the Solaris 10 man page, the return
value on success not -1 but otherwise not specified at all.

Rev: src/seed_file.c:1.2
parent 1e091fcd
......@@ -62,13 +62,13 @@ seed_file_lock(int fd, int wait)
fl.l_start = 0;
fl.l_len = 0; /* Means entire file. */
if (fcntl(fd, F_SETLK, &fl) == 0)
if (fcntl(fd, F_SETLK, &fl) != -1)
return 1;
if (wait)
{
werror("Waiting for seed file lock...\n");
return (fcntl(fd, F_SETLKW, &fl) == 0);
return (fcntl(fd, F_SETLKW, &fl) != -1);
}
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment