Fix a few warnings on OpenBSD

- redeclaration of dst_size

- arpa/inet.h requires netinet/in.h first

- don't use a local with the same name as a global - it isn't needed so
  remove it
This commit is contained in:
Nicholas Marriott 2011-07-02 21:49:07 -04:00 committed by Nick Mathewson
parent e934096490
commit 8ee9f9c1cf
3 changed files with 5 additions and 7 deletions

View File

@ -158,7 +158,7 @@ be_pair_transfer(struct bufferevent *src, struct bufferevent *dst,
evbuffer_unfreeze(dst->input, 0);
if (dst->wm_read.high) {
size_t dst_size = evbuffer_get_length(dst->input);
dst_size = evbuffer_get_length(dst->input);
if (dst_size < dst->wm_read.high) {
n = dst->wm_read.high - dst_size;
evbuffer_remove_buffer(src->output, dst->input, n);

View File

@ -55,15 +55,15 @@
#include <limits.h>
#include <stdio.h>
#include <string.h>
#ifdef _EVENT_HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef _EVENT_HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef _EVENT_HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
#ifdef _EVENT_HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifndef _EVENT_HAVE_GETTIMEOFDAY
#include <sys/timeb.h>

View File

@ -223,7 +223,6 @@ ht_string_hash(const char *s)
void *data) \
{ \
unsigned idx; \
int remove; \
struct type **p, **nextp, *next; \
if (!head->hth_table) \
return; \
@ -232,8 +231,7 @@ ht_string_hash(const char *s)
while (*p) { \
nextp = &(*p)->field.hte_next; \
next = *nextp; \
remove = fn(*p, data); \
if (remove) { \
if (fn(*p, data)) { \
--head->hth_n_entries; \
*p = next; \
} else { \