summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorz3bra <contactatz3bradotorg>2016-11-01 22:11:37 +0100
committerz3bra <contactatz3bradotorg>2016-11-08 16:47:51 +0100
commit68aa2354b558665b2f2b816b8ff0e863a6a41db5 (patch)
treea9df4d5fef00eff56e39d80127c1413d97c2811a
parentd973b73e8457c464a433d625d2b938467a00bbf5 (diff)
Ditch TOX_FRIEND_ADDRESS_SIZE
-rw-r--r--ratox.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ratox.c b/ratox.c
index a35971e..2fd3b57 100644
--- a/ratox.c
+++ b/ratox.c
@@ -1095,7 +1095,7 @@ localinit(void)
size_t i, m;
int r;
uint8_t name[TOX_MAX_NAME_LENGTH + 1];
- uint8_t address[TOX_FRIEND_ADDRESS_SIZE];
+ uint8_t address[TOX_ADDRESS_SIZE];
uint8_t status[TOX_MAX_STATUS_MESSAGE_LENGTH + 1];
for (i = 0; i < LEN(gslots); i++) {
@@ -1167,7 +1167,7 @@ localinit(void)
if (idfd < 0)
eprintf("open %s:", "id");
tox_get_address(tox, address);
- for (i = 0; i < TOX_FRIEND_ADDRESS_SIZE; i++)
+ for (i = 0; i < TOX_ADDRESS_SIZE; i++)
dprintf(idfd, "%02X", address[i]);
dprintf(idfd, "\n");
@@ -1520,7 +1520,7 @@ sendfriendreq(void *data)
int r;
char buf[PIPE_BUF], *p;
char *msg = "ratox is awesome!";
- uint8_t id[TOX_FRIEND_ADDRESS_SIZE];
+ uint8_t id[TOX_ADDRESS_SIZE];
n = fiforead(gslots[REQUEST].dirfd, &gslots[REQUEST].fd[IN], gfiles[IN],
buf, sizeof(buf) - 1);
@@ -1569,7 +1569,7 @@ setnospam(void *data)
ssize_t n, i;
uint32_t nsval;
uint8_t nospam[2 * sizeof(uint32_t) + 1];
- uint8_t address[TOX_FRIEND_ADDRESS_SIZE];
+ uint8_t address[TOX_ADDRESS_SIZE];
n = fiforead(gslots[NOSPAM].dirfd, &gslots[NOSPAM].fd[IN], gfiles[IN],
nospam, sizeof(nospam) - 1);
@@ -1597,7 +1597,7 @@ setnospam(void *data)
tox_get_address(tox, address);
ftruncate(idfd, 0);
lseek(idfd, 0, SEEK_SET);
- for (i = 0; i < TOX_FRIEND_ADDRESS_SIZE; i++)
+ for (i = 0; i < TOX_ADDRESS_SIZE; i++)
dprintf(idfd, "%02X", address[i]);
dprintf(idfd, "\n");
end: