Re: [PATCH] hexdump: initialize hex->skip

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

 



On Fri, Dec 27, 2013 at 05:44:48PM +0400, Andrey Vagin wrote:
>  	struct hexdump *hex = malloc (sizeof (struct hexdump));
>  	hex->length = -1;
> +	hex->skip = 0;
>  	INIT_LIST_HEAD(&hex->fshead);

 Fixed. It seems better to call calloc() rather then set all the
 fields to zero.

    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