Re: [dev] [sbase] [patch] Add strings(1)

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Wed, 14 Aug 2013 16:43:20 +0200

> + while ((r = read(fd, &c, 1) > 0)) {
> + offset++;
> + if (isprint(c)) {
> + span++;

I think is better use the buffer interface here. Calling getc
will save a lot of system calls and it will improve the performace
of the application.


-- 
Roberto E. Vargas Caballero
----------------------------
k0ga_AT_shike2.com
http://www.shike2.com
Received on Wed Aug 14 2013 - 16:43:20 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 14 2013 - 16:48:17 CEST