Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/flock fix a bug gcc 8 picked up: use ~LOCK_NB to loo...
details: https://anonhg.NetBSD.org/src/rev/7d761b6ab96c
branches: trunk
changeset: 1003921:7d761b6ab96c
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Oct 04 16:27:00 2019 +0000
description:
fix a bug gcc 8 picked up: use ~LOCK_NB to look for LOCK_UN,
like the rest of the code does.
from uwe@.
diffstat:
usr.bin/flock/flock.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r e964cac89266 -r 7d761b6ab96c usr.bin/flock/flock.c
--- a/usr.bin/flock/flock.c Fri Oct 04 16:14:05 2019 +0000
+++ b/usr.bin/flock/flock.c Fri Oct 04 16:27:00 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: flock.c,v 1.11 2014/08/18 09:16:35 christos Exp $ */
+/* $NetBSD: flock.c,v 1.12 2019/10/04 16:27:00 mrg Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: flock.c,v 1.11 2014/08/18 09:16:35 christos Exp $");
+__RCSID("$NetBSD: flock.c,v 1.12 2019/10/04 16:27:00 mrg Exp $");
#include <stdio.h>
#include <string.h>
@@ -231,7 +231,7 @@
break;
default:
- if ((lock & LOCK_NB) == LOCK_UN)
+ if ((lock & ~LOCK_NB) == LOCK_UN)
usage("Unlock is only valid for descriptors");
if (strcmp(argv[1], "-c") == 0 ||
strcmp(argv[1], "--command") == 0) {
Home |
Main Index |
Thread Index |
Old Index