lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH2r5mvUNiXVAVVmvt=W_RAVMCm5Fgs_=Etcme3uBZ8gKFK30w@mail.gmail.com>
Date: Wed, 13 Nov 2024 11:05:44 -0600
From: Steve French <smfrench@...il.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.com>, 
	Ronnie Sahlberg <ronniesahlberg@...il.com>, Shyam Prasad N <sprasad@...rosoft.com>, 
	Tom Talpey <tom@...pey.com>, Bharath SM <bharathsm@...rosoft.com>, linux-cifs@...r.kernel.org, 
	samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] smb: client: Use str_yes_no() helper function

tentatively merged into cifs-2.6.git for-next pending testing and
additional review

On Tue, Nov 12, 2024 at 5:33 AM Thorsten Blum <thorsten.blum@...ux.dev> wrote:
>
> Remove hard-coded strings by using the str_yes_no() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
>  fs/smb/client/dfs_cache.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/smb/client/dfs_cache.c b/fs/smb/client/dfs_cache.c
> index 110f03df012a..00820f57b434 100644
> --- a/fs/smb/client/dfs_cache.c
> +++ b/fs/smb/client/dfs_cache.c
> @@ -173,8 +173,8 @@ static int dfscache_proc_show(struct seq_file *m, void *v)
>                                    "cache entry: path=%s,type=%s,ttl=%d,etime=%ld,hdr_flags=0x%x,ref_flags=0x%x,interlink=%s,path_consumed=%d,expired=%s\n",
>                                    ce->path, ce->srvtype == DFS_TYPE_ROOT ? "root" : "link",
>                                    ce->ttl, ce->etime.tv_nsec, ce->hdr_flags, ce->ref_flags,
> -                                  DFS_INTERLINK(ce->hdr_flags) ? "yes" : "no",
> -                                  ce->path_consumed, cache_entry_expired(ce) ? "yes" : "no");
> +                                  str_yes_no(DFS_INTERLINK(ce->hdr_flags)),
> +                                  ce->path_consumed, str_yes_no(cache_entry_expired(ce)));
>
>                         list_for_each_entry(t, &ce->tlist, list) {
>                                 seq_printf(m, "  %s%s\n",
> @@ -242,9 +242,9 @@ static inline void dump_ce(const struct cache_entry *ce)
>                  ce->srvtype == DFS_TYPE_ROOT ? "root" : "link", ce->ttl,
>                  ce->etime.tv_nsec,
>                  ce->hdr_flags, ce->ref_flags,
> -                DFS_INTERLINK(ce->hdr_flags) ? "yes" : "no",
> +                str_yes_no(DFS_INTERLINK(ce->hdr_flags)),
>                  ce->path_consumed,
> -                cache_entry_expired(ce) ? "yes" : "no");
> +                str_yes_no(cache_entry_expired(ce)));
>         dump_tgts(ce);
>  }
>
> --
> 2.47.0
>
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ