lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1327939311.25132.9.camel@joe2Laptop>
Date:	Mon, 30 Jan 2012 08:01:51 -0800
From:	Joe Perches <joe@...ches.com>
To:	Danny Kukawka <danny.kukawka@...ect.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/15] ixj: fix Wsequence-point compiler warnings

On Mon, 2012-01-30 at 15:40 +0100, Danny Kukawka wrote:
> Fix some Wsequence-point compiler warnings in ixj.
> 
> Signed-off-by: Danny Kukawka <danny.kukawka@...ect.de>
> ---
>  drivers/telephony/ixj.c |  194 ++++++++++++++++++++++++++---------------------
>  1 files changed, 107 insertions(+), 87 deletions(-)
> 
> diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
> index d5f923b..7d02cae 100644
> --- a/drivers/telephony/ixj.c
> +++ b/drivers/telephony/ixj.c
> @@ -5923,35 +5923,38 @@ static int ixj_build_filter_cadence(IXJ *j, IXJ_FILTER_CADENCE __user * cp)
>  
>  static void add_caps(IXJ *j)
>  {
> -	j->caps = 0;
> -	j->caplist[j->caps].cap = PHONE_VENDOR_QUICKNET;
> -	strcpy(j->caplist[j->caps].desc, "Quicknet Technologies, Inc. (www.quicknet.net)");
> -	j->caplist[j->caps].captype = vendor;
> -	j->caplist[j->caps].handle = j->caps++;
> -	j->caplist[j->caps].captype = device;
> +	int i = 0;
> +	j->caplist[i].cap = PHONE_VENDOR_QUICKNET;

I think this would be much simpler with a pointer
use for j->caplist[i]

	struct whatever_typeof caplist *p = j->caplist;

	p->cap = PHONE_VENDOR_QUICKNET;
	strlcpy(p->desc, "Quicknet etc...", sizeof(p->desc));
	p->captype = vendor;
...
	p++;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ