From f0ceef8596838d725205e0b2aa7fd39da48fa34d Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 9 Oct 2009 11:48:11 +0300 Subject: [PATCH] Minor fix. * src/buffer.c (magic): Fix `xz' entry: add the name of the program. * src/suffix.c (compression_suffixes, nsuffixes): Mark as static. --- src/buffer.c | 12 ++++++------ src/suffix.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index dd97682..fa9ccc2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -220,12 +220,12 @@ struct zip_magic static struct zip_magic const magic[] = { { ct_tar }, { ct_none, }, - { ct_compress, 2, "\037\235", "compress", "-Z" }, - { ct_gzip, 2, "\037\213", "gzip", "-z" }, - { ct_bzip2, 3, "BZh", "bzip2", "-j" }, - { ct_lzma, 6, "\xFFLZMA", "lzma", "--lzma" }, /* FIXME: ???? */ - { ct_lzop, 4, "\211LZO", "lzop", "--lzop" }, - { ct_xz, 6, "\0xFD7zXZ", "-J" }, + { ct_compress, 2, "\037\235", "compress", "-Z" }, + { ct_gzip, 2, "\037\213", "gzip", "-z" }, + { ct_bzip2, 3, "BZh", "bzip2", "-j" }, + { ct_lzma, 6, "\xFFLZMA", "lzma", "--lzma" }, + { ct_lzop, 4, "\211LZO", "lzop", "--lzop" }, + { ct_xz, 6, "\0xFD7zXZ", "xz", "-J" }, }; #define NMAGIC (sizeof(magic)/sizeof(magic[0])) diff --git a/src/suffix.c b/src/suffix.c index 6dbc68e..a044d5a 100644 --- a/src/suffix.c +++ b/src/suffix.c @@ -26,7 +26,7 @@ struct compression_suffix const char *program; }; -struct compression_suffix compression_suffixes[] = { +static struct compression_suffix compression_suffixes[] = { #define S(s,p) #s, sizeof (#s) - 1, #p { S(gz, gzip) }, { S(tgz, gzip) }, @@ -44,8 +44,8 @@ struct compression_suffix compression_suffixes[] = { #undef S }; -int nsuffixes = sizeof (compression_suffixes) / - sizeof (compression_suffixes[0]); +static int nsuffixes = sizeof (compression_suffixes) / + sizeof (compression_suffixes[0]); static const char * find_compression_program (const char *name, const char *defprog) -- 2.44.0