projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3dbfe0
)
dup may return < 0
author
Alan T. DeKok
<aland@freeradius.org>
Thu, 21 Feb 2013 00:48:00 +0000
(19:48 -0500)
committer
Alan T. DeKok
<aland@freeradius.org>
Thu, 21 Feb 2013 00:48:00 +0000
(19:48 -0500)
src/main/command.c
patch
|
blob
|
history
diff --git
a/src/main/command.c
b/src/main/command.c
index
252691a
..
ad76d79
100644
(file)
--- a/
src/main/command.c
+++ b/
src/main/command.c
@@
-719,7
+719,8
@@
static int command_show_xml(rad_listen_t *listener, UNUSED int argc, UNUSED char
FILE *fp;
fd = dup(listener->fd);
- if (!fd) return 0;
+ if (fd < 0) return 0;
+
fp = fdopen(fd, "a");
if (!fp) {
cprintf(listener, "ERROR: Can't dup %s\n", strerror(errno));