Skip to content

Commit

Permalink
Use evutil_socket_t, not int, when logging socket errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmathewson committed Dec 22, 2009
1 parent c51bb3c commit 292467c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions log-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#ifndef _LOG_H_
#define _LOG_H_

#include <event2/util.h>

#ifdef __GNUC__
#define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b)))
#else
Expand All @@ -37,8 +39,8 @@

void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3);
void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2);
void event_sock_err(int eval, int sock, const char *fmt, ...) EV_CHECK_FMT(3,4);
void event_sock_warn(int sock, const char *fmt, ...) EV_CHECK_FMT(2,3);
void event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(3,4);
void event_sock_warn(evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(2,3);
void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3);
void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2);
void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2);
Expand Down
2 changes: 1 addition & 1 deletion log.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...)
}

void
event_sock_warn(int sock, const char *fmt, ...)
event_sock_warn(evutil_socket_t sock, const char *fmt, ...)
{
va_list ap;
int err = evutil_socket_geterror(sock);
Expand Down

0 comments on commit 292467c

Please sign in to comment.