From 4e53885f7331bd59a3405904c26a7b048eb6125b Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 9 Mar 2009 15:37:04 +0000 Subject: [PATCH] Fix a compiler warning and ensure that "sent" is initialized to 0. This commit was SVN r20756. --- orte/mca/notifier/twitter/notifier_twitter_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orte/mca/notifier/twitter/notifier_twitter_module.c b/orte/mca/notifier/twitter/notifier_twitter_module.c index a1c395119c..ad91afa0e8 100644 --- a/orte/mca/notifier/twitter/notifier_twitter_module.c +++ b/orte/mca/notifier/twitter/notifier_twitter_module.c @@ -186,7 +186,7 @@ static void tweet(char *msg) auth_basic(), version_string(), mca_notifier_twitter_component.server, - strlen(msg) + strlen("status="), + (int) (strlen(msg) + strlen("status=")), msg); /* Get a socket */ @@ -216,7 +216,7 @@ static void tweet(char *msg) } /* Send HTTP update */ - for (len = strlen(str); sent < len; ) { + for (sent = 0, len = strlen(str); sent < len; ) { ret = write(fd, str, strlen(str)); if (ret > 0) { str += ret;