summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliaotonglang <liaotonglang@gmail.com>2023-05-05 15:13:05 +0800
committerAzat Khuzhin <a3at.mail@gmail.com>2023-05-05 22:42:43 +0200
commitd06e573c600c46d1c4585be78f4329b300fb4a65 (patch)
treee9111a13cf43bc2b988e00c3520d251c951339dc
parentbdb343e1801a0ced6e79fdd20f063323389c771c (diff)
downloadlibevent-d06e573c600c46d1c4585be78f4329b300fb4a65.tar.gz
style fix: use tab for indent
-rw-r--r--event.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/event.c b/event.c
index 74678e1f..c2db063f 100644
--- a/event.c
+++ b/event.c
@@ -475,7 +475,7 @@ update_time_cache(struct event_base *base)
{
base->tv_cache.tv_sec = 0;
if (!(base->flags & EVENT_BASE_FLAG_NO_CACHE_TIME))
- gettime(base, &base->tv_cache);
+ gettime(base, &base->tv_cache);
}
int
@@ -1111,15 +1111,15 @@ done:
int
event_gettime_monotonic(struct event_base *base, struct timeval *tv)
{
- int rv = -1;
+ int rv = -1;
- if (base && tv) {
- EVBASE_ACQUIRE_LOCK(base, th_base_lock);
- rv = evutil_gettime_monotonic_(&(base->monotonic_timer), tv);
- EVBASE_RELEASE_LOCK(base, th_base_lock);
- }
+ if (base && tv) {
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ rv = evutil_gettime_monotonic_(&(base->monotonic_timer), tv);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ }
- return rv;
+ return rv;
}
const char **
@@ -1599,10 +1599,10 @@ event_persist_closure(struct event_base *base, struct event *ev)
{
void (*evcb_callback)(evutil_socket_t, short, void *);
- // Other fields of *ev that must be stored before executing
- evutil_socket_t evcb_fd;
- short evcb_res;
- void *evcb_arg;
+ // Other fields of *ev that must be stored before executing
+ evutil_socket_t evcb_fd;
+ short evcb_res;
+ void *evcb_arg;
/* reschedule the persistent event if we have a timeout. */
if (ev->ev_io_timeout.tv_sec || ev->ev_io_timeout.tv_usec) {
@@ -1648,15 +1648,15 @@ event_persist_closure(struct event_base *base, struct event *ev)
// Save our callback before we release the lock
evcb_callback = ev->ev_callback;
- evcb_fd = ev->ev_fd;
- evcb_res = ev->ev_res;
- evcb_arg = ev->ev_arg;
+ evcb_fd = ev->ev_fd;
+ evcb_res = ev->ev_res;
+ evcb_arg = ev->ev_arg;
// Release the lock
EVBASE_RELEASE_LOCK(base, th_base_lock);
// Execute the callback
- (evcb_callback)(evcb_fd, evcb_res, evcb_arg);
+ (evcb_callback)(evcb_fd, evcb_res, evcb_arg);
}
/*