mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:33:32 +03:00
examples: reduce variable scopes
Closes https://github.com/curl/curl/pull/3919
This commit is contained in:
parent
918987a844
commit
10b7067eb7
11 changed files with 51 additions and 51 deletions
|
|
@ -472,8 +472,6 @@ void SignalHandler(int signo)
|
|||
int main(int argc _Unused, char **argv _Unused)
|
||||
{
|
||||
GlobalInfo g;
|
||||
int err;
|
||||
int idx;
|
||||
struct itimerspec its;
|
||||
struct epoll_event ev;
|
||||
struct epoll_event events[10];
|
||||
|
|
@ -518,8 +516,9 @@ int main(int argc _Unused, char **argv _Unused)
|
|||
fprintf(MSG_OUT, "Entering wait loop\n");
|
||||
fflush(MSG_OUT);
|
||||
while(!g_should_exit_) {
|
||||
err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct epoll_event),
|
||||
10000);
|
||||
int idx;
|
||||
int err = epoll_wait(g.epfd, events,
|
||||
sizeof(events)/sizeof(struct epoll_event), 10000);
|
||||
if(err == -1) {
|
||||
if(errno == EINTR) {
|
||||
fprintf(MSG_OUT, "note: wait interrupted\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue