From 2f8e6d41c4009f69eb203d66bd88ffaf3e8a94dd Mon Sep 17 00:00:00 2001 From: Danielle Sikich Date: Thu, 15 Jun 2017 15:17:31 -0700 Subject: [PATCH 1/3] fixes to freeing sync list --- src/dcmp/dcmp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/dcmp/dcmp.c b/src/dcmp/dcmp.c index 76f76f994..47345961b 100644 --- a/src/dcmp/dcmp.c +++ b/src/dcmp/dcmp.c @@ -1054,8 +1054,8 @@ static void dcmp_strmap_compare(mfu_flist src_list, mfu_flist dst_compare_list = mfu_flist_subset(dst_list); /* remove and copy lists for sync option */ - mfu_flist dst_remove_list = MFU_FLIST_NULL; - mfu_flist src_cp_list = MFU_FLIST_NULL; + mfu_flist dst_remove_list = NULL; + mfu_flist src_cp_list = NULL; /* create dst remove list if sync option is on */ if (mfu_copy_opts->do_sync) { @@ -1219,8 +1219,14 @@ static void dcmp_strmap_compare(mfu_flist src_list, } /* free lists used for copying and removing files in sync option */ - mfu_flist_free(&src_cp_list); - mfu_flist_free(&dst_remove_list); + /* TODO: fix MFU_FLIST_NULL so that we don't have to do these NULL + * checks here */ + if (src_cp_list != NULL) { + mfu_flist_free(&src_cp_list); + } + if (dst_remove_list != NULL) { + mfu_flist_free(&dst_remove_list); + } /* free the compare flists */ mfu_flist_free(&dst_compare_list); From 049f304b193dc3b1e8684d2d4e1bcb507c08692e Mon Sep 17 00:00:00 2001 From: Danielle Sikich Date: Thu, 15 Jun 2017 15:19:24 -0700 Subject: [PATCH 2/3] updates to man pages --- doc/man/man1/dbcast.1 | 58 +++++++++++++++----------- doc/man/man1/dchmod.1 | 30 +++++++------- doc/man/man1/dcmp.1 | 18 +++----- doc/man/man1/dcp.1 | 12 +++--- doc/man/man1/dfilemaker.1 | 8 ++-- doc/man/man1/dfind.1 | 2 +- doc/man/man1/dgrep.1 | 2 +- doc/man/man1/dparallel.1 | 4 +- doc/man/man1/drm.1 | 22 +++++----- doc/man/man1/dstripe.1 | 87 +++++++++++++++++++++++++++++---------- doc/man/man1/dtar.1 | 2 +- doc/man/man1/dwalk.1 | 37 ++++++++--------- doc/markdown/dcmp.1.md | 3 -- 13 files changed, 164 insertions(+), 121 deletions(-) diff --git a/doc/man/man1/dbcast.1 b/doc/man/man1/dbcast.1 index 6a4d7ea28..203bebf60 100644 --- a/doc/man/man1/dbcast.1 +++ b/doc/man/man1/dbcast.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DBCAST" "1" "" "" "" .hy @@ -7,40 +7,52 @@ dbcast \- distributed broadcast .SH SYNOPSIS .PP -\f[B]dbcast CHUNK_SIZE SRC_FILE DEST_FILE\f[] +\f[B]dbcast [OPTION] SRC DEST\f[] .SH DESCRIPTION .PP -Parallel MPI application to recursively broadcast a file from a global -file system to node\-local storage. +Parallel MPI application to recursively broadcast a single file from a +global file system to node\-local storage, like ramdisk or an SSD. .PP -dbcast helps one copy a source file to node\-local storage on each -compute node. -.PP -The file is logically sliced at chunk boundaries as specified by -CHUNK_SIZE and collectively copied from a global file system to +The file is logically sliced into chunks and collectively copied from a +global file system to node\-local storage. +The source file SRC must be readable by all MPI processes. +The destination file DEST should be the full path of the file in node\-local storage. -The CHUNK_SIZE parameter should be specified in bytes, and one may use -units like "MB" or "GB". -It is recommended to use the stripe size of a file if this is known. -The path to the source file should be given in SRC_FILE. -The source file should be in a path readable by all MPI processes. -The destination path is given in DEST_FILE. -The destination file should be a path to a node\-local storage location, -like ramdisk or an SSD. -.PP -In its current implementation, the tool requires at least two MPI -processes per compute node, and all compute nodes should have the same +If needed, parent directories for the destination file will be created +as part of the broadcast. +.PP +In the current implementation, dbcast requires at least two MPI +processes per compute node, and all compute nodes must run an equal number of MPI processes. .SH OPTIONS +.TP +.B \-s, \-\-size SIZE +The chunk size in bytes used to segment files during the broadcast. +Units like "MB" and "GB" should be immediately follow the number without +spaces (ex. +2MB). +The default size is 1MB. +It is recommended to use the stripe size of a file if this is known. +.RS +.RE +.TP +.B \-h, \-\-help +Print the command usage, and the list of options available. +.RS +.RE .SH EXAMPLES .IP "1." 3 -To broadcast a file to /ssd on each node slicing at 1MB chunks: +To broadcast a file to /ssd on each node: .PP -mpirun \-np 128 dbcast 1MB /global/path/to/filenane /ssd/filename +mpirun \-np 128 dbcast /global/path/to/filenane /ssd/filename .IP "2." 3 +Same thing, but slicing at 10MB chunks: +.PP +mpirun \-np 128 dbcast \-s 10MB /global/path/to/filenane /ssd/filename +.IP "3." 3 To read the current striping parameters of a file on Lustre: .PP -lfs getstripe /path/to/file +lfs getstripe /global/path/to/filename .SH SEE ALSO .PP \f[C]dbcast\f[] (1). diff --git a/doc/man/man1/dchmod.1 b/doc/man/man1/dchmod.1 index f872dab92..ce73fee66 100644 --- a/doc/man/man1/dchmod.1 +++ b/doc/man/man1/dchmod.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DCHMOD" "1" "" "" "" .hy @@ -10,7 +10,7 @@ dchmod \- distributed tool to set permissions and group \f[B]dchmod [OPTION] PATH...\f[] .SH DESCRIPTION .PP -Parallel MPI application to recurseively change permissions and/or group +Parallel MPI application to recursively change permissions and/or group from a top level directory. .PP dchmod provides functionality similar to \f[I]chmod(1)\f[] and @@ -31,19 +31,23 @@ Change group to specified GROUP name. .RE .TP .B \-m, \-\-mode MODE -The mode that you want the file or directory to be. +The mode to apply to each item. MODE may be octal or symbolic syntax similar to chmod(1). In symbolic notation, "ugoa" are supported as are "rwxX". +As with chmod, if no leading letter "ugoa" is provided, mode bits are +combined with umask to determine the actual mode. .RS .RE .TP .B \-\-exclude REGEX -Do not modify items whose full path matches REGEX (regexec). +Do not modify items whose full path matches REGEX, processed by +regexec(3). .RS .RE .TP .B \-\-match REGEX -Only modify items whose full path matches REGEX (regexec). +Only modify items whose full path matches REGEX, processed by +regexec(3). .RS .RE .TP @@ -55,10 +59,9 @@ full path. .TP .B \-v, \-\-verbose Run in verbose mode. -Prints a list of statistics/timing data for the command. -How many files walked, how many levels there are in the tree, and how -many files the command operated on. -This option also prints the files/sec for each of those. +Prints a list of statistics including the number of files walked, the +number of levels there are in the directory tree, and the number of +files the command operated on, and the files/sec rate for each of those. .RS .RE .TP @@ -72,13 +75,12 @@ Use octal mode to change permissions: .PP mpirun \-np 128 dchmod \-\-mode 755 /directory .IP "2." 3 -Use symbolic mode to change permissions (you can list modes for user, -group, etc if you separate them with a comma): +Set group and mode in a single command using symbolic mode: .PP -mpirun \-np 129 dchmod \-\-group mygroup \-\-mode u+r,g+rw /directory +mpirun \-np 128 dchmod \-\-group mygroup \-\-mode u+r,g+rw /directory .IP "3." 3 -Change permissions to u+rw on all files/directories EXCEPT those whose -name match regex: +Change permissions to u+rw on all items EXCEPT those whose name match +regex: .PP mpirun \-np 128 dchmod \-\-name \-\-exclude \[aq]afilename\[aq] \-\-mode u+rw /directory diff --git a/doc/man/man1/dcmp.1 b/doc/man/man1/dcmp.1 index 03ad91e06..f594fb879 100644 --- a/doc/man/man1/dcmp.1 +++ b/doc/man/man1/dcmp.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DCMP" "1" "" "" "" .hy @@ -7,16 +7,15 @@ dcmp \- distributed compare .SH SYNOPSIS .PP -\f[B]dcmp [OPTION] SOURCE DEST \f[] +\f[B]dcmp [OPTION] SRC DEST \f[] .SH DESCRIPTION .PP -Parallel MPI application to compare two files or to recurseively compare -files with same prefix path within two different directories. -This tool is similar to \f[I]cmp(1)\f[]. -It reports how many files in two different directories are the same (or -different). +Parallel MPI application to compare two files or to recursively compare +files with same relative paths within two different directories. .PP dcmp provides functionality similar to a recursive \f[I]cmp(1)\f[]. +It reports how many files in two different directories are the same (or +different). .SH OPTIONS .TP .B \-b, \-\-base @@ -24,11 +23,6 @@ Do a base comparison. .RS .RE .TP -.B \-o, \-\-output -write output fields and states to a file. -.RS -.RE -.TP .B \-v, \-\-verbose Run in verbose mode. Prints a list of statistics/timing data for the command. diff --git a/doc/man/man1/dcp.1 b/doc/man/man1/dcp.1 index 07a49b8d3..358a23bae 100644 --- a/doc/man/man1/dcp.1 +++ b/doc/man/man1/dcp.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DCP" "1" "" "" "" .hy @@ -7,7 +7,7 @@ dcp \- distributed copy .SH SYNOPSIS .PP -\f[B]dcp [OPTION] SOURCE DEST\f[] +\f[B]dcp [OPTION] SRC DEST\f[] .SH DESCRIPTION .PP Parallel MPI application to recursively copy files and directories. @@ -51,11 +51,11 @@ Print a brief message listing the \f[I]dcp(1)\f[] options and usage. .SH RESTRICTIONS .PP If a long\-running copy is interrupted, one should delete the partial -copy and rerun dcp from the beginning. +copy and run dcp again from the beginning. One may use drm to quickly remove a partial copy of a large directory tree. .PP -To ensure the copy was successful, one should run dcmp after dcp +To ensure the copy is successful, one should run dcmp after dcp completes to verify the copy, especially if dcp was not run with the \-s option. .SH EXAMPLES @@ -76,9 +76,7 @@ mpirun \-np 128 dcp \-p /source/dir1/ /dest/dir2 Using the \-S option for sparse files does not work yet at LLNL. If you try to use it then dcp will default to a normal copy. .PP -The \-g option is still being developed. -.PP -The maximum supported filename length for any file transfered is +The maximum supported file name length for any file transferred is approximately 4068 characters. This may be less than the number of characters that your operating system supports. diff --git a/doc/man/man1/dfilemaker.1 b/doc/man/man1/dfilemaker.1 index a81010bd6..e053091be 100644 --- a/doc/man/man1/dfilemaker.1 +++ b/doc/man/man1/dfilemaker.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DFILEMAKER" "1" "" "" "" .hy @@ -19,7 +19,7 @@ they actually exist? Unless there is another version of the code somewhere?\f[] .TP .B \-d, \-\-depth=\f[I]min\f[]\-\f[I]max\f[] -Specify the depth of the filesystem tree to generate. +Specify the depth of the file system tree to generate. The depth will be selected at random within the bounds of min and max. The default depth is set to 10 min, 20 max. .RS @@ -60,7 +60,7 @@ The default file size is set from 1MB to 5MB. .RE .TP .B \-w, \-\-width=\f[I]min\f[]\-\f[I]max\f[] -Specify the width of the filesystem tree to generate. +Specify the width of the file system tree to generate. The width will be selected at random within the bounds of min and max. The width of the tree is determined by counting directories. The default width is set to 10 min, 20 max. @@ -88,4 +88,4 @@ Print version information and exit. \f[C]dwalk\f[] (1). .PP The mpiFileUtils source code and all documentation may be downloaded -from +from diff --git a/doc/man/man1/dfind.1 b/doc/man/man1/dfind.1 index 6aa94ed66..87a282faf 100644 --- a/doc/man/man1/dfind.1 +++ b/doc/man/man1/dfind.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DFIND" "1" "" "" "" .hy diff --git a/doc/man/man1/dgrep.1 b/doc/man/man1/dgrep.1 index 027d0753f..8090f1f40 100644 --- a/doc/man/man1/dgrep.1 +++ b/doc/man/man1/dgrep.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DGREP" "1" "" "" "" .hy diff --git a/doc/man/man1/dparallel.1 b/doc/man/man1/dparallel.1 index c79fec6f8..8b2cf3310 100644 --- a/doc/man/man1/dparallel.1 +++ b/doc/man/man1/dparallel.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DPARALLEL" "1" "" "" "" .hy @@ -35,4 +35,4 @@ Print version information and exit. \f[C]dwalk\f[] (1). .PP The mpiFileUtils source code and all documentation may be downloaded -from +from diff --git a/doc/man/man1/drm.1 b/doc/man/man1/drm.1 index 362829b7c..d5d7d9944 100644 --- a/doc/man/man1/drm.1 +++ b/doc/man/man1/drm.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DRM" "1" "" "" "" .hy @@ -13,12 +13,8 @@ drm \- distributed remove Parallel MPI application to recursively delete a directory and its contents. .PP -drm is a tool for removing files recurseivly in parallel. -drm is similar to \f[I]rm(1)\f[], but unlike \f[I]rm(1)\f[] there is no -need to pass a recursive option as files will be removed from the top -level directory to the bottom of the file tree by default. -.PP -Be careful: it behaves like \f[I]rm \-rf\f[], but it is much faster. +drm is a tool for removing files recursively in parallel. +Be careful: drm behaves like \f[I]rm \-rf\f[], but it is much faster. .SH OPTIONS .TP .B \-i, \-\-input FILE @@ -36,14 +32,15 @@ Walk file system without stat. .IP .nf \f[C] -Do\ not\ remove\ items\ whose\ full\ path\ matches\ REGEX\ (regexec). +Do\ not\ remove\ items\ whose\ full\ path\ matches\ REGEX,\ processed\ by\ regexec(3). \f[] .fi .RS .RE .TP .B \-\-match REGEX -Only remove items whose full path matches REGEX (regexec). +Only remove items whose full path matches REGEX, processed by +regexec(3). .RS .RE .TP @@ -54,9 +51,10 @@ full path. .RE .TP .B \-d, \-\-dryrun -Print out a list of files that \f[B]would\f[] be deleted. +Print a list of files that \f[B]would\f[] be deleted without deleting +them. This is useful to check list of items satisfying \-\-exclude or -\-\-match options without deleting them. +\-\-match options before actually deleting anything. .RS .RE .TP @@ -80,7 +78,7 @@ directory tree: .PP mpirun \-np 128 drm \-\-match \[aq].core$\[aq] /dir/to/delete/from .IP "3." 3 -List items that would be deleted, without removing them: +List items that would be deleted without removing them: .PP mpirun \-np 128 drm \-\-dryrun \-\-match \[aq].core$\[aq] /dir/to/delete/from diff --git a/doc/man/man1/dstripe.1 b/doc/man/man1/dstripe.1 index 29bc2399a..751fefaec 100644 --- a/doc/man/man1/dstripe.1 +++ b/doc/man/man1/dstripe.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DSTRIPE" "1" "" "" "" .hy @@ -7,43 +7,88 @@ dstripe \- restripe files on underlying storage .SH SYNOPSIS .PP -\f[B]dstripe STRIPE_COUNT STRIPE_SIZE SRC_FILE DEST_FILE\f[] +\f[B]dstripe [OPTION] PATH...\f[] .SH DESCRIPTION .PP -Parallel MPI application to restripe a given file. +Parallel MPI application to restripe files. .PP This tool is in active development. -It will eventually report striping information and it will also support -recursive operation on directories. It currently only works on Lustre. .PP -dstripe enables one to restripe a file across the underlying storage +dstripe enables one to restripe file(s) across the underlying storage devices. -dstripe will make a full copy of the source file with the new striping -parameters and write it to the destination file. -.PP -One must specify the integer number of stripes as the first parameter in -STRIPE_COUNT. -One can specify \-1 to use all available stripes. -One must specify the stripe size in bytes in STRIPE_SIZE. -It is possible to use units like "MB" or "GB" after the number. -The units should come immediately after the number without spaces. -Then one must give the source file in SRC_FILE and the name for the new -file in DEST_FILE. +One must specify a list of paths. +All files in those paths can be restriped. +By default, stripe size is 1MB and stripe count is \-1 allowing dstripe +to use all available stripes. .SH OPTIONS +.TP +.B \-c, \-\-count STRIPE_COUNT +The number of stripes to use during file restriping. +If STRIPE_COUNT is \-1, then all available stripes are used. +If STRIPE_COUNT is 0, the lustre file system default is used. +The default stripe count is \-1. +.RS +.RE +.TP +.B \-s, \-\-size STRIPE_SIZE +The stripe size to use during file restriping. +Units like "MB" and "GB" can immediately follow the number without +spaces (ex. +2MB). +The default stripe size is 1MB. +.RS +.RE +.TP +.B \-m, \-\-minsize SIZE +The minimum size a file must be to be a candidate for restriping. +Files smaller than SIZE will not be restriped. +Units like "MB" and "GB" can immediately follow the number without +spaces (ex. +2MB). +The default minimum file size is 0MB. +.RS +.RE +.TP +.B \-r, \-\-report +Display the file size, stripe count, and stripe size of all files found +in PATH. +No restriping is performed when using this option. +.RS +.RE +.TP +.B \-v, \-\-verbose +Run in verbose mode. +.RS +.RE +.TP +.B \-h, \-\-help +Print the command usage, and the list of options available. +.RS +.RE .SH EXAMPLES .IP "1." 3 To stripe a file on all storage devices using a 1MB stripe size: .PP -mpirun \-np 128 dstripe \-1 1MB /path/to/file /path/to/file2 +mpirun \-np 128 dstripe \-s 1MB /path/to/file .IP "2." 3 To stripe a file across 20 storage devices with a 1GB stripe size: .PP -mpirun \-np 128 dstripe 20 2GBB /path/to/file /path/to/file2 +mpirun \-np 128 dstripe \-c 20 \-s 1GB /path/to/file .IP "3." 3 -To read the current striping parameters of a file on Lustre: +To restripe all files in /path/to/files/ that are at least 1GB in size: .PP -lfs getstripe /path/to/file +mpirun \-np 128 dstripe \-m 1GB /path/to/files/ +.IP "4." 3 +To restripe all files in /path/to/files/ across 10 storage devices with +2MB stripe size: +.PP +mpirun \-np 128 dstripe \-c 10 \-s 2MB /path/to/files/ +.IP "5." 3 +To display the current stripe count and stripe size of all files in +/path/to/files/: +.PP +mpirun \-np 128 dstripe \-r /path/to/files/ .SH SEE ALSO .PP \f[C]dbcast\f[] (1). diff --git a/doc/man/man1/dtar.1 b/doc/man/man1/dtar.1 index 408f944b6..80cab473d 100644 --- a/doc/man/man1/dtar.1 +++ b/doc/man/man1/dtar.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DTAR" "1" "" "" "" .hy diff --git a/doc/man/man1/dwalk.1 b/doc/man/man1/dwalk.1 index f4136028a..cefb8ab5f 100644 --- a/doc/man/man1/dwalk.1 +++ b/doc/man/man1/dwalk.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.19.1 +.\" Automatically generated by Pandoc 1.19.2 .\" .TH "DWALK" "1" "" "" "" .hy @@ -10,23 +10,17 @@ dwalk \- distributed walk and list Parallel MPI application to recursively walk and list contents in a directory. .PP -dwalk provides functionality similar to ls and du. -Like du, the tool report a summary of the total number of files and -bytes. -Like ls, the tool sorts and prints information about individual files. +dwalk provides functionality similar to \f[I]ls(1)\f[] and +\f[I]du(1)\f[]. +Like \f[I]du(1)\f[], the tool reports a summary of the total number of +files and bytes. +Like \f[I]ls(1)\f[], the tool sorts and prints information about +individual files. .PP -dwalk can walk a file tree in parallel with various different options. -You can sort the output of the distributed file walk based on different -fields (i.e name, use, group, size, etc), or get a file list -distribution that will put the amount of files you have of a certain -size into bins specified by the user. -For instance, if you wanted to know how many files in a large directory -have 0 bytes then you would use the \-\-distribution option. -.PP -It can save the list to a file or read input from a previously saved -file. -The file must be generated or read by a tool in the mpiFileUtils suite. -.SH DESCRIPTION +The output can be sorted on different fields (e.g, name, user, group, +size, etc). +A histogram of file sizes can be computed listing the number of files +that fall into user\-defined bins. .SH OPTIONS .TP .B \-i, \-\-input FILE @@ -46,12 +40,12 @@ Walk file system without stat. .RE .TP .B \-s, \-\-sort FIELD -Sort output by comma\-delimited fields. +Sort output by comma\-delimited fields (see below). .RS .RE .TP .B \-d, \-\-distribution size:SEPARATORS -Print the file size distribution. +Print the distribution of file sizes. For example, specifying size:0,80,100 will report the number of files that have size 0 bytes, between 1\-80 bytes, between 81\-99 bytes, and 100 bytes or greater. @@ -80,7 +74,10 @@ comma\-delimited list: .PP name,user,group,uid,gid,atime,mtime,ctime,size .PP -A field name can be preceded with \[aq]\-\[aq] to sort in reverse order. +A field name can be preceded with \[aq]\-\[aq] to sort by that field in +reverse order. +.PP +A lexicographic sort is executed if more than one field is given. .SH EXAMPLES .IP "1." 3 To print summary information for a directory: diff --git a/doc/markdown/dcmp.1.md b/doc/markdown/dcmp.1.md index 199858f23..472ca9e1a 100644 --- a/doc/markdown/dcmp.1.md +++ b/doc/markdown/dcmp.1.md @@ -16,9 +16,6 @@ dcmp provides functionality similar to a recursive *cmp(1)*. It reports how man -b, \--base : Do a base comparison. --o, \--output -: write output fields and states to a file. - -v, \--verbose : Run in verbose mode. Prints a list of statistics/timing data for the command. Files walked, started, completed, seconds, files, bytes read, byte rate, and file rate. From 1bf9bc87473db10a3a625a71b4a5459edd199fa7 Mon Sep 17 00:00:00 2001 From: Danielle Sikich Date: Thu, 15 Jun 2017 15:37:20 -0700 Subject: [PATCH 3/3] using MFU_FLIST_NULL check instead --- src/dcmp/dcmp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dcmp/dcmp.c b/src/dcmp/dcmp.c index 47345961b..9b507b664 100644 --- a/src/dcmp/dcmp.c +++ b/src/dcmp/dcmp.c @@ -1054,8 +1054,8 @@ static void dcmp_strmap_compare(mfu_flist src_list, mfu_flist dst_compare_list = mfu_flist_subset(dst_list); /* remove and copy lists for sync option */ - mfu_flist dst_remove_list = NULL; - mfu_flist src_cp_list = NULL; + mfu_flist dst_remove_list = MFU_FLIST_NULL; + mfu_flist src_cp_list = MFU_FLIST_NULL; /* create dst remove list if sync option is on */ if (mfu_copy_opts->do_sync) { @@ -1221,10 +1221,10 @@ static void dcmp_strmap_compare(mfu_flist src_list, /* free lists used for copying and removing files in sync option */ /* TODO: fix MFU_FLIST_NULL so that we don't have to do these NULL * checks here */ - if (src_cp_list != NULL) { + if (src_cp_list != MFU_FLIST_NULL) { mfu_flist_free(&src_cp_list); } - if (dst_remove_list != NULL) { + if (dst_remove_list != MFU_FLIST_NULL) { mfu_flist_free(&dst_remove_list); }