From 47f7d61ad0688b8123d490fc98197a4fb173fc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 13 Apr 2018 12:38:11 +0200 Subject: [PATCH 1/2] basic/unit-name: remove duplicate check The check that was right below already covers this case. --- src/basic/unit-name.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c index 6fb9cbc361..13653d9b78 100644 --- a/src/basic/unit-name.c +++ b/src/basic/unit-name.c @@ -247,8 +247,6 @@ int unit_name_build(const char *prefix, const char *instance, const char *suffix assert(suffix); assert(ret); - if (isempty(suffix)) - return -EINVAL; if (suffix[0] != '.') return -EINVAL; From 4436e5a703006dc9b86e37d7f3d4b614cd61ff92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 13 Apr 2018 12:40:11 +0200 Subject: [PATCH 2/2] basic/copy: fix awkward sentence --- src/basic/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/copy.c b/src/basic/copy.c index 55394871fd..5b6cae39d0 100644 --- a/src/basic/copy.c +++ b/src/basic/copy.c @@ -69,7 +69,7 @@ static int fd_is_nonblock_pipe(int fd) { struct stat st; int flags; - /* Checks whether the specified file descriptor refers to a pipe, and if so if is has O_NONBLOCK set. */ + /* Checks whether the specified file descriptor refers to a pipe, and if so if O_NONBLOCK is set. */ if (fstat(fd, &st) < 0) return -errno;