comparison libgaim/protocols/qq/buddy_list.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 8ff8f1c897b5
children c039c920e11c
comparison
equal deleted inserted replaced
14628:58202142e9ad 14629:6b8bc59414f0
60 void qq_send_packet_get_buddies_online(GaimConnection *gc, guint8 position) 60 void qq_send_packet_get_buddies_online(GaimConnection *gc, guint8 position)
61 { 61 {
62 qq_data *qd; 62 qq_data *qd;
63 guint8 *raw_data, *cursor; 63 guint8 *raw_data, *cursor;
64 64
65 g_return_if_fail(gc != NULL && gc->proto_data != NULL);
66
67 qd = (qq_data *) gc->proto_data; 65 qd = (qq_data *) gc->proto_data;
68 raw_data = g_newa(guint8, 5); 66 raw_data = g_newa(guint8, 5);
69 cursor = raw_data; 67 cursor = raw_data;
70 68
71 /* 000-000 get online friends cmd 69 /* 000-000 get online friends cmd
89 void qq_send_packet_get_buddies_list(GaimConnection *gc, guint16 position) 87 void qq_send_packet_get_buddies_list(GaimConnection *gc, guint16 position)
90 { 88 {
91 guint8 *raw_data, *cursor; 89 guint8 *raw_data, *cursor;
92 gint data_len; 90 gint data_len;
93 91
94 g_return_if_fail(gc != NULL);
95
96 data_len = 3; 92 data_len = 3;
97 raw_data = g_newa(guint8, data_len); 93 raw_data = g_newa(guint8, data_len);
98 cursor = raw_data; 94 cursor = raw_data;
99 /* 000-001 starting position, can manually specify */ 95 /* 000-001 starting position, can manually specify */
100 create_packet_w(raw_data, &cursor, position); 96 create_packet_w(raw_data, &cursor, position);
112 void qq_send_packet_get_all_list_with_group(GaimConnection *gc, guint32 position) 108 void qq_send_packet_get_all_list_with_group(GaimConnection *gc, guint32 position)
113 { 109 {
114 guint8 *raw_data, *cursor; 110 guint8 *raw_data, *cursor;
115 gint data_len; 111 gint data_len;
116 112
117 g_return_if_fail(gc != NULL);
118
119 data_len = 10; 113 data_len = 10;
120 raw_data = g_newa(guint8, data_len); 114 raw_data = g_newa(guint8, data_len);
121 cursor = raw_data; 115 cursor = raw_data;
122 /* 0x01 download, 0x02, upload */ 116 /* 0x01 download, 0x02, upload */
123 create_packet_b(raw_data, &cursor, 0x01); 117 create_packet_b(raw_data, &cursor, 0x01);
157 guint8 *data, *cursor, position; 151 guint8 *data, *cursor, position;
158 GaimBuddy *b; 152 GaimBuddy *b;
159 qq_buddy *q_bud; 153 qq_buddy *q_bud;
160 qq_friends_online_entry *fe; 154 qq_friends_online_entry *fe;
161 155
162 g_return_if_fail(gc != NULL && gc->proto_data != NULL);
163 g_return_if_fail(buf != NULL && buf_len != 0); 156 g_return_if_fail(buf != NULL && buf_len != 0);
164 157
165 qd = (qq_data *) gc->proto_data; 158 qd = (qq_data *) gc->proto_data;
166 len = buf_len; 159 len = buf_len;
167 data = g_newa(guint8, len); 160 data = g_newa(guint8, len);
257 guint16 position, unknown; 250 guint16 position, unknown;
258 guint8 *data, *cursor, pascal_len; 251 guint8 *data, *cursor, pascal_len;
259 gchar *name; 252 gchar *name;
260 GaimBuddy *b; 253 GaimBuddy *b;
261 254
262 g_return_if_fail(gc != NULL && gc->proto_data != NULL);
263 g_return_if_fail(buf != NULL && buf_len != 0); 255 g_return_if_fail(buf != NULL && buf_len != 0);
264 256
265 qd = (qq_data *) gc->proto_data; 257 qd = (qq_data *) gc->proto_data;
266 len = buf_len; 258 len = buf_len;
267 data = g_newa(guint8, len); 259 data = g_newa(guint8, len);
352 guint32 unknown, position; 344 guint32 unknown, position;
353 guint32 uid; 345 guint32 uid;
354 guint8 type, groupid; 346 guint8 type, groupid;
355 qq_group *group; 347 qq_group *group;
356 348
357 g_return_if_fail(gc != NULL && gc->proto_data != NULL);
358 g_return_if_fail(buf != NULL && buf_len != 0); 349 g_return_if_fail(buf != NULL && buf_len != 0);
359 350
360 qd = (qq_data *) gc->proto_data; 351 qd = (qq_data *) gc->proto_data;
361 len = buf_len; 352 len = buf_len;
362 data = g_newa(guint8, len); 353 data = g_newa(guint8, len);