[phodav] propfind: Fix file type check
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav] propfind: Fix file type check
- Date: Wed, 25 Mar 2015 11:25:07 +0000 (UTC)
commit 3567b5a67bc064599833e80f42c81011995b7ed7
Author: Christophe Fergeau <cfergeau redhat com>
Date: Wed Mar 25 12:17:30 2015 +0100
propfind: Fix file type check
gcc 5.0 warns about:
libphodav/phodav-method-propfind.c: In function 'prop_resourcetype':
libphodav/phodav-method-propfind.c:68:46: error: logical not is only applied to the left hand side of
comparison [-Werror=logical-not-parentheses]
else if (!g_file_info_get_file_type (info) == G_FILE_TYPE_REGULAR)
and the check is indeed not correct.
libphodav/phodav-method-propfind.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libphodav/phodav-method-propfind.c b/libphodav/phodav-method-propfind.c
index f3040b5..4031074 100644
--- a/libphodav/phodav-method-propfind.c
+++ b/libphodav/phodav-method-propfind.c
@@ -65,7 +65,7 @@ prop_resourcetype (PathHandler *handler, PropFind *pf,
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
xmlNewChild (node, ns, BAD_CAST "collection", NULL);
- else if (!g_file_info_get_file_type (info) == G_FILE_TYPE_REGULAR)
+ else if (g_file_info_get_file_type (info) != G_FILE_TYPE_REGULAR)
{
g_warn_if_reached ();
status = SOUP_STATUS_NOT_FOUND;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]