[glib] gsocket: Add missing preconditions to g_socket_send_message()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gsocket: Add missing preconditions to g_socket_send_message()
- Date: Thu, 15 May 2014 13:38:51 +0000 (UTC)
commit 7f5cc2c3c5409a6d5e3acab5d6349ae69fb67922
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu May 15 12:16:00 2014 +0100
gsocket: Add missing preconditions to g_socket_send_message()
https://bugzilla.gnome.org/show_bug.cgi?id=730190
gio/gsocket.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsocket.c b/gio/gsocket.c
index 6713d0a..e59ace8 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -3746,6 +3746,11 @@ g_socket_send_message (GSocket *socket,
char zero;
g_return_val_if_fail (G_IS_SOCKET (socket), -1);
+ g_return_val_if_fail (address == NULL || G_IS_SOCKET_ADDRESS (address), -1);
+ g_return_val_if_fail (num_vectors == 0 || vectors != NULL, -1);
+ g_return_val_if_fail (num_messages == 0 || messages != NULL, -1);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), -1);
+ g_return_val_if_fail (error == NULL || *error == NULL, -1);
if (!check_socket (socket, error))
return -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]