libgaim/protocols/zephyr/zephyr_err.h

Tue, 26 Sep 2006 17:38:09 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Tue, 26 Sep 2006 17:38:09 +0000
changeset 14686
f3d13f21350c
parent 14254
77edc7a6191a
child 20470
77693555855f
permissions
-rw-r--r--

[gaim-migrate @ 17356]
After the comments on gaim-devel about 'bad' code, I looked into the function referenced. It appears that yahoo_buddy_icon_upload_connected() is only called as a callback. It's registered from yahoo_buddy_icon_upload(). yahoo_buddy_icon_upload() is only called twice. In neither case can a NULL make it down to yahoo_buddy_icon_upload_connected(). As this is an exceptional case rather than a normal one, a g_return_if_fail() is more appropriate. That adds logging, makes the intent clearer, and will help the Coverity software detect violations of this assumption.

/*
 * zephyr_err.h:
 * This file is automatically generated; please do not edit it.
 */
#define ZERR_PKTLEN                              (-772103680L)
#define ZERR_HEADERLEN                           (-772103679L)
#define ZERR_ILLVAL                              (-772103678L)
#define ZERR_HMPORT                              (-772103677L)
#define ZERR_PORTINUSE                           (-772103676L)
#define ZERR_BADPKT                              (-772103675L)
#define ZERR_VERS                                (-772103674L)
#define ZERR_NOPORT                              (-772103673L)
#define ZERR_NONOTICE                            (-772103672L)
#define ZERR_QLEN                                (-772103671L)
#define ZERR_HMDEAD                              (-772103670L)
#define ZERR_INTERNAL                            (-772103669L)
#define ZERR_NOLOCATIONS                         (-772103668L)
#define ZERR_NOMORELOCS                          (-772103667L)
#define ZERR_FIELDLEN                            (-772103666L)
#define ZERR_BADFIELD                            (-772103665L)
#define ZERR_SERVNAK                             (-772103664L)
#define ZERR_AUTHFAIL                            (-772103663L)
#define ZERR_LOGINFAIL                           (-772103662L)
#define ZERR_NOSUBSCRIPTIONS                     (-772103661L)
#define ZERR_NOMORESUBSCRIPTIONS                 (-772103660L)
#define ZERR_TOOMANYSUBS                         (-772103659L)
#define ZERR_EOF                                 (-772103658L)
void initialize_zeph_error_table (void);
#define ERROR_TABLE_BASE_zeph (-772103680L)

/* for compatibility with older versions... */
#define init_zeph_err_tbl initialize_zeph_error_table
#define zeph_err_base ERROR_TABLE_BASE_zeph

mercurial