chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
timesysnc: reword network watching messages, and move resolver errors to debug
[elogind.git]
/
src
/
shared
/
socket-util.c
diff --git
a/src/shared/socket-util.c
b/src/shared/socket-util.c
index 6d9c30352964644e85eb5bc0e66c8cb22923ae47..997a1ceba39e35fe324d82da8bd8e648c1f53a9b 100644
(file)
--- a/
src/shared/socket-util.c
+++ b/
src/shared/socket-util.c
@@
-585,7
+585,7
@@
int getpeername_pretty(int fd, char **ret) {
return -errno;
if (sa.sa.sa_family == AF_UNIX) {
return -errno;
if (sa.sa.sa_family == AF_UNIX) {
- struct ucred ucred;
+ struct ucred ucred
= {}
;
/* UNIX connection sockets are anonymous, so let's use
* PID/UID as pretty credentials instead */
/* UNIX connection sockets are anonymous, so let's use
* PID/UID as pretty credentials instead */
@@
-594,7
+594,7
@@
int getpeername_pretty(int fd, char **ret) {
if (r < 0)
return r;
if (r < 0)
return r;
- if (asprintf(ret, "PID
%lu/UID %lu", (unsigned long) ucred.pid, (unsigned long)
ucred.uid) < 0)
+ if (asprintf(ret, "PID
"PID_FMT"/UID "UID_FMT, ucred.pid,
ucred.uid) < 0)
return -ENOMEM;
return 0;
return -ENOMEM;
return 0;