Mercurial > pidgin
comparison libgaim/protocols/qq/send_core.c @ 14629:6b8bc59414f0
[gaim-migrate @ 17375]
Get rid of these useless checks.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Tue, 26 Sep 2006 22:54:24 +0000 |
parents | 902c3aa4950a |
children | c039c920e11c |
comparison
equal
deleted
inserted
replaced
14628:58202142e9ad | 14629:6b8bc59414f0 |
---|---|
38 GaimConnection *gc, guint16 cmd, gboolean is_auto_seq, guint16 *seq) | 38 GaimConnection *gc, guint16 cmd, gboolean is_auto_seq, guint16 *seq) |
39 { | 39 { |
40 qq_data *qd; | 40 qq_data *qd; |
41 gint bytes_expected, bytes_written; | 41 gint bytes_expected, bytes_written; |
42 | 42 |
43 g_return_val_if_fail(gc != NULL && | 43 g_return_val_if_fail(buf != NULL && cursor != NULL && *cursor != NULL, -1); |
44 gc->proto_data != NULL && buf != NULL && cursor != NULL && *cursor != NULL, -1); | |
45 | 44 |
46 qd = (qq_data *) gc->proto_data; | 45 qd = (qq_data *) gc->proto_data; |
47 if (is_auto_seq) | 46 if (is_auto_seq) |
48 *seq = ++(qd->send_seq); | 47 *seq = ++(qd->send_seq); |
49 | 48 |
77 { | 76 { |
78 qq_data *qd; | 77 qq_data *qd; |
79 qq_sendpacket *p; | 78 qq_sendpacket *p; |
80 gint bytes_sent; | 79 gint bytes_sent; |
81 guint8 *cursor; | 80 guint8 *cursor; |
82 | |
83 g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, -1); | |
84 | 81 |
85 qd = (qq_data *) gc->proto_data; | 82 qd = (qq_data *) gc->proto_data; |
86 | 83 |
87 if (qd->use_tcp) { | 84 if (qd->use_tcp) { |
88 if (len > MAX_PACKET_SIZE) { | 85 if (len > MAX_PACKET_SIZE) { |
122 qq_data *qd; | 119 qq_data *qd; |
123 guint8 *buf, *cursor, *encrypted_data; | 120 guint8 *buf, *cursor, *encrypted_data; |
124 guint16 seq_ret; | 121 guint16 seq_ret; |
125 gint encrypted_len, bytes_written, bytes_expected, bytes_sent; | 122 gint encrypted_len, bytes_written, bytes_expected, bytes_sent; |
126 | 123 |
127 g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, -1); | |
128 | |
129 qd = (qq_data *) gc->proto_data; | 124 qd = (qq_data *) gc->proto_data; |
130 g_return_val_if_fail(qd->session_key != NULL, -1); | 125 g_return_val_if_fail(qd->session_key != NULL, -1); |
131 | 126 |
132 buf = g_newa(guint8, MAX_PACKET_SIZE); | 127 buf = g_newa(guint8, MAX_PACKET_SIZE); |
133 encrypted_len = len + 16; /* at most 16 bytes more */ | 128 encrypted_len = len + 16; /* at most 16 bytes more */ |