Skip to content

Commit

Permalink
Merge remote-tracking branch 'cgutman/fix-warnings'
Browse files Browse the repository at this point in the history
  • Loading branch information
irtimmer committed May 1, 2019
2 parents 7f4f1cb + f305e23 commit 0054070
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ void loop_remove_fd(int fd) {
int fdindex;

for (int i=0;i<numFds;i++) {
if (fds[i].fd = fd)
if (fds[i].fd == fd) {
fdindex = i;
break;
}
}

if (fdindex != numFds && numFds > 0) {
memcpy(&fds[fdindex], &fds[numFds], sizeof(struct pollfd));
memcpy(&fdHandlers[fdindex], &fdHandlers[numFds], sizeof(FdHandler*));
memcpy(&fdHandlers[fdindex], &fdHandlers[numFds], sizeof(FdHandler));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static void stream(PSERVER_DATA server, PCONFIGURATION config, enum platform sys
#ifdef HAVE_SDL
gamepads += sdl_gamepads;
#endif
int gamepad_mask;
int gamepad_mask = 0;
for (int i = 0; i < gamepads && i < 4; i++)
gamepad_mask = (gamepad_mask << 1) + 1;

Expand Down

0 comments on commit 0054070

Please sign in to comment.