comparison libpurple/protocols/msn/slplink.c @ 28232:de7f6fd04298

Move this check inside the else condition. The other half of the if statement guarrantees that slpmsg will be non-NULL, this is a very tiny optimization, but it's also cleaner
author Mark Doliner <mark@kingant.net>
date Wed, 12 Aug 2009 23:13:47 +0000
parents 6adbdd4b2963
children 4200554dd0fc
comparison
equal deleted inserted replaced
28228:359800ae7d17 28232:de7f6fd04298
500 { 500 {
501 purple_debug_error("msn", "This can't be good\n"); 501 purple_debug_error("msn", "This can't be good\n");
502 g_return_if_reached(); 502 g_return_if_reached();
503 } 503 }
504 504
505 slpmsg = NULL;
506 data = msn_message_get_bin_data(msg, &len); 505 data = msn_message_get_bin_data(msg, &len);
507 506
508 /* 507 /*
509 OVERHEAD! 508 OVERHEAD!
510 if (msg->msnslp_header.length < msg->msnslp_header.total_size) 509 if (msg->msnslp_header.length < msg->msnslp_header.total_size)
564 } 563 }
565 } 564 }
566 else 565 else
567 { 566 {
568 slpmsg = msn_slplink_message_find(slplink, msg->msnslp_header.session_id, msg->msnslp_header.id); 567 slpmsg = msn_slplink_message_find(slplink, msg->msnslp_header.session_id, msg->msnslp_header.id);
569 } 568 if (slpmsg == NULL)
570 569 {
571 if (slpmsg == NULL) 570 /* Probably the transfer was canceled */
572 { 571 purple_debug_error("msn", "Couldn't find slpmsg\n");
573 /* Probably the transfer was canceled */ 572 return;
574 purple_debug_error("msn", "Couldn't find slpmsg\n"); 573 }
575 return;
576 } 574 }
577 575
578 if (slpmsg->fp) 576 if (slpmsg->fp)
579 { 577 {
580 /* fseek(slpmsg->fp, offset, SEEK_SET); */ 578 /* fseek(slpmsg->fp, offset, SEEK_SET); */