Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589374

Re: [Outreachy kernel] Re: [PATCH v7] staging: xgifb: correct the multiple line dereference

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [Outreachy kernel] Re: [PATCH v7] staging: xgifb: correct the multiple line dereference
Date 2017-02-28 12:40 +0100
Message-ID <tfOim-3OY-7@gated-at.bofh.it> (permalink)
References <tfNvY-3dU-9@gated-at.bofh.it> <tfNZ0-3EB-5@gated-at.bofh.it> <tfOim-3OY-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2017-02-28 at 12:24 +0100, Julia Lawall wrote:
> It's drifting a little bit from the original issue, but the whole *i thing
> is not very nice.  The function is used in only one place, and the call
> looks like this:
> 
>                temp = XGI_AjustCRT2Rate(ModeIdIndex, RefreshRateTableIndex,
> 	                                 &i, pVBInfo);
> 
> immediately followed by:
> 
> return RefreshRateTableIndex + i;
> 
> temp is never used.  Could the function be made to return a negative error
> code on failure and the updated value of i on success?  The (*i) could
> become just i, which would even be a little shorter.

I don't see why not.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7] staging: xgifb: correct the multiple line dereference Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-02-28 11:50 +0100
  Re: [PATCH v7] staging: xgifb: correct the multiple line dereference Joe Perches <joe@perches.com> - 2017-02-28 12:20 +0100
    Re: [Outreachy kernel] Re: [PATCH v7] staging: xgifb: correct the  multiple line dereference Joe Perches <joe@perches.com> - 2017-02-28 12:40 +0100
    Re: [Outreachy kernel] Re: [PATCH v7] staging: xgifb: correct the  multiple line dereference Julia Lawall <julia.lawall@lip6.fr> - 2017-02-28 15:20 +0100

csiph-web