[PATCH 1/2] filefrag: fix GCC7.x compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



../../misc/filefrag.c:591:33: warning: comparison between pointer and
zero character constant [-Wpointer-compare]
  for (cpp = argv + optind; *cpp != '\0'; cpp++) {

Signed-off-by: Marc Thomas <marc@xxxxxxxxxxxxxxxxxx>
---
 misc/filefrag.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/filefrag.c b/misc/filefrag.c
index 1a185124..9c57ab93 100644
--- a/misc/filefrag.c
+++ b/misc/filefrag.c
@@ -588,7 +588,7 @@ int main(int argc, char**argv)
 	if (optind == argc)
 		usage(argv[0]);
 -	for (cpp = argv + optind; *cpp != '\0'; cpp++) {
+	for (cpp = argv + optind; *cpp != NULL; cpp++) {
 		int rc2 = frag_report(*cpp);
  		if (rc2 < 0 && rc == 0)
-- 
2.13.0




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux