cvs commit: src/lib/libarchive archive_endian.h archive_read_support_format_zip.c

Tim Kientzle kientzle at freebsd.org
Fri Jan 4 09:50:43 PST 2008


Dag-Erling Smorgrav wrote:
> des         2008-01-03 18:30:37 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     lib/libarchive       archive_read_support_format_zip.c 
>   Added files:
>     lib/libarchive       archive_endian.h 
>   Log:
>   Crib {be,le}{16,32,64}{dec,enc} from src/sys/sys/endian.h and use it instead
>   of home-rolled [iu][248] in the ZIP support code.
>   
>   Approved by:    kientzle
>   
>   Revision  Changes    Path
>   1.1       +142 -0    src/lib/libarchive/archive_endian.h (new)
>   1.19      +22 -57    src/lib/libarchive/archive_read_support_format_zip.c

Is this really right?

> +be32dec(const void *pp)
> +{
> +       unsigned char const *p = (unsigned char const *)pp;

The "const *" is harmless enough, but dropping the
leading "const" doesn't seem right at all:  'pp'
is a pointer to const data, 'p' points to
modifiable data.

Tim Kientzle


More information about the cvs-src mailing list