This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] print length in strrchr benchtest


On Wed, Feb 19, 2014 at 01:41:21AM -0600, Rajalakshmi Srinivasaraghavan wrote:
> The return criteria of strrchr() is to read till NULL even if the
> search character is hit.So its better to print len instead of pos.
> 
> 	benchtests/bench-strrchr.c : print length instead of position
> 
> Signed-off-by: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
> ---
>  benchtests/bench-strrchr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/benchtests/bench-strrchr.c b/benchtests/bench-strrchr.c
> index adcedde..3d42236 100644
> --- a/benchtests/bench-strrchr.c
> +++ b/benchtests/bench-strrchr.c
> @@ -122,7 +122,7 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
>    else
>      result = NULL;
>  
> -  printf ("Length %4zd, alignment in bytes %2zd:", pos, align * sizeof(CHAR));
> +  printf ("Length %4zd, alignment in bytes %2zd:", len, align * sizeof(CHAR));
>  
looksok.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]