[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hurd-bug
Subject:    Re: [PATCH] Implement /proc/slabinfo
From:       Samuel Thibault <samuel.thibault () gnu ! org>
Date:       2014-05-24 8:57:41
Message-ID: 20140524085741.GR6395 () type ! youpi ! perso ! aquilenet ! fr
[Download RAW message or body]

Justus Winter, le Fri 23 May 2014 08:54:25 +0200, a écrit :
> +  for (i = 0; i < cache_info_count + 1; i++)
> +    {
> +      size_t l = strlen (infos[i]);
> +      memcpy (p, infos[i], l);

The length could be stored too, to avoid having to run strlen again.

Samuel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic