summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/import/importd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/import/importd.c b/src/import/importd.c
index 4675aa5a61..a58587beb2 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -554,9 +554,9 @@ static int manager_on_notify(sd_event_source *s, int fd, uint32_t revents, void
};
struct ucred *ucred;
Manager *m = userdata;
- char *p, *e;
Transfer *t;
ssize_t n;
+ char *p;
int r;
n = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC);
@@ -594,8 +594,7 @@ static int manager_on_notify(sd_event_source *s, int fd, uint32_t revents, void
if (!p)
return 0;
- e = strchrnul(p, '\n');
- *e = 0;
+ truncate_nl(p);
r = parse_percent(p);
if (r < 0) {