Line 0
Link Here
|
|
|
1 |
Index: io/iob_addfile.c |
2 |
=================================================================== |
3 |
RCS file: /cvs/libowfat/io/iob_addfile.c,v |
4 |
retrieving revision 1.2 |
5 |
retrieving revision 1.3 |
6 |
diff -u -r1.2 -r1.3 |
7 |
--- io/iob_addfile.c 26 Sep 2003 15:55:44 -0000 1.2 |
8 |
+++ io/iob_addfile.c 7 Apr 2004 08:38:41 -0000 1.3 |
9 |
@@ -1,7 +1,9 @@ |
10 |
#include "iob_internal.h" |
11 |
|
12 |
int iob_addfile(io_batch* b,int64 fd,uint64 off,uint64 n) { |
13 |
- iob_entry* e=array_allocate(&b->b,sizeof(iob_entry), |
14 |
+ iob_entry* e; |
15 |
+ if (n==0) return 1; |
16 |
+ e=array_allocate(&b->b,sizeof(iob_entry), |
17 |
array_length(&b->b,sizeof(iob_entry))); |
18 |
if (!e) return 0; |
19 |
e->type=FROMFILE; |