Skip to content

Commit

Permalink
beeflock: Remove unused flag argument
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jul 8, 2022
1 parent e2fc142 commit 30e09ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/beeflock.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void usage(void)
#define BEEFLOCK_UNLOCK LOCK_UN
#define BEEFLOCK_NOBLOCK LOCK_NB

int bee_flock_fd(int fd, int operation, int flags)
int bee_flock_fd(int fd, int operation)
{
int res;

Expand Down Expand Up @@ -123,7 +123,7 @@ int bee_flock_close(int fd)
return res;
}

int bee_flock(char *filename, int operation, int flags)
int bee_flock(char *filename, int operation)
{
int res;
int fd, fd2;
Expand All @@ -134,7 +134,7 @@ int bee_flock(char *filename, int operation, int flags)
return -1;

while (1) {
res = bee_flock_fd(fd, operation, 0);
res = bee_flock_fd(fd, operation);
if (res < 0)
return -1;

Expand Down Expand Up @@ -169,7 +169,7 @@ int bee_flock(char *filename, int operation, int flags)
}


int bee_execute_command(char *command[], int flags)
int bee_execute_command(char *command[])
{
pid_t fpid, wpid;
int wstatus;
Expand Down Expand Up @@ -265,12 +265,12 @@ int main(int argc, char *argv[])
BEE_EXIT(OSERR);
}

fd = bee_flock(lockfilename, operation, 0);
fd = bee_flock(lockfilename, operation);
if (fd < 0) {
BEE_EXIT(SOFTWARE);
}

res = bee_execute_command(command, 0);
res = bee_execute_command(command);
bee_flock_close(fd);
if (res < 0) {
BEE_EXIT(SOFTWARE);
Expand Down

0 comments on commit 30e09ca

Please sign in to comment.