1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 13:13:24 +01:00

fixed size_t declarations for c89 standard.

This commit is contained in:
Jude 2013-08-23 12:03:14 -05:00
commit 0b927acd8f
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
## Toxic - console client for [Tox](http://tox.im)
The client formerly resided in the [Tox core repository](https://github.com/irungentoo/ProjectTox-Core) and is now available as a stanadlone verion.
The client formerly resided in the [Tox core repository](https://github.com/irungentoo/ProjectTox-Core) and is now available as a standalone verion.
To compile, first generate the configure script by running the ```autoreconf -i``` command.

View File

@ -360,9 +360,10 @@ void execute(ToxWindow *self, ChatContext *ctx, Messenger *m, char *cmd)
else if (!strcmp(cmd, "/myid")) {
char id[FRIEND_ADDRESS_SIZE * 2 + 1] = {0};
uint8_t address[FRIEND_ADDRESS_SIZE];
size_t i;
getaddress(m, address);
for (size_t i = 0; i < FRIEND_ADDRESS_SIZE; i++) {
for (i = 0; i < FRIEND_ADDRESS_SIZE; i++) {
char xx[3];
snprintf(xx, sizeof(xx), "%02X", address[i] & 0xff);
strcat(id, xx);

View File

@ -75,8 +75,9 @@ unsigned char *hex_string_to_bin(char hex_string[])
size_t len = strlen(hex_string);
unsigned char *val = malloc(len);
char *pos = hex_string;
size_t i;
for (size_t i = 0; i < len; ++i, pos += 2)
for (i = 0; i < len; ++i, pos += 2)
sscanf(pos, "%2hhx", &val[i]);
return val;