Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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



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 +0000, 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 <sys/cdefs.h>
> -__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->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->sc_cnwid, &sc->sc_dnwid, sizeof(sc->sc_cnwid));
> 



Home | Main Index | Thread Index | Old Index