Re: [PATCH v2 02/18] fsck.overlay: fix uninitialized variable

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

 



On Thu, Dec 14, 2017 at 8:47 AM, zhangyi (F) <yi.zhang@xxxxxxxxxx> wrote:
> Signed-off-by: zhangyi (F) <yi.zhang@xxxxxxxxxx>

Same here, no place for this patch in review.
Please re-post a clean series of patch.
Each of the patches posted should be bisectable, meaning that
after applying each patch, your code should at least build and
best to not introduce functional regressions along the series.

> ---
>  fsck.c  | 8 ++++----
>  mount.c | 8 ++++----
>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/fsck.c b/fsck.c
> index cbcb8e9..7f704c8 100644
> --- a/fsck.c
> +++ b/fsck.c
> @@ -25,12 +25,12 @@
>
>  char *program_name;
>
> -char **lowerdir;
> +char **lowerdir = NULL;
>  char upperdir[PATH_MAX] = {0};
>  char workdir[PATH_MAX] = {0};
> -unsigned int lower_num;
> -int flags;             /* user input option flags */
> -int status;            /* fsck scan status */
> +unsigned int lower_num = 0;
> +int flags = 0;         /* user input option flags */
> +int status = 0;                /* fsck scan status */
>
>  /* Cleanup lower directories buf */
>  static void ovl_clean_lowerdirs(void)
> diff --git a/mount.c b/mount.c
> index 28ce8e5..768c7aa 100644
> --- a/mount.c
> +++ b/mount.c
> @@ -269,10 +269,10 @@ static void ovl_scan_mount_exit(struct ovl_mnt_entry *ovl_mnt_entries,
>   */
>  int ovl_check_mount(bool *pass)
>  {
> -       struct ovl_mnt_entry *ovl_mnt_entries;
> -       int ovl_mnt_entry_count;
> -       char *mounted_path;
> -       bool mounted;
> +       struct ovl_mnt_entry *ovl_mnt_entries = NULL;
> +       int ovl_mnt_entry_count = 0;
> +       char *mounted_path = NULL;
> +       bool mounted = false;
>         int i,j,k;
>         int ret;
>
> --
> 2.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux