[2936] in BarnOwl Developers
[PATCH 1/5] owl_zephyr_initialize only needs one zephyr library return value
daemon@ATHENA.MIT.EDU (Karl Ramm)
Fri Feb 25 21:24:44 2011
From: Karl Ramm <kcr@1ts.org>
To: barnowl-dev@mit.edu
Cc: Karl Ramm <kcr@1ts.org>
Date: Fri, 25 Feb 2011 21:24:17 -0500
In-Reply-To: <uussjvbr0tc.fsf@1ts.org>
It doesn't need two separate return-value variabels, and the one
should be a Code_t.
---
zephyr.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/zephyr.c b/zephyr.c
index 560bb72..9863018 100644
--- a/zephyr.c
+++ b/zephyr.c
@@ -30,11 +30,10 @@ static char *owl_zephyr_dotfile(const char *name, const char *input)
#ifdef HAVE_LIBZEPHYR
void owl_zephyr_initialize(void)
{
- int ret;
+ Code_t ret;
struct servent *sp;
struct sockaddr_in sin;
ZNotice_t req;
- Code_t code;
/*
* Code modified from libzephyr's ZhmStat.c
@@ -68,13 +67,13 @@ void owl_zephyr_initialize(void)
req.z_default_format = zstr("");
req.z_message_len = 0;
- if ((code = ZSetDestAddr(&sin)) != ZERR_NONE) {
- owl_function_error("Initializing Zephyr: %s", error_message(code));
+ if ((ret = ZSetDestAddr(&sin)) != ZERR_NONE) {
+ owl_function_error("Initializing Zephyr: %s", error_message(ret));
return;
}
- if ((code = ZSendNotice(&req, ZNOAUTH)) != ZERR_NONE) {
- owl_function_error("Initializing Zephyr: %s", error_message(code));
+ if ((ret = ZSendNotice(&req, ZNOAUTH)) != ZERR_NONE) {
+ owl_function_error("Initializing Zephyr: %s", error_message(ret));
return;
}
--
1.7.2.3