Ran it through astyle

This commit is contained in:
Sean Qureshi 2013-08-18 01:48:36 -07:00
parent a03dcbb54e
commit 1986e6b7f4
4 changed files with 14 additions and 12 deletions

View File

@ -88,12 +88,12 @@ START_TEST(test_m_set_userstatus)
uint16_t bad_length = REALLY_BIG_NUMBER;
ck_assert_msg((m_set_statusmessage(m, (uint8_t *)status, bad_length) == -1),
"m_set_userstatus did NOT catch the following length: %d\n",
REALLY_BIG_NUMBER);
"m_set_userstatus did NOT catch the following length: %d\n",
REALLY_BIG_NUMBER);
ck_assert_msg((m_set_statusmessage(m, (uint8_t *)status, good_length) == 0),
"m_set_userstatus did NOT return 0 on the following length: %d\n"
"MAX_STATUSMESSAGE_LENGTH: %d\n", good_length, MAX_STATUSMESSAGE_LENGTH);
"m_set_userstatus did NOT return 0 on the following length: %d\n"
"MAX_STATUSMESSAGE_LENGTH: %d\n", good_length, MAX_STATUSMESSAGE_LENGTH);
}
END_TEST
@ -157,10 +157,10 @@ START_TEST(test_setname)
int bad_length = REALLY_BIG_NUMBER;
ck_assert_msg((setname(m, (uint8_t *)good_name, bad_length) == -1),
"setname() did NOT error on %d as a length argument!\n", bad_length);
"setname() did NOT error on %d as a length argument!\n", bad_length);
ck_assert_msg((setname(m, (uint8_t *)good_name, good_length) == 0),
"setname() did NOT return 0 on good arguments!\n");
"setname() did NOT return 0 on good arguments!\n");
}
END_TEST

View File

@ -40,6 +40,7 @@ int realloc_friendlist(Messenger *m, uint32_t num)
if (num * sizeof(Friend) == 0) return -1;
Friend *newfriendlist = realloc(m->friendlist, num * sizeof(Friend));
if (newfriendlist == NULL && num != 0)
return -1;

View File

@ -92,11 +92,11 @@ int init_connection(void)
if (DHT_isconnected())
return 0;
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
FILE *fp = fopen("DHTservers", "r");
#else
FILE *fp = fopen("~/.tox/DHTservers", "r");
#endif
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
FILE *fp = fopen("DHTservers", "r");
#else
FILE *fp = fopen("~/.tox/DHTservers", "r");
#endif
if (!fp)
return 1;

View File

@ -273,6 +273,7 @@ void cmd_nick(ToxWindow *self, Messenger *m, char **args)
char *nick = args[1];
setname(m, (uint8_t *) nick, strlen(nick) + 1);
wprintw(self->window, "Nickname set to: %s\n", nick);
if (store_data(m, DATA_FILE)) {
wprintw(self->window, "\nCould not store Messenger data\n");
}