tests should not use ssize_t, use ares_ssize_t

pull/96/head
Brad House 8 years ago
parent 919dc45f2f
commit 60561aebc1
  1. 2
      test/ares-fuzz.c
  2. 4
      test/ares-test-internal.cc

@ -25,7 +25,7 @@ static unsigned char afl_buffer[kMaxAflInputSize];
int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size);
static void ProcessFile(int fd) {
ssize_t count = read(fd, afl_buffer, kMaxAflInputSize);
ares_ssize_t count = read(fd, afl_buffer, kMaxAflInputSize);
/*
* Make a copy of the data so that it's not part of a larger
* buffer (where buffer overflows would go unnoticed).

@ -230,7 +230,7 @@ TEST(Misc, Bitncmp) {
}
TEST_F(LibraryTest, Casts) {
ssize_t ssz = 100;
ares_ssize_t ssz = 100;
unsigned int u = 100;
int i = 100;
long l = 100;
@ -447,7 +447,7 @@ const struct ares_socket_functions VirtualizeIO::default_functions = {
[](ares_socket_t s, const struct sockaddr * addr, socklen_t len, void *) {
return ::connect(s, addr, len);
},
[](ares_socket_t s, void * dst, size_t len, int flags, struct sockaddr * addr, socklen_t * alen, void *) -> ssize_t {
[](ares_socket_t s, void * dst, size_t len, int flags, struct sockaddr * addr, socklen_t * alen, void *) -> ares_ssize_t {
#ifdef HAVE_RECVFROM
return ::recvfrom(s, reinterpret_cast<RECV_TYPE_ARG2>(dst), len, flags, addr, alen);
#else

Loading…
Cancel
Save