diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-12-14 17:40:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-12-14 17:40:19 +0000 |
commit | 204e0a6b3e746dafb2812b7e6bdde2f068d1c9ec (patch) | |
tree | d298377227169c4be480b26cfbc5004fd0ed8114 /src/fs/fs_tree.c | |
parent | bdf316f723e8a1fd00fd1dac9a938c587a4ee6c1 (diff) | |
download | gnunet-204e0a6b3e746dafb2812b7e6bdde2f068d1c9ec.tar.gz gnunet-204e0a6b3e746dafb2812b7e6bdde2f068d1c9ec.zip |
allow files of size 0
Diffstat (limited to 'src/fs/fs_tree.c')
-rw-r--r-- | src/fs/fs_tree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index 211714b86..05c9c55cd 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c | |||
@@ -173,7 +173,6 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, | |||
173 | { | 173 | { |
174 | struct GNUNET_FS_TreeEncoder *te; | 174 | struct GNUNET_FS_TreeEncoder *te; |
175 | 175 | ||
176 | GNUNET_assert (size > 0); | ||
177 | te = GNUNET_malloc (sizeof (struct GNUNET_FS_TreeEncoder)); | 176 | te = GNUNET_malloc (sizeof (struct GNUNET_FS_TreeEncoder)); |
178 | te->h = h; | 177 | te->h = h; |
179 | te->size = size; | 178 | te->size = size; |
@@ -253,7 +252,7 @@ GNUNET_FS_tree_calculate_block_size (uint64_t fsize, | |||
253 | uint64_t epos; | 252 | uint64_t epos; |
254 | unsigned int chks; | 253 | unsigned int chks; |
255 | 254 | ||
256 | GNUNET_assert (offset < fsize); | 255 | GNUNET_assert (offset <= fsize); |
257 | if (depth == totaldepth) | 256 | if (depth == totaldepth) |
258 | { | 257 | { |
259 | ret = DBLOCK_SIZE; | 258 | ret = DBLOCK_SIZE; |