[gnome-online-accounts/gnome-3-10] Fix check for non-empty strings
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-10] Fix check for non-empty strings
- Date: Thu, 10 Apr 2014 12:10:31 +0000 (UTC)
commit 4e3f1846787a40df7b52c7086aad659a1874ae08
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Apr 10 13:11:04 2014 +0200
Fix check for non-empty strings
Fixes: https://bugzilla.gnome.org/727957
src/goabackend/goaewsclient.c | 10 +++++-----
src/goabackend/goahttpclient.c | 8 ++++----
src/goabackend/goamailclient.c | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/goabackend/goaewsclient.c b/src/goabackend/goaewsclient.c
index 9ef34d2..be2aed0 100644
--- a/src/goabackend/goaewsclient.c
+++ b/src/goabackend/goaewsclient.c
@@ -1,6 +1,6 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * Copyright (C) 2012, 2013 Red Hat, Inc.
+ * Copyright (C) 2012, 2013, 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -443,10 +443,10 @@ goa_ews_client_autodiscover (GoaEwsClient *client,
xmlOutputBuffer *buf;
g_return_if_fail (GOA_IS_EWS_CLIENT (client));
- g_return_if_fail (email != NULL || email[0] != '\0');
- g_return_if_fail (password != NULL || password[0] != '\0');
- g_return_if_fail (username != NULL || username[0] != '\0');
- g_return_if_fail (server != NULL || server[0] != '\0');
+ g_return_if_fail (email != NULL && email[0] != '\0');
+ g_return_if_fail (password != NULL && password[0] != '\0');
+ g_return_if_fail (username != NULL && username[0] != '\0');
+ g_return_if_fail (server != NULL && server[0] != '\0');
g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
doc = ews_client_create_autodiscover_xml (email);
diff --git a/src/goabackend/goahttpclient.c b/src/goabackend/goahttpclient.c
index 8dee27f..9ca922a 100644
--- a/src/goabackend/goahttpclient.c
+++ b/src/goabackend/goahttpclient.c
@@ -1,6 +1,6 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * Copyright (C) 2012, 2013 Red Hat, Inc.
+ * Copyright (C) 2012, 2013, 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -220,9 +220,9 @@ goa_http_client_check (GoaHttpClient *client,
SoupLogger *logger;
g_return_if_fail (GOA_IS_HTTP_CLIENT (client));
- g_return_if_fail (uri != NULL || uri[0] != '\0');
- g_return_if_fail (username != NULL || username[0] != '\0');
- g_return_if_fail (password != NULL || password[0] != '\0');
+ g_return_if_fail (uri != NULL && uri[0] != '\0');
+ g_return_if_fail (username != NULL && username[0] != '\0');
+ g_return_if_fail (password != NULL && password[0] != '\0');
g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
data = g_slice_new0 (CheckData);
diff --git a/src/goabackend/goamailclient.c b/src/goabackend/goamailclient.c
index e34df95..e761d84 100644
--- a/src/goabackend/goamailclient.c
+++ b/src/goabackend/goamailclient.c
@@ -1,6 +1,6 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * Copyright (C) 2011, 2013 Red Hat, Inc.
+ * Copyright (C) 2011, 2013, 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -383,7 +383,7 @@ goa_mail_client_check (GoaMailClient *client,
CheckData *data;
g_return_if_fail (GOA_IS_MAIL_CLIENT (client));
- g_return_if_fail (host_and_port != NULL || host_and_port[0] != '\0');
+ g_return_if_fail (host_and_port != NULL && host_and_port[0] != '\0');
g_return_if_fail (GOA_IS_MAIL_AUTH (auth));
g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]