From b082eac904dfb710f9439da83413fbdf863957bf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 May 2008 20:36:58 -0700 Subject: [PATCH] if --bash is set, don't spit out error messages, we don't care. --- bti.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bti.c b/bti.c index bf6a809..5921e3d 100644 --- a/bti.c +++ b/bti.c @@ -219,8 +219,8 @@ static int send_tweet(struct session *session) curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_callback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, curl_buf); res = curl_easy_perform(curl); - if (res) { - printf("error(%d) trying to send tweet\n", res); + if (res && !session->bash) { + fprintf(stderr, "error(%d) trying to send tweet\n", res); return -EINVAL; } @@ -408,7 +408,7 @@ int main(int argc, char *argv[], char *envp[]) } retval = send_tweet(session); - if (retval) { + if (retval && !session->bash) { fprintf(stderr, "tweet failed\n"); return -1; } -- 2.39.5