diff --git a/README.md b/README.md index 259ff6d..de575f8 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/chat.c b/src/chat.c index d3d46c2..ce7f200 100644 --- a/src/chat.c +++ b/src/chat.c @@ -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); diff --git a/src/prompt.c b/src/prompt.c index 0bae4d1..0155a8e 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -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;