Re: [PATCH 1/3] swapon: add control struct

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

 



On Tue, Feb 02, 2016 at 01:40:08PM +0000, Sami Kerola wrote:
> -static void swap_get_info(const char *hdr, char **label, char **uuid)
> +static void swap_get_info(struct swapon_ctl *ctl, const char *hdr)
>  {
>  	struct swap_header_v1_2 *s = (struct swap_header_v1_2 *) hdr;
>  
> -	if (s && *s->volume_name && label)
> -		*label = xstrdup(s->volume_name);
> +	if (s && *s->volume_name && ctl->label)
> +		ctl->label = xstrdup(s->volume_name);

Your semantic for "label" is different that in the original version
where label was pointer to pointer, so "&& label" had sense. In your
code "&& ctl->label" is always true.

I'll fix it.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux