camcontrol WARNS6 cleanup: take 2

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Sun Jan 9 09:57:35 PST 2005


On Sunday, 9. January 2005 18:35, Larry Lansing wrote:
> Sorry, newbie at work.  Resubmitting as unified diff, with only
> the renamed locals version of camcontrol.c.  Thanks for the
> patience.

> +WARNS= 6

should be WARNS?= 6

> -static int parse_btl(char *tstr, int *bus, int *target, int *lun,
> -       cam_argmask *arglist);
> +static int parse_btl(char *tstr, int *mybus, int *mytarget, int *mylun,
> +       cam_argmask *myarglist);
>  static int dorescan_or_reset(int argc, char **argv, int rescan);
> -static int rescan_or_reset_bus(int bus, int rescan);
> -static int scanlun_or_reset_dev(int bus, int target, int lun, int scan);
> +static int rescan_or_reset_bus(int mybus, int rescan);
> +static int scanlun_or_reset_dev(int mybus, int mytarget, int mylun, int
> scan);

I would remove parameter names here:
s/ *[[:alnum:]]*\([,)]\)/\1/g

[...]
>   /* Print the raw mode page data with newlines each 8 bytes. */
> - for (index = 0; index < mph->page_length; index++) {
> -  printf("%02x%c",mode_pars[index],
> -      (((index + 1) % 8) == 0) ? '\n' : ' ');
> + for (mode_idx = 0; mode_idx < mph->page_length; mode_idx++) {
> +  printf("%02x%c",mode_pars[mode_idx],

more space after commas! :)

cheers
  simon

-- 
/"\
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
Attachment:
pgp00014.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00014.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20050109/9a0b45cc/attachment-0014.obj>


More information about the Submit mailing list