Fix some issues revealed by coverity

This commit is contained in:
Mike Gelfand 2015-05-09 14:10:55 +00:00
parent 4a23c94252
commit e0dc1d6735
2 changed files with 4 additions and 4 deletions

View File

@ -152,11 +152,11 @@ tr_socket_t tr_netAccept (tr_session * session,
tr_address * setme_addr,
tr_port * setme_port);
int tr_netSetTOS (tr_socket_t s,
void tr_netSetTOS (tr_socket_t s,
int tos);
int tr_netSetCongestionControl (tr_socket_t s,
const char * algorithm);
void tr_netSetCongestionControl (tr_socket_t s,
const char * algorithm);
void tr_netClose (tr_session * session,
tr_socket_t s);

View File

@ -93,7 +93,7 @@ verifyTorrent (tr_torrent * tor, bool * stopFlag)
bytesThisPass = numRead;
tr_sha1_update (sha, buffer, bytesThisPass);
#if defined HAVE_POSIX_FADVISE && defined POSIX_FADV_DONTNEED
posix_fadvise (fd, filePos, bytesThisPass, POSIX_FADV_DONTNEED);
(void) posix_fadvise (fd, filePos, bytesThisPass, POSIX_FADV_DONTNEED);
#endif
}
}