Browse files

coding style cleanups

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information...
1 parent ac3626e commit ac0335395218b3c1af49b83c35ca00716fa501c7 @gregkh committed Apr 23, 2013
Showing with 9 additions and 11 deletions.
  1. +9 −11 bti.c
View
20 bti.c
@@ -81,12 +81,12 @@ static void display_help(void)
" --help\n", VERSION);
}
-int strlen_utf8(char *s)
+static int strlen_utf8(char *s)
{
int i = 0, j = 0;
- while (s[i])
- {
- if ((s[i] & 0xc0) != 0x80) j++;
+ while (s[i]) {
+ if ((s[i] & 0xc0) != 0x80)
+ j++;
i++;
}
return j;
@@ -792,14 +792,12 @@ static int send_request(struct session *session)
} else {
switch (session->action) {
case ACTION_UPDATE:
- if(strlen_utf8(session->tweet) > 140)
- {
+ if (strlen_utf8(session->tweet) > 140) {
printf("E: tweet is too long!\n");
goto skip_tweet;
}
-
- //TODO: add tweet crunching function.
-
+
+ /* TODO: add tweet crunching function. */
escaped_tweet = oauth_url_escape(session->tweet);
if (session->replyto) {
sprintf(endpoint,
@@ -873,8 +871,8 @@ static int send_request(struct session *session)
fprintf(stderr, "Error retrieving from URL (%s)\n", endpoint);
return -EIO;
}
-
- skip_tweet:
+
+ skip_tweet:
if ((session->action != ACTION_UPDATE) &&
(session->action != ACTION_RETWEET))

0 comments on commit ac03353

Please sign in to comment.