Replace off64_t with uint64_t where it makes sense to do so.
It looks like off64_t was propagated through the code from the return type of lseek64(), which isn't appropriate in many of the places we're using it.
This commit is contained in:
@@ -139,7 +139,7 @@ enum mirror_state mirror_get_state( struct mirror * mirror )
|
||||
void mirror_init( struct mirror * mirror, const char * filename )
|
||||
{
|
||||
int map_fd;
|
||||
off64_t size;
|
||||
uint64_t size;
|
||||
|
||||
NULLCHECK( mirror );
|
||||
NULLCHECK( filename );
|
||||
@@ -270,7 +270,7 @@ void mirror_cleanup( struct server * serve,
|
||||
}
|
||||
|
||||
|
||||
int mirror_connect( struct mirror * mirror, off64_t local_size )
|
||||
int mirror_connect( struct mirror * mirror, uint64_t local_size )
|
||||
{
|
||||
struct sockaddr * connect_from = NULL;
|
||||
int connected = 0;
|
||||
@@ -292,7 +292,7 @@ int mirror_connect( struct mirror * mirror, off64_t local_size )
|
||||
"Select failed." );
|
||||
|
||||
if( FD_ISSET( mirror->client, &fds ) ){
|
||||
off64_t remote_size;
|
||||
uint64_t remote_size;
|
||||
if ( socket_nbd_read_hello( mirror->client, &remote_size ) ) {
|
||||
if( remote_size == local_size ){
|
||||
connected = 1;
|
||||
|
Reference in New Issue
Block a user