Permalink
Browse files

Clean up lingering _identifiers.

  • Loading branch information...
1 parent c7848fa commit 946b5841c22c4b050513ecf6d5a01bd521b05673 Nick Mathewson committed Feb 29, 2012
Showing with 126 additions and 126 deletions.
  1. +2 −2 arc4random.c
  2. +3 −3 bufferevent.c
  3. +6 −6 bufferevent_filter.c
  4. +2 −2 evconfig-private.h.in
  5. +8 −8 evdns.c
  6. +2 −2 event_iocp.c
  7. +14 −14 evmap.c
  8. +18 −18 evthread-internal.h
  9. +4 −4 evthread.c
  10. +13 −13 evthread_pthread.c
  11. +20 −20 evthread_win32.c
  12. +1 −1 evutil.c
  13. +1 −1 evutil_rand.c
  14. +1 −1 include/event2/dns.h
  15. +2 −2 include/event2/rpc.h
  16. +3 −3 include/event2/util.h
  17. +6 −6 poll.c
  18. +9 −9 test/regress.c
  19. +11 −11 win32select.c
View
@@ -479,9 +479,9 @@ arc4random(void)
#endif
ARC4RANDOM_EXPORT void
-arc4random_buf(void *_buf, size_t n)
+arc4random_buf(void *buf_, size_t n)
{
- unsigned char *buf = _buf;
+ unsigned char *buf = buf_;
ARC4_LOCK_();
arc4_stir_if_needed();
while (n--) {
View
@@ -131,7 +131,7 @@ bufferevent_inbuf_wm_cb(struct evbuffer *buf,
}
static void
-bufferevent_run_deferred_callbacks_locked(struct deferred_cb *_, void *arg)
+bufferevent_run_deferred_callbacks_locked(struct deferred_cb *cb, void *arg)
{
struct bufferevent_private *bufev_private = arg;
struct bufferevent *bufev = &bufev_private->bev;
@@ -164,7 +164,7 @@ bufferevent_run_deferred_callbacks_locked(struct deferred_cb *_, void *arg)
}
static void
-bufferevent_run_deferred_callbacks_unlocked(struct deferred_cb *_, void *arg)
+bufferevent_run_deferred_callbacks_unlocked(struct deferred_cb *cb, void *arg)
{
struct bufferevent_private *bufev_private = arg;
struct bufferevent *bufev = &bufev_private->bev;
@@ -608,7 +608,7 @@ bufferevent_incref_and_lock_(struct bufferevent *bufev)
#if 0
static void
-_bufferevent_transfer_lock_ownership(struct bufferevent *donor,
+bufferevent_transfer_lock_ownership_(struct bufferevent *donor,
struct bufferevent *recipient)
{
struct bufferevent_private *d = BEV_UPCAST(donor);
View
@@ -413,9 +413,9 @@ bufferevent_filtered_outbuf_cb(struct evbuffer *buf,
/* Called when the underlying socket has read. */
static void
-be_filter_readcb(struct bufferevent *underlying, void *_me)
+be_filter_readcb(struct bufferevent *underlying, void *me_)
{
- struct bufferevent_filtered *bevf = _me;
+ struct bufferevent_filtered *bevf = me_;
enum bufferevent_filter_result res;
enum bufferevent_flush_mode state;
struct bufferevent *bufev = downcast(bevf);
@@ -445,9 +445,9 @@ be_filter_readcb(struct bufferevent *underlying, void *_me)
/* Called when the underlying socket has drained enough that we can write to
it. */
static void
-be_filter_writecb(struct bufferevent *underlying, void *_me)
+be_filter_writecb(struct bufferevent *underlying, void *me_)
{
- struct bufferevent_filtered *bevf = _me;
+ struct bufferevent_filtered *bevf = me_;
struct bufferevent *bev = downcast(bevf);
int processed_any = 0;
@@ -458,9 +458,9 @@ be_filter_writecb(struct bufferevent *underlying, void *_me)
/* Called when the underlying socket has given us an error */
static void
-be_filter_eventcb(struct bufferevent *underlying, short what, void *_me)
+be_filter_eventcb(struct bufferevent *underlying, short what, void *me_)
{
- struct bufferevent_filtered *bevf = _me;
+ struct bufferevent_filtered *bevf = me_;
struct bufferevent *bev = downcast(bevf);
bufferevent_incref_and_lock_(bev);
View
@@ -1,7 +1,7 @@
/* evconfig-private.h template - see "Configuration Header Templates" */
/* in AC manual. Kevin Bowling <kevin.bowling@kev009.com */
-#ifndef _EVENT_EVCONFIG__PRIVATE_H
-#define _EVENT_EVCONFIG__PRIVATE_H
+#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
+#define EVCONFIG_PRIVATE_H_INCLUDED_
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
View
16 evdns.c
@@ -1736,9 +1736,9 @@ evdns_close_server_port(struct evdns_server_port *port)
/* exported function */
int
-evdns_server_request_add_reply(struct evdns_server_request *_req, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data)
+evdns_server_request_add_reply(struct evdns_server_request *req_, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data)
{
- struct server_request *req = TO_SERVER_REQUEST(_req);
+ struct server_request *req = TO_SERVER_REQUEST(req_);
struct server_reply_item **itemp, *item;
int *countp;
int result = -1;
@@ -1966,9 +1966,9 @@ evdns_server_request_format_response(struct server_request *req, int err)
/* exported function */
int
-evdns_server_request_respond(struct evdns_server_request *_req, int err)
+evdns_server_request_respond(struct evdns_server_request *req_, int err)
{
- struct server_request *req = TO_SERVER_REQUEST(_req);
+ struct server_request *req = TO_SERVER_REQUEST(req_);
struct evdns_server_port *port = req->port;
int r = -1;
@@ -2114,18 +2114,18 @@ server_port_free(struct evdns_server_port *port)
/* exported function */
int
-evdns_server_request_drop(struct evdns_server_request *_req)
+evdns_server_request_drop(struct evdns_server_request *req_)
{
- struct server_request *req = TO_SERVER_REQUEST(_req);
+ struct server_request *req = TO_SERVER_REQUEST(req_);
server_request_free(req);
return 0;
}
/* exported function */
int
-evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, int addr_len)
+evdns_server_request_get_requesting_addr(struct evdns_server_request *req_, struct sockaddr *sa, int addr_len)
{
- struct server_request *req = TO_SERVER_REQUEST(_req);
+ struct server_request *req = TO_SERVER_REQUEST(req_);
if (addr_len < (int)req->addrlen)
return -1;
memcpy(sa, &(req->addr), req->addrlen);
View
@@ -61,9 +61,9 @@ handle_entry(OVERLAPPED *o, ULONG_PTR completion_key, DWORD nBytes, int ok)
}
static void
-loop(void *_port)
+loop(void *port_)
{
- struct event_iocp_port *port = _port;
+ struct event_iocp_port *port = port_;
long ms = port->ms;
HANDLE p = port->port;
View
28 evmap.c
@@ -111,30 +111,30 @@ HT_GENERATE(event_io_map, event_map_entry, map_node, hashsocket, eqsocket,
#define GET_IO_SLOT(x, map, slot, type) \
do { \
- struct event_map_entry _key, *_ent; \
- _key.fd = slot; \
- _ent = HT_FIND(event_io_map, map, &_key); \
- (x) = _ent ? &_ent->ent.type : NULL; \
+ struct event_map_entry key_, *ent_; \
+ key_.fd = slot; \
+ ent_ = HT_FIND(event_io_map, map, &key_); \
+ (x) = ent_ ? &ent_->ent.type : NULL; \
} while (0);
#define GET_IO_SLOT_AND_CTOR(x, map, slot, type, ctor, fdinfo_len) \
do { \
- struct event_map_entry _key, *_ent; \
- _key.fd = slot; \
+ struct event_map_entry key_, *ent_; \
+ key_.fd = slot; \
HT_FIND_OR_INSERT_(event_io_map, map_node, hashsocket, map, \
- event_map_entry, &_key, ptr, \
+ event_map_entry, &key_, ptr, \
{ \
- _ent = *ptr; \
+ ent_ = *ptr; \
}, \
{ \
- _ent = mm_calloc(1,sizeof(struct event_map_entry)+fdinfo_len); \
- if (EVUTIL_UNLIKELY(_ent == NULL)) \
+ ent_ = mm_calloc(1,sizeof(struct event_map_entry)+fdinfo_len); \
+ if (EVUTIL_UNLIKELY(ent_ == NULL)) \
return (-1); \
- _ent->fd = slot; \
- (ctor)(&_ent->ent.type); \
- HT_FOI_INSERT_(map_node, map, &_key, _ent, ptr) \
+ ent_->fd = slot; \
+ (ctor)(&ent_->ent.type); \
+ HT_FOI_INSERT_(map_node, map, &key_, ent_, ptr) \
}); \
- (x) = &_ent->ent.type; \
+ (x) = &ent_->ent.type; \
} while (0)
void evmap_io_initmap_(struct event_io_map *ctx)
View
@@ -81,9 +81,9 @@ extern int evthread_lock_debugging_enabled_;
/** Free a given lock, if it is present and locking is enabled. */
#define EVTHREAD_FREE_LOCK(lockvar, locktype) \
do { \
- void *_lock_tmp_ = (lockvar); \
- if (_lock_tmp_ && evthread_lock_fns_.free) \
- evthread_lock_fns_.free(_lock_tmp_, (locktype)); \
+ void *lock_tmp_ = (lockvar); \
+ if (lock_tmp_ && evthread_lock_fns_.free) \
+ evthread_lock_fns_.free(lock_tmp_, (locktype)); \
} while (0)
/** Acquire a lock. */
@@ -205,9 +205,9 @@ int evthreadimpl_locking_enabled_(void);
#define EVTHREAD_FREE_LOCK(lockvar, locktype) \
do { \
- void *_lock_tmp_ = (lockvar); \
- if (_lock_tmp_) \
- evthreadimpl_lock_free_(_lock_tmp_, (locktype)); \
+ void *lock_tmp_ = (lockvar); \
+ if (lock_tmp_) \
+ evthreadimpl_lock_free_(lock_tmp_, (locktype)); \
} while (0)
/** Acquire a lock. */
@@ -337,22 +337,22 @@ EVLOCK_TRY_LOCK_(void *lock)
* so that two threads locking two locks with LOCK2 will not deadlock. */
#define EVLOCK_LOCK2(lock1,lock2,mode1,mode2) \
do { \
- void *_lock1_tmplock = (lock1); \
- void *_lock2_tmplock = (lock2); \
- EVLOCK_SORTLOCKS_(_lock1_tmplock,_lock2_tmplock); \
- EVLOCK_LOCK(_lock1_tmplock,mode1); \
- if (_lock2_tmplock != _lock1_tmplock) \
- EVLOCK_LOCK(_lock2_tmplock,mode2); \
+ void *lock1_tmplock_ = (lock1); \
+ void *lock2_tmplock_ = (lock2); \
+ EVLOCK_SORTLOCKS_(lock1_tmplock_,lock2_tmplock_); \
+ EVLOCK_LOCK(lock1_tmplock_,mode1); \
+ if (lock2_tmplock_ != lock1_tmplock_) \
+ EVLOCK_LOCK(lock2_tmplock_,mode2); \
} while (0)
/** Release both lock1 and lock2. */
#define EVLOCK_UNLOCK2(lock1,lock2,mode1,mode2) \
do { \
- void *_lock1_tmplock = (lock1); \
- void *_lock2_tmplock = (lock2); \
- EVLOCK_SORTLOCKS_(_lock1_tmplock,_lock2_tmplock); \
- if (_lock2_tmplock != _lock1_tmplock) \
- EVLOCK_UNLOCK(_lock2_tmplock,mode2); \
- EVLOCK_UNLOCK(_lock1_tmplock,mode1); \
+ void *lock1_tmplock_ = (lock1); \
+ void *lock2_tmplock_ = (lock2); \
+ EVLOCK_SORTLOCKS_(lock1_tmplock_,lock2_tmplock_); \
+ if (lock2_tmplock_ != lock1_tmplock_) \
+ EVLOCK_UNLOCK(lock2_tmplock_,mode2); \
+ EVLOCK_UNLOCK(lock1_tmplock_,mode1); \
} while (0)
int evthread_is_debug_lock_held_(void *lock);
View
@@ -262,15 +262,15 @@ debug_lock_unlock(unsigned mode, void *lock_)
}
static int
-debug_cond_wait(void *_cond, void *_lock, const struct timeval *tv)
+debug_cond_wait(void *cond_, void *lock_, const struct timeval *tv)
{
int r;
- struct debug_lock *lock = _lock;
+ struct debug_lock *lock = lock_;
EVUTIL_ASSERT(lock);
EVUTIL_ASSERT(DEBUG_LOCK_SIG == lock->signature);
- EVLOCK_ASSERT_LOCKED(_lock);
+ EVLOCK_ASSERT_LOCKED(lock_);
evthread_debug_lock_mark_unlocked(0, lock);
- r = original_cond_fns_.wait_condition(_cond, lock->lock, tv);
+ r = original_cond_fns_.wait_condition(cond_, lock->lock, tv);
evthread_debug_lock_mark_locked(0, lock);
return r;
}
View
@@ -58,27 +58,27 @@ evthread_posix_lock_alloc(unsigned locktype)
}
static void
-evthread_posix_lock_free(void *_lock, unsigned locktype)
+evthread_posix_lock_free(void *lock_, unsigned locktype)
{
- pthread_mutex_t *lock = _lock;
+ pthread_mutex_t *lock = lock_;
pthread_mutex_destroy(lock);
mm_free(lock);
}
static int
-evthread_posix_lock(unsigned mode, void *_lock)
+evthread_posix_lock(unsigned mode, void *lock_)
{
- pthread_mutex_t *lock = _lock;
+ pthread_mutex_t *lock = lock_;
if (mode & EVTHREAD_TRY)
return pthread_mutex_trylock(lock);
else
return pthread_mutex_lock(lock);
}
static int
-evthread_posix_unlock(unsigned mode, void *_lock)
+evthread_posix_unlock(unsigned mode, void *lock_)
{
- pthread_mutex_t *lock = _lock;
+ pthread_mutex_t *lock = lock_;
return pthread_mutex_unlock(lock);
}
@@ -114,17 +114,17 @@ evthread_posix_cond_alloc(unsigned condflags)
}
static void
-evthread_posix_cond_free(void *_cond)
+evthread_posix_cond_free(void *cond_)
{
- pthread_cond_t *cond = _cond;
+ pthread_cond_t *cond = cond_;
pthread_cond_destroy(cond);
mm_free(cond);
}
static int
-evthread_posix_cond_signal(void *_cond, int broadcast)
+evthread_posix_cond_signal(void *cond_, int broadcast)
{
- pthread_cond_t *cond = _cond;
+ pthread_cond_t *cond = cond_;
int r;
if (broadcast)
r = pthread_cond_broadcast(cond);
@@ -134,11 +134,11 @@ evthread_posix_cond_signal(void *_cond, int broadcast)
}
static int
-evthread_posix_cond_wait(void *_cond, void *_lock, const struct timeval *tv)
+evthread_posix_cond_wait(void *cond_, void *lock_, const struct timeval *tv)
{
int r;
- pthread_cond_t *cond = _cond;
- pthread_mutex_t *lock = _lock;
+ pthread_cond_t *cond = cond_;
+ pthread_mutex_t *lock = lock_;
if (tv) {
struct timeval now, abstime;
Oops, something went wrong.

0 comments on commit 946b584

Please sign in to comment.