Re: CVS commit: src/sys/dev/pcmcia

2017-01-12 Thread coypu
By the way, this code appears to do bogus things with i_len,
like "clear trailing garbage" except using the wrong (constant)
length. it's possible it doesn't work for SSIDs longer than
NETWORK_NAME due to that, but I don't have one or have the
confidence to fix it blindly.

On Thu, Jan 12, 2017 at 05:11:22PM +, Maya Rashish wrote:
> Module Name:  src
> Committed By: maya
> Date: Thu Jan 12 17:11:22 UTC 2017
> 
> Modified Files:
>   src/sys/dev/pcmcia: if_ray.c
> 
> Log Message:
> Remove dead code. RAY_DEF_NWID is a constant string, its length will never
> be above 32.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.84 -r1.85 src/sys/dev/pcmcia/if_ray.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

> Modified files:
> 
> Index: src/sys/dev/pcmcia/if_ray.c
> diff -u src/sys/dev/pcmcia/if_ray.c:1.84 src/sys/dev/pcmcia/if_ray.c:1.85
> --- src/sys/dev/pcmcia/if_ray.c:1.84  Thu Jul  7 06:55:42 2016
> +++ src/sys/dev/pcmcia/if_ray.c   Thu Jan 12 17:11:22 2017
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: if_ray.c,v 1.84 2016/07/07 06:55:42 msaitoh Exp $  */
> +/*   $NetBSD: if_ray.c,v 1.85 2017/01/12 17:11:22 maya Exp $ */
>  
>  /*
>   * Copyright (c) 2000 Christian E. Hopps
> @@ -57,7 +57,7 @@
>   */
>  
>  #include 
> -__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.84 2016/07/07 06:55:42 msaitoh Exp 
> $");
> +__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.85 2017/01/12 17:11:22 maya Exp $");
>  
>  #include "opt_inet.h"
>  
> @@ -553,8 +553,6 @@ ray_attach(device_t parent, device_t sel
>*/
>   memset(>sc_dnwid, 0, sizeof(sc->sc_dnwid));
>   sc->sc_dnwid.i_len = strlen(RAY_DEF_NWID);
> - if (sc->sc_dnwid.i_len > IEEE80211_NWID_LEN)
> - sc->sc_dnwid.i_len = IEEE80211_NWID_LEN;
>   if (sc->sc_dnwid.i_len > 0)
>   memcpy(sc->sc_dnwid.i_nwid, RAY_DEF_NWID, sc->sc_dnwid.i_len);
>   memcpy(>sc_cnwid, >sc_dnwid, sizeof(sc->sc_cnwid));
> 



Re: CVS commit: src/sys/dev/pcmcia

2014-04-21 Thread Joerg Sonnenberger
On Mon, Apr 21, 2014 at 08:24:21PM +, Paul Goyette wrote:
 Module Name:  src
 Committed By: pgoyette
 Date: Mon Apr 21 20:24:21 UTC 2014
 
 Modified Files:
   src/sys/dev/pcmcia: if_malo_pcmcia.c
 
 Log Message:
 Insert { ... } to keep gcc happy when DPRINTF() macro is empty.

This is wrong. DPRINTF should expand to do {} while (0) in !DEBUG case.

Joerg


Re: CVS commit: src/sys/dev/pcmcia

2014-04-21 Thread Paul Goyette

Ah, OK.  I will fix shortly.


On Tue, 22 Apr 2014, Joerg Sonnenberger wrote:


On Mon, Apr 21, 2014 at 08:24:21PM +, Paul Goyette wrote:

Module Name:src
Committed By:   pgoyette
Date:   Mon Apr 21 20:24:21 UTC 2014

Modified Files:
src/sys/dev/pcmcia: if_malo_pcmcia.c

Log Message:
Insert { ... } to keep gcc happy when DPRINTF() macro is empty.


This is wrong. DPRINTF should expand to do {} while (0) in !DEBUG case.

Joerg

!DSPAM:53559bfb212621094619121!




-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |  | pgoyette at netbsd.org  |
-