...
This commit is contained in:
parent
41906cf7db
commit
3aaa69b36c
@ -1065,7 +1065,7 @@ mark_monitored_pids(pid_t pid, int status) {
|
||||
reaped_pids[reaped_pids_count].status = status;
|
||||
reaped_pids[reaped_pids_count++].pid = pid;
|
||||
}
|
||||
remove_from_array(monitored_pids, (size_t)i, monitored_pids_count);
|
||||
remove_i_from_array(monitored_pids, (size_t)i, monitored_pids_count);
|
||||
}
|
||||
}
|
||||
children_mutex(unlock);
|
||||
|
||||
@ -257,7 +257,7 @@ typedef struct {FONTS_DATA_HEAD} *FONTS_DATA_HANDLE;
|
||||
(base)->capacity = _newcap; \
|
||||
}
|
||||
|
||||
#define remove_from_array(array, i, count) { \
|
||||
#define remove_i_from_array(array, i, count) { \
|
||||
count--; \
|
||||
if (i < count) { \
|
||||
memmove(array + i, array + i + 1, sizeof(array[0]) * (count - 1)); \
|
||||
|
||||
@ -45,7 +45,7 @@ remove_timer(EventLoopData *eld, id_type timer_id) {
|
||||
for (nfds_t i = 0; i < eld->timers_count; i++) {
|
||||
if (eld->timers[i].id == timer_id) {
|
||||
if (eld->timers[i].cleanup) eld->timers[i].cleanup(timer_id, eld->timers[i].callback_data);
|
||||
remove_from_array(eld->timers, i, eld->timers_count);
|
||||
remove_i_from_array(eld->timers, i, eld->timers_count);
|
||||
update_timers(eld);
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user