Przeglądaj źródła

White space.

master
Richard Nyberg 19 lat temu
rodzic
commit
b2a877537a
2 zmienionych plików z 11 dodań i 11 usunięć
  1. +10
    -10
      btpd/content.c
  2. +1
    -1
      misc/stream.c

+ 10
- 10
btpd/content.c Wyświetl plik

@@ -154,21 +154,21 @@ static int
test_hash(struct torrent *tp, uint8_t *hash, uint32_t index)
{
if (tp->meta.piece_hash != NULL)
return bcmp(hash, tp->meta.piece_hash[index], SHA_DIGEST_LENGTH);
return bcmp(hash, tp->meta.piece_hash[index], SHA_DIGEST_LENGTH);
else {
char piece_hash[SHA_DIGEST_LENGTH];
int fd;
int err;
char piece_hash[SHA_DIGEST_LENGTH];
int fd;
int err;

err = vopen(&fd, O_RDONLY, "library/%s/torrent", tp->relpath);
if (err != 0)
btpd_err("test_hash: %s\n", strerror(err));
err = vopen(&fd, O_RDONLY, "library/%s/torrent", tp->relpath);
if (err != 0)
btpd_err("test_hash: %s\n", strerror(err));

lseek(fd, tp->meta.pieces_off + index * SHA_DIGEST_LENGTH, SEEK_SET);
lseek(fd, tp->meta.pieces_off + index * SHA_DIGEST_LENGTH, SEEK_SET);
read(fd, piece_hash, SHA_DIGEST_LENGTH);
close(fd);
close(fd);

return bcmp(hash, piece_hash, SHA_DIGEST_LENGTH);
return bcmp(hash, piece_hash, SHA_DIGEST_LENGTH);
}
}



+ 1
- 1
misc/stream.c Wyświetl plik

@@ -59,7 +59,7 @@ bts_seek(struct bt_stream *bts, off_t off)
}
} else if (bts->fd != -1)
lseek(bts->fd, off, SEEK_SET);
bts->index = i;
bts->f_off = off;



Ładowanie…
Anuluj
Zapisz