[BusyBox] [PATCH] add optional SKIP arguments to cmp

Vladimir N. Oleynik dzo at simtreas.ru
Wed Mar 17 07:40:05 UTC 2004


Hideki,

Hmm. Only theoreticaly first see (may be wrong):

> +static void skip_input(FILE *fp, unsigned long skip, const char *filename)
> +{
> +	if (skip > 0 && lseek(fileno(fp), skip, SEEK_CUR) < 0) {

You use lseek + getc. Your skiping make double size.

> +		while (skip-- > 0) {
> +			if (getc(fp) == EOF) {


--w
vodz





More information about the busybox mailing list