summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_file/ecore_file.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-21 13:52:25 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-21 13:52:25 +0000
commit5a8a8c90140aa18bde2c1696eb7d2da1c978e15e (patch)
treeb9d11055f743cd53a3895501ed9a6203062bbe60 /legacy/ecore/src/lib/ecore_file/ecore_file.c
parent8b3511109441c22a2664665efe00892dc44fcf6c (diff)
Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci This should convert all cases where there's a comparison to NULL to simpler forms. This patch applies the following transformations: code before patch ||code after patch =============================================================== return a == NULL; return !a; return a != NULL; return !!a; func(a == NULL); func(!a); func(a != NULL); func(!!a); b = a == NULL; b = !a; b = a != NULL; b = !!a; b = a == NULL ? c : d; b = !a ? c : d; b = a != NULL ? c : d; b = a ? c : d; other cases: a == NULL !a a != NULL a SVN revision: 51487
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c
index 32298965e6..ec0a1f72ba 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c
@@ -177,7 +177,7 @@ ecore_file_mkdirs(const char **dirs)
177 177
178 if (!dirs) return -1; 178 if (!dirs) return -1;
179 179
180 for (; *dirs != NULL; dirs++) 180 for (; *dirs; dirs++)
181 if (ecore_file_mkdir(*dirs)) 181 if (ecore_file_mkdir(*dirs))
182 i++; 182 i++;
183 return i; 183 return i;
@@ -234,7 +234,7 @@ ecore_file_mksubdirs(const char *base, const char **subdirs)
234#endif 234#endif
235 235
236 i = 0; 236 i = 0;
237 for (; *subdirs != NULL; subdirs++) 237 for (; *subdirs; subdirs++)
238 { 238 {
239 struct stat st; 239 struct stat st;
240 240
@@ -420,7 +420,7 @@ ecore_file_mkpaths(const char **paths)
420 420
421 if (!paths) return -1; 421 if (!paths) return -1;
422 422
423 for (; *paths != NULL; paths++) 423 for (; *paths; paths++)
424 if (ecore_file_mkpath(*paths)) 424 if (ecore_file_mkpath(*paths))
425 i++; 425 i++;
426 return i; 426 return i;