[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: CFT: BSD-licensed grep [Fwd: cvs commit:
From: Andrey Chernov <ache () nagual ! pp ! ru>
Date: 2008-06-24 21:30:18
Message-ID: 20080624213018.GA71334 () nagual ! pp ! ru
[Download RAW message or body]
On Wed, Jun 25, 2008 at 01:04:20AM +0400, Andrey Chernov wrote:
> > if ((s = mbstowcs(NULL, f->base, 0)) == -1)
> > return (0);
>
> The same here. Check EILSEQ and return 1
BTW, do you realyze that this code malloc()s _whole_file_ into memory
(which not fits for very big files)?
Non-localized old code use mmap, so don't actually malloc() it.
Doe to that perhaps whole mmfile.c should be not used and removed.
--
http://ache.pp.ru/
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic