Make match_ver() private - dedup - deduplicating backup program
 (HTM) git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 748b1ecb66e6c66d9fd18b84e58c1fbecb88839b
 (DIR) parent a3b3fb6126e50d105436b50fc3c077d4e33f3959
 (HTM) Author: sin <sin@2f30.org>
       Date:   Thu, 18 Apr 2019 09:31:02 +0100
       
       Make match_ver() private
       
       Diffstat:
         M dedup.h                             |       1 -
         M utils.c                             |      26 +++++++++++++-------------
       
       2 files changed, 13 insertions(+), 14 deletions(-)
       ---
 (DIR) diff --git a/dedup.h b/dedup.h
       @@ -208,6 +208,5 @@ ssize_t xread(int fd, void *buf, size_t nbytes);
        ssize_t xwrite(int fd, const void *buf, size_t nbytes);
        void init_blk_hdr(struct blk_hdr *hdr, int compr_algo, int hash_algo);
        void init_snap_hdr(struct snap_hdr *hdr);
       -void match_ver(uint64_t v);
        void load_blk_hdr(int fd, struct blk_hdr *hdr, int *compr_algo, int *hash_algo);
        void load_snap_hdr(int fd, struct snap_hdr *hdr);
 (DIR) diff --git a/utils.c b/utils.c
       @@ -9,6 +9,19 @@
        #include "blake2.h"
        #include "dedup.h"
        
       +static void
       +match_ver(uint64_t v)
       +{
       +        uint8_t maj, min;
       +
       +        min = v & VER_MIN_MASK;
       +        maj = (v >> VER_MAJ_SHIFT) & VER_MAJ_MASK;
       +        if (maj == VER_MAJ && min == VER_MIN)
       +                return;
       +        errx(1, "format version mismatch: expected %u.%u but got %u.%u",
       +             VER_MAJ, VER_MIN, maj, min);
       +}
       +
        void
        str2bin(char *s, uint8_t *d)
        {
       @@ -87,19 +100,6 @@ init_snap_hdr(struct snap_hdr *hdr)
        }
        
        void
       -match_ver(uint64_t v)
       -{
       -        uint8_t maj, min;
       -
       -        min = v & VER_MIN_MASK;
       -        maj = (v >> VER_MAJ_SHIFT) & VER_MAJ_MASK;
       -        if (maj == VER_MAJ && min == VER_MIN)
       -                return;
       -        errx(1, "format version mismatch: expected %u.%u but got %u.%u",
       -             VER_MAJ, VER_MIN, maj, min);
       -}
       -
       -void
        load_blk_hdr(int fd, struct blk_hdr *hdr, int *compr_algo, int *hash_algo)
        {
                uint64_t v;