better cast to the good type to avoid confusing gcc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24929 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b1459ca4b4
commit
6cb51e58bc
@ -658,7 +658,7 @@ common_user_io(int fd, off_t pos, void *buffer, size_t length, bool write)
|
||||
else
|
||||
status = descriptor->ops->fd_read(descriptor, pos, buffer, &length);
|
||||
|
||||
if (status.operator<(B_OK))
|
||||
if (status < (status_t)B_OK)
|
||||
return status;
|
||||
|
||||
if (movePosition)
|
||||
@ -724,7 +724,7 @@ common_user_vector_io(int fd, off_t pos, const iovec *userVecs, size_t count,
|
||||
&length);
|
||||
}
|
||||
|
||||
if (status.operator<(B_OK)) {
|
||||
if (status < (status_t)B_OK) {
|
||||
if (bytesTransferred == 0)
|
||||
return status;
|
||||
status = B_OK;
|
||||
|
@ -866,7 +866,7 @@ _user_recvfrom(int socket, void *data, size_t length, int flags,
|
||||
char address[MAX_SOCKET_ADDRESS_LEN];
|
||||
result = common_recvfrom(socket, data, length, flags,
|
||||
userAddress != NULL ? (sockaddr*)address : NULL, &addressLength, false);
|
||||
if (result < 0)
|
||||
if (result < (ssize_t)0)
|
||||
return result;
|
||||
|
||||
// copy address size and address back to userland
|
||||
@ -900,7 +900,7 @@ _user_recvmsg(int socket, struct msghdr *userMessage, int flags)
|
||||
SyscallRestartWrapper<ssize_t> result;
|
||||
|
||||
result = common_recvmsg(socket, &message, flags, false);
|
||||
if (result < 0)
|
||||
if (result < (ssize_t)0)
|
||||
return result;
|
||||
|
||||
// copy the address and address length back to userland
|
||||
@ -1000,7 +1000,7 @@ _user_getsockopt(int socket, int level, int option, void *userValue,
|
||||
SyscallRestartWrapper<status_t> error;
|
||||
error = common_getsockopt(socket, level, option, value, &length,
|
||||
false);
|
||||
if (error != B_OK)
|
||||
if (error != (status_t)B_OK)
|
||||
return error;
|
||||
|
||||
// copy value back to userland
|
||||
@ -1042,14 +1042,14 @@ _user_getpeername(int socket, struct sockaddr *userAddress,
|
||||
SyscallRestartWrapper<status_t> error;
|
||||
error = prepare_userland_address_result(userAddress, _addressLength,
|
||||
addressLength, true);
|
||||
if (error != B_OK)
|
||||
if (error != (status_t)B_OK)
|
||||
return error;
|
||||
|
||||
// getpeername()
|
||||
char address[MAX_SOCKET_ADDRESS_LEN];
|
||||
error = common_getpeername(socket, (sockaddr*)address, &addressLength,
|
||||
false);
|
||||
if (error != B_OK)
|
||||
if (error != (status_t)B_OK)
|
||||
return error;
|
||||
|
||||
// copy address size and address back to userland
|
||||
@ -1073,14 +1073,14 @@ _user_getsockname(int socket, struct sockaddr *userAddress,
|
||||
SyscallRestartWrapper<status_t> error;
|
||||
error = prepare_userland_address_result(userAddress, _addressLength,
|
||||
addressLength, true);
|
||||
if (error != B_OK)
|
||||
if (error != (status_t)B_OK)
|
||||
return error;
|
||||
|
||||
// getsocknam()
|
||||
char address[MAX_SOCKET_ADDRESS_LEN];
|
||||
error = common_getsockname(socket, (sockaddr*)address, &addressLength,
|
||||
false);
|
||||
if (error != B_OK)
|
||||
if (error != (status_t)B_OK)
|
||||
return error;
|
||||
|
||||
// copy address size and address back to userland
|
||||
@ -1116,7 +1116,7 @@ _user_socketpair(int family, int type, int protocol, int *userSocketVector)
|
||||
int socketVector[2];
|
||||
SyscallRestartWrapper<status_t> error;
|
||||
error = common_socketpair(family, type, protocol, socketVector, false);
|
||||
if (error != B_OK)
|
||||
if (error != (status_t)B_OK)
|
||||
return error;
|
||||
|
||||
// copy FDs back to userland
|
||||
@ -1147,7 +1147,7 @@ _user_get_next_socket_stat(int family, uint32 *_cookie, struct net_stat *_stat)
|
||||
net_stat stat;
|
||||
SyscallRestartWrapper<status_t> error;
|
||||
error = common_get_next_socket_stat(family, &cookie, &stat);
|
||||
if (error != B_OK)
|
||||
if (error != (status_t)B_OK)
|
||||
return error;
|
||||
|
||||
// copy cookie and data back to userland
|
||||
|
Loading…
Reference in New Issue
Block a user