Skip to content

Commit 30a24d1

Browse files
RONDB-756: Fix compilation issues
1 parent c3d6dc7 commit 30a24d1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pink/rondis/string/db_operations.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ NdbRecord *entire_key_record = nullptr;
1414
NdbRecord *pk_value_record = nullptr;
1515
NdbRecord *entire_value_record = nullptr;
1616

17-
static void set_length(char *buf, Uint32 key_len) {
17+
static void set_length(char *buf, Uint32 key_len) {
1818
Uint8 *ptr = (Uint8*)buf;
1919
ptr[0] = (Uint8)(key_len & 255);
2020
ptr[1] = (Uint8)(key_len >> 8);

pink/src/pink_epoll.cc

+8-8
Original file line numberDiff line numberDiff line change
@@ -193,24 +193,24 @@ int PinkEpoll::PinkPoll(const int timeout) {
193193
}
194194
}
195195
#else
196-
int retval = epoll_wait(epfd_, events_, PINK_MAX_CLIENTS, timeout);
196+
int retval = epoll_wait(epfd_, events_.data(), PINK_MAX_CLIENTS, timeout);
197197
if (retval > 0) {
198198
num_events = retval;
199199
for (int i = 0; i < num_events; i++) {
200200
int mask = 0;
201-
firedevent_[i].fd = (events_ + i)->data.fd;
201+
firedevent_[i].fd = events_[i].data.fd;
202202

203-
if ((events_ + i)->events & EPOLLIN) {
203+
if (events_[i].events & EPOLLIN) {
204204
mask |= kRead;
205205
}
206-
if ((events_ + i)->events & EPOLLOUT) {
206+
if (events_[i].events & EPOLLOUT) {
207207
mask |= kWrite;
208208
}
209-
if ((events_ + i)->events & EPOLLERR) {
210-
mask |= kErr;
209+
if (events_[i].events & EPOLLERR) {
210+
mask |= kError;
211211
}
212-
if ((events_ + i)->events & EPOLLHUP) {
213-
mask |= kErr;
212+
if (events_[i].events & EPOLLHUP) {
213+
mask |= kError;
214214
}
215215
firedevent_[i].mask = mask;
216216
}

0 commit comments

Comments
 (0)