lkml.org 
[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 12/15] ixj: fix Wsequence-point compiler warnings
    From
    Date
    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@bisect.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++;




    \
     
     \ /
      Last update: 2012-01-30 17:05    [W:0.040 / U:0.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site