projects
/
oweals
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0cd086
)
fix an off-by-one error that prevented the open() check from succeeding, if stdin...
author
Felix Fietkau
<nbd@openwrt.org>
Tue, 5 Feb 2008 02:25:54 +0000
(
03:25
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 5 Feb 2008 02:25:54 +0000
(
03:25
+0100)
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index 4713c74befe6eab5935c2d6be48033c95f64204a..bc137c31788af588c0772b41a5a5a928ebe46764 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-396,7
+396,7
@@
static FILE *uci_open_stream(struct uci_context *ctx, const char *filename, int
}
fd = open(filename, mode, UCI_FILEMODE);
- if (fd <
=
0)
+ if (fd < 0)
goto error;
if (flock(fd, (write ? LOCK_EX : LOCK_SH)) < 0)