lkml.org 
[lkml]   [2018]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 17/25] staging: lustre: libcfs: rename goto label in cfs_cpt_table_print
> diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
> index ae5ff58..435ee8e 100644
> --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
> +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
> @@ -161,20 +161,20 @@ int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len)
>
> for (i = 0; i < cptab->ctb_nparts; i++) {
> if (len <= 0)
> - goto out;
> + goto err;
>
> rc = snprintf(tmp, len, "%d\t:", i);
> len -= rc;
>
> if (len <= 0)
> - goto out;
> + goto err;

Labels should say what the goto does. In this case, it's a do-nothing
goto with a "forgot to set the error code" bug.

regards,
dan carpenter

\
 
 \ /
  Last update: 2018-04-17 09:35    [W:0.146 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site