[LEDE-DEV] [PATCH] block: remove redundant "mnt" variable

Arkadiusz Drabczyk arkadiusz at drabczyk.org
Sat Nov 5 15:07:04 PDT 2016


On Sat, Nov 05, 2016 at 09:12:14PM +0100, Arkadiusz Drabczyk wrote:
> Variable mnt is assigned a value and in the very next line it's assigned
> to another variable and not used anymore which doesn't make sense.
> 
> Signed-off-by: Arkadiusz Drabczyk <arkadiusz at drabczyk.org>
> ---
>  block.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 05f84aa..1d4f27d 100644
> --- a/block.c
> +++ b/block.c
> @@ -1268,8 +1268,7 @@ static int check_extroot(char *path)
>  static int mount_extroot(char *cfg)
>  {
>  	char overlay[] = "/tmp/extroot/overlay";
> -	char mnt[] = "/tmp/extroot/mnt";
> -	char *path = mnt;
> +	char *path = "/tmp/extroot/mnt";
>  	struct probe_info *pr;
>  	struct mount *m;
>  	int err = -1;

Sorry, this patch does not make any sense - I tested it before
submitting and block worked ok on my router but it would crash with
Segmentation Fault in mkdir_p() in line 1316 if this condition wasn't
met:

if (m->overlay)
        path = overlay;

-- 
Arkadiusz Drabczyk <arkadiusz at drabczyk.org>



More information about the Lede-dev mailing list