From 607ee9f4bcad9a72425392c55934be5237042e81 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Wed, 14 Jun 2017 13:23:36 -0700 Subject: [PATCH] print message when no files are given, rearrange code for readability --- programs/zstdcli.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 91bce8bb8..f8612f297 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -674,13 +674,19 @@ int main(int argCount, const char* argv[]) } #endif if(operation==zom_list){ - unsigned u; + if(filenameIdx==0){ + DISPLAY("No files given\n"); + CLEAN_RETURN(0); + } DISPLAY("===========================================\n"); DISPLAY("Printing information about compressed files\n"); DISPLAY("===========================================\n"); DISPLAY("Number of files listed: %d\n", filenameIdx); - for(u=0; u