basic/strv: minor coding style follow-ups

Follow-up for 428146dc89

Addresses https://github.com/systemd/systemd/pull/36271#discussion_r1958334800
This commit is contained in:
Mike Yuan
2025-02-18 14:32:30 +01:00
parent 384949f7de
commit 3ab19c1f0a
2 changed files with 3 additions and 3 deletions

View File

@@ -1239,14 +1239,14 @@ int strv_rebreak_lines(char **l, size_t width, char ***ret) {
return 0;
}
char** strv_filter_prefix(char *const*l, const char *prefix) {
_cleanup_strv_free_ char **f = NULL;
char** strv_filter_prefix(char * const *l, const char *prefix) {
/* Allocates a copy of 'l', but only copies over entries starting with 'prefix' */
if (isempty(prefix))
return strv_copy(l);
_cleanup_strv_free_ char **f = NULL;
size_t sz = 0;
STRV_FOREACH(i, l) {

View File

@@ -269,4 +269,4 @@ int _string_strv_ordered_hashmap_put(OrderedHashmap **h, const char *key, const
int strv_rebreak_lines(char **l, size_t width, char ***ret);
char** strv_filter_prefix(char *const*l, const char *prefix);
char** strv_filter_prefix(char * const *l, const char *prefix);