projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
822bce8
)
Fix grab_file on other than regular files.
author
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 8 Sep 2009 10:59:37 +0000
(20:29 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 8 Sep 2009 10:59:37 +0000
(20:29 +0930)
ccan/grab_file/grab_file.c
patch
|
blob
|
history
diff --git
a/ccan/grab_file/grab_file.c
b/ccan/grab_file/grab_file.c
index b3a2f54d512ea07f5c10b9e95c5cafbb59bd0771..68a3b7cde32e483ba5cd8af768be15132a2ced13 100644
(file)
--- a/
ccan/grab_file/grab_file.c
+++ b/
ccan/grab_file/grab_file.c
@@
-17,7
+17,7
@@
void *grab_fd(const void *ctx, int fd, size_t *size)
size = &s;
*size = 0;
- if (fstat(fd, &st) == 0)
+ if (fstat(fd, &st) == 0
&& S_ISREG(st.st_mode)
)
max = st.st_size;
else
max = 16384;