chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit: split unit_printf() and friends into its own .c file
[elogind.git]
/
src
/
core
/
socket.c
diff --git
a/src/core/socket.c
b/src/core/socket.c
index cbbfb0cd3a033436a7215ec36fa72300a78ffa01..63e6ed29fe540aff1707434d4d6c0d8ecfa09a1b 100644
(file)
--- a/
src/core/socket.c
+++ b/
src/core/socket.c
@@
-39,6
+39,7
@@
#include "mkdir.h"
#include "path-util.h"
#include "unit-name.h"
#include "mkdir.h"
#include "path-util.h"
#include "unit-name.h"
+#include "unit-printf.h"
#include "dbus-socket.h"
#include "missing.h"
#include "special.h"
#include "dbus-socket.h"
#include "missing.h"
#include "special.h"
@@
-584,7
+585,7
@@
static int instance_from_socket(int fd, unsigned nr, char **instance) {
}
case AF_INET6: {
}
case AF_INET6: {
- static const char ipv4_prefix[] = {
+ static const
unsigned
char ipv4_prefix[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF
};
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF
};
@@
-1850,7
+1851,8
@@
static void socket_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
if (w->socket_accept) {
for (;;) {
if (w->socket_accept) {
for (;;) {
- if ((cfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK)) < 0) {
+ cfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK);
+ if (cfd < 0) {
if (errno == EINTR)
continue;
if (errno == EINTR)
continue;