Re: CVS commit: src/lib/libc/stdlib

2017-01-12 Thread Christos Zoulas
In article <20170112213155.ga11...@britannica.bec.de>,
Joerg Sonnenberger   wrote:
>On Wed, Jan 11, 2017 at 09:00:42PM -0500, Christos Zoulas wrote:
>> Module Name: src
>> Committed By:christos
>> Date:Thu Jan 12 02:00:42 UTC 2017
>> 
>> Modified Files:
>>  src/lib/libc/stdlib: malloc.c
>> 
>> Log Message:
>> Avoid sysconf: __sysconf -> sysctlgetmibinfo -> strtoimax -> locale, etc.
>
>Can you at least use sysctl(2) directly?

I could... Ok.

christos



Re: CVS commit: src/lib/libc/stdlib

2017-01-12 Thread Joerg Sonnenberger
On Wed, Jan 11, 2017 at 09:00:42PM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Thu Jan 12 02:00:42 UTC 2017
> 
> Modified Files:
>   src/lib/libc/stdlib: malloc.c
> 
> Log Message:
> Avoid sysconf: __sysconf -> sysctlgetmibinfo -> strtoimax -> locale, etc.

Can you at least use sysctl(2) directly?

Joerg


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));
>