Skip to content

Commit e1bc8c3

Browse files
committed
whitespace, style
Signed-off-by: Daniel A. Steffen <[email protected]>
1 parent eaab985 commit e1bc8c3

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

src/io.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,8 @@ _dispatch_disk_init(dispatch_fd_entry_t fd_entry, dev_t dev)
16011601
TAILQ_INIT(&disk->operations);
16021602
disk->cur_rq = TAILQ_FIRST(&disk->operations);
16031603
char label[45];
1604-
snprintf(label, sizeof(label), "com.apple.libdispatch-io.deviceq.%d", (int)dev);
1604+
snprintf(label, sizeof(label), "com.apple.libdispatch-io.deviceq.%d",
1605+
(int)dev);
16051606
disk->pick_queue = dispatch_queue_create(label, NULL);
16061607
TAILQ_INSERT_TAIL(&_dispatch_io_devs[hash], disk, disk_list);
16071608
out:
@@ -2398,10 +2399,11 @@ _dispatch_operation_debug_attr(dispatch_operation_t op, char* buf,
23982399
"write", op->fd_entry ? op->fd_entry->fd : -1, op->fd_entry,
23992400
op->channel, op->op_q, oqtarget && oqtarget->dq_label ?
24002401
oqtarget->dq_label : "", oqtarget, target && target->dq_label ?
2401-
target->dq_label : "", target, (long long)op->offset, op->length, op->total,
2402-
op->undelivered + op->buf_len, op->flags, op->err, op->params.low,
2403-
op->params.high, op->params.interval_flags &
2404-
DISPATCH_IO_STRICT_INTERVAL ? "(strict)" : "", (unsigned long long)op->params.interval);
2402+
target->dq_label : "", target, (long long)op->offset, op->length,
2403+
op->total, op->undelivered + op->buf_len, op->flags, op->err,
2404+
op->params.low, op->params.high, op->params.interval_flags &
2405+
DISPATCH_IO_STRICT_INTERVAL ? "(strict)" : "",
2406+
(unsigned long long)op->params.interval);
24052407
}
24062408

24072409
size_t

src/source.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ dispatch_source_create(dispatch_source_type_t type,
148148
dk->dk_kevent.ident = handle;
149149
dk->dk_kevent.flags |= EV_ADD|EV_ENABLE;
150150
dk->dk_kevent.fflags |= (uint32_t)mask;
151-
dk->dk_kevent.udata = (typeof(dk->dk_kevent.udata))dk;
151+
dk->dk_kevent.udata = (_dispatch_kevent_qos_udata_t)dk;
152152
TAILQ_INIT(&dk->dk_sources);
153153

154154
ds->ds_dkev = dk;
@@ -917,9 +917,9 @@ _dispatch_kevent_init()
917917
TAILQ_INSERT_TAIL(&_dispatch_sources[0],
918918
&_dispatch_kevent_data_add, dk_list);
919919
_dispatch_kevent_data_or.dk_kevent.udata =
920-
(typeof(_dispatch_kevent_data_or.dk_kevent.udata))&_dispatch_kevent_data_or;
920+
(_dispatch_kevent_qos_udata_t)&_dispatch_kevent_data_or;
921921
_dispatch_kevent_data_add.dk_kevent.udata =
922-
(typeof(_dispatch_kevent_data_or.dk_kevent.udata))&_dispatch_kevent_data_add;
922+
(_dispatch_kevent_qos_udata_t)&_dispatch_kevent_data_add;
923923
#endif // !DISPATCH_USE_EV_UDATA_SPECIFIC
924924
}
925925

@@ -1666,7 +1666,7 @@ _dispatch_timers_init(void)
16661666
#ifndef __LP64__
16671667
unsigned int tidx;
16681668
for (tidx = 0; tidx < DISPATCH_TIMER_COUNT; tidx++) {
1669-
_dispatch_kevent_timer[tidx].dk_kevent.udata = \
1669+
_dispatch_kevent_timer[tidx].dk_kevent.udata =
16701670
DISPATCH_KEVENT_TIMER_UDATA(tidx);
16711671
}
16721672
#endif // __LP64__
@@ -4760,11 +4760,12 @@ static size_t
47604760
_dispatch_timer_debug_attr(dispatch_source_t ds, char* buf, size_t bufsiz)
47614761
{
47624762
dispatch_source_refs_t dr = ds->ds_refs;
4763-
return dsnprintf(buf, bufsiz, "timer = { target = 0x%llx, deadline = 0x%llx,"
4764-
" last_fire = 0x%llx, interval = 0x%llx, flags = 0x%lx }, ",
4765-
(unsigned long long)ds_timer(dr).target, (unsigned long long)ds_timer(dr).deadline,
4766-
(unsigned long long)ds_timer(dr).last_fire, (unsigned long long)ds_timer(dr).interval,
4767-
ds_timer(dr).flags);
4763+
return dsnprintf(buf, bufsiz, "timer = { target = 0x%llx, deadline = 0x%llx"
4764+
", last_fire = 0x%llx, interval = 0x%llx, flags = 0x%lx }, ",
4765+
(unsigned long long)ds_timer(dr).target,
4766+
(unsigned long long)ds_timer(dr).deadline,
4767+
(unsigned long long)ds_timer(dr).last_fire,
4768+
(unsigned long long)ds_timer(dr).interval, ds_timer(dr).flags);
47684769
}
47694770

47704771
size_t

src/source_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ struct dispatch_kevent_s {
108108

109109
typedef struct dispatch_kevent_s *dispatch_kevent_t;
110110

111+
typedef typeof(((dispatch_kevent_t)NULL)->dk_kevent.udata) _dispatch_kevent_qos_udata_t;
112+
111113
struct dispatch_source_type_s {
112114
_dispatch_kevent_qos_s ke;
113115
uint64_t mask;

0 commit comments

Comments
 (0)