Re: [PATCH 1/4] xfs_db: pass const pointers when we're not modifying them

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2025-02-06 15:02:45, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Pass a const pointer to path_walk since we don't actually modify the
> contents.
> 
> Signed-off-by: "Darrick J. Wong" <djwong@xxxxxxxxxx>

Looks good to me
Reviewed-by: Andrey Albershteyn <aalbersh@xxxxxxxxxx>

> ---
>  db/namei.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/db/namei.c b/db/namei.c
> index 4eae4e8fd3232c..00610a54af527e 100644
> --- a/db/namei.c
> +++ b/db/namei.c
> @@ -140,10 +140,10 @@ path_navigate(
>  static int
>  path_walk(
>  	xfs_ino_t	rootino,
> -	char		*path)
> +	const char	*path)
>  {
>  	struct dirpath	*dirpath;
> -	char		*p = path;
> +	const char	*p = path;
>  	int		error = 0;
>  
>  	if (*p == '/') {
> 

-- 
- Andrey





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux