diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -64,7 +64,7 @@ static int daemon_pipe; | |||
| 64 | 64 | ||
| 65 | static int report_to_parent = 0; | 65 | static int report_to_parent = 0; |
| 66 | 66 | ||
| 67 | int create_socket(void) { | 67 | static int create_socket(void) { |
| 68 | struct sockaddr_un bind_addr; | 68 | struct sockaddr_un bind_addr; |
| 69 | int listenfd; | 69 | int listenfd; |
| 70 | 70 | ||
| @@ -98,7 +98,7 @@ int create_socket(void) { | |||
| 98 | return listenfd; | 98 | return listenfd; |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | void handle_signal(int sig) | 101 | static void handle_signal(int sig) |
| 102 | { | 102 | { |
| 103 | if (sig != SIGUSR1 && sig != SIGUSR2) { | 103 | if (sig != SIGUSR1 && sig != SIGUSR2) { |
| 104 | usbmuxd_log(LL_NOTICE,"Caught signal %d, exiting", sig); | 104 | usbmuxd_log(LL_NOTICE,"Caught signal %d, exiting", sig); |
| @@ -124,7 +124,7 @@ void handle_signal(int sig) | |||
| 124 | } | 124 | } |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | void set_signal_handlers(void) | 127 | static void set_signal_handlers(void) |
| 128 | { | 128 | { |
| 129 | struct sigaction sa; | 129 | struct sigaction sa; |
| 130 | sigset_t set; | 130 | sigset_t set; |
| @@ -162,7 +162,7 @@ static int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout | |||
| 162 | } | 162 | } |
| 163 | #endif | 163 | #endif |
| 164 | 164 | ||
| 165 | int main_loop(int listenfd) | 165 | static int main_loop(int listenfd) |
| 166 | { | 166 | { |
| 167 | int to, cnt, i, dto; | 167 | int to, cnt, i, dto; |
| 168 | struct fdlist pollfds; | 168 | struct fdlist pollfds; |
| @@ -519,7 +519,7 @@ int main(int argc, char *argv[]) | |||
| 519 | goto terminate; | 519 | goto terminate; |
| 520 | } | 520 | } |
| 521 | sprintf(pids, "%d", getpid()); | 521 | sprintf(pids, "%d", getpid()); |
| 522 | if ((res = write(lfd, pids, strlen(pids))) != strlen(pids)) { | 522 | if ((size_t)(res = write(lfd, pids, strlen(pids))) != strlen(pids)) { |
| 523 | usbmuxd_log(LL_FATAL, "Could not write pidfile!"); | 523 | usbmuxd_log(LL_FATAL, "Could not write pidfile!"); |
| 524 | if(res >= 0) | 524 | if(res >= 0) |
| 525 | res = -2; | 525 | res = -2; |
