[PATCH 2/4] Use NULL instead of "offline" for the user status.

Richard Laager rlaager at wiktel.com
Mon Jun 23 17:30:14 EDT 2008

On Sun, 2008-06-22 at 18:03 +0300, Felipe Contreras wrote:
> -	if (user->status != NULL) {
> -		gboolean offline = (strcmp(user->status, "offline") == 0);
> +	{
> +		gboolean offline = (user->status == NULL);
>  		if (!offline) {
>  			purple_prpl_got_user_status(account, user->passport, user->status,

This leaves the code looking like this, right?

	code here
	more code

Instead, the braces can be dropped and the code inside the block moved
out. You'll also end up needing to move the definition of the offline
variable because if you didn't, it'd be a declaration after code.

/me tries referring to QuLogic as Elliott and hopes that is 1) correct
and 2) acceptable. If you'd prefer QuLogic or something else, please let
me know.

In response to Elliott's concern:
Given that things are initialized as NULL (and this patch aims to fix a
bug related to that, it seems), it seems reasonable to me to make NULL
represent offline here.

It seems that Elliott is looking at these patches. Elliott: If they
seems good to you, feel free to merge them to trunk. On a related note,
where are you at on your MSN branch? Does that fix some issues? Is it
stable enough to merge to trunk?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://pidgin.im/pipermail/devel/attachments/20080623/b6711e0e/attachment.sig>

More information about the Devel mailing list