Changeset 3115


Ignore:
Timestamp:
Oct 29, 2017, 7:06:32 PM (7 years ago)
Author:
bird
Message:

kmk_install: cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/kmk/kmkbuiltin/install.c

    r3114 r3115  
    9797extern mode_t bsd_getmode(const void *bbox, mode_t omode);
    9898
    99 #ifndef __unused
    100 # define __unused
    101 #endif
    102 
    10399#ifndef MAXBSIZE
    104100# define MAXBSIZE 0x20000
     
    150146
    151147static int      copy(int, const char *, int *, const char *);
    152 static int      compare(int, const char *, size_t, int, const char *, size_t);
     148static int      compare(int, size_t, int, size_t);
    153149static int      create_newfile(const char *, int, struct stat *);
    154150static int      create_tempfile(const char *, char *, size_t);
     
    538534                        files_match = to_sb.st_size == 0;
    539535                else
    540                         files_match = !(compare(from_fd, from_name,
    541                             (size_t)from_sb.st_size, to_fd,
    542                             to_name, (size_t)to_sb.st_size));
     536                        files_match = !compare(from_fd, (size_t)from_sb.st_size,
     537                                               to_fd, (size_t)to_sb.st_size);
    543538
    544539                /* Close "to" file unless we match. */
     
    618613                }
    619614
    620                 if (compare(temp_fd, tempfile, (size_t)temp_sb.st_size, to_fd,
    621                             to_name, (size_t)to_sb.st_size) == 0) {
     615                if (compare(temp_fd, (size_t)temp_sb.st_size,
     616                            to_fd, (size_t)to_sb.st_size) == 0) {
    622617                        /*
    623618                         * If target has more than one link we need to
     
    796791 */
    797792static int
    798 compare(int from_fd, const char *from_name __unused, size_t from_len,
    799         int to_fd, const char *to_name __unused, size_t to_len)
     793compare(int from_fd, size_t from_len, int to_fd, size_t to_len)
    800794{
    801795        char buf1[MAXBSIZE];
Note: See TracChangeset for help on using the changeset viewer.