|
|
4295f9 |
From 10a1e767c7bacca5da4ae7260c2a53f7949c3d7e Mon Sep 17 00:00:00 2001
|
|
|
4295f9 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
|
4295f9 |
Date: Wed, 23 Jun 2021 11:52:56 +0200
|
|
|
4295f9 |
Subject: [PATCH] basic/unit-name: adjust comments
|
|
|
4295f9 |
MIME-Version: 1.0
|
|
|
4295f9 |
Content-Type: text/plain; charset=UTF-8
|
|
|
4295f9 |
Content-Transfer-Encoding: 8bit
|
|
|
4295f9 |
|
|
|
4295f9 |
We already checked for "too long" right aboveā¦
|
|
|
4295f9 |
|
|
|
4295f9 |
Related: #1984299
|
|
|
4295f9 |
|
|
|
4295f9 |
(cherry picked from commit 4e2544c30bfb95e7cb4d1551ba066b1a56520ad6)
|
|
|
4295f9 |
---
|
|
|
4295f9 |
src/basic/unit-name.c | 4 ++--
|
|
|
4295f9 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
4295f9 |
|
|
|
4295f9 |
diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c
|
|
|
4295f9 |
index a22763443f..1deead7458 100644
|
|
|
4295f9 |
--- a/src/basic/unit-name.c
|
|
|
4295f9 |
+++ b/src/basic/unit-name.c
|
|
|
4295f9 |
@@ -528,7 +528,7 @@ int unit_name_from_path(const char *path, const char *suffix, char **ret) {
|
|
|
4295f9 |
if (strlen(s) >= UNIT_NAME_MAX) /* Return a slightly more descriptive error for this specific condition */
|
|
|
4295f9 |
return -ENAMETOOLONG;
|
|
|
4295f9 |
|
|
|
4295f9 |
- /* Refuse this if this got too long or for some other reason didn't result in a valid name */
|
|
|
4295f9 |
+ /* Refuse if this for some other reason didn't result in a valid name */
|
|
|
4295f9 |
if (!unit_name_is_valid(s, UNIT_NAME_PLAIN))
|
|
|
4295f9 |
return -EINVAL;
|
|
|
4295f9 |
|
|
|
4295f9 |
@@ -562,7 +562,7 @@ int unit_name_from_path_instance(const char *prefix, const char *path, const cha
|
|
|
4295f9 |
if (strlen(s) >= UNIT_NAME_MAX) /* Return a slightly more descriptive error for this specific condition */
|
|
|
4295f9 |
return -ENAMETOOLONG;
|
|
|
4295f9 |
|
|
|
4295f9 |
- /* Refuse this if this got too long or for some other reason didn't result in a valid name */
|
|
|
4295f9 |
+ /* Refuse if this for some other reason didn't result in a valid name */
|
|
|
4295f9 |
if (!unit_name_is_valid(s, UNIT_NAME_INSTANCE))
|
|
|
4295f9 |
return -EINVAL;
|
|
|
4295f9 |
|