From e36e9c59ef010f1ecb7bc16e24f94977a680d5af Mon Sep 17 00:00:00 2001 From: Sam Smith Date: Thu, 25 Jan 2024 03:54:56 +0200 Subject: [PATCH] use unsigned char instead of uint8_t --- src/irc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/irc.c b/src/irc.c index fcf39ac..7991c48 100644 --- a/src/irc.c +++ b/src/irc.c @@ -323,8 +323,8 @@ int processPacket(struct client_data *client, char *source, char *command, int a parity = 2; } } - uint8_t *p, *q; - p = (uint8_t *)client->saslbuf; + unsigned char *p, *q; + p = (unsigned char *)client->saslbuf; for (size_t i = 0; i < client->saslbufLen; i++) { if (*p >= 'A' && *p <= 'Z') { *p += 0-'A'; @@ -341,14 +341,14 @@ int processPacket(struct client_data *client, char *source, char *command, int a } p++; } - p = q = (uint8_t *)client->saslbuf; + p = q = (unsigned char *)client->saslbuf; for (size_t i = 0; i < client->saslbufLen; i += 4) { *q++ = p[0]<<2 | p[1]>>4; *q++ = p[1]<<4 | p[2]>>2; *q++ = p[2]<<6 | p[3]; p += 4; } - client->saslbufLen = q-(uint8_t *)client->saslbuf - parity; + client->saslbufLen = q-(unsigned char *)client->saslbuf - parity; client->saslbuf[client->saslbufLen] = '\0'; char *username = strchr(client->saslbuf, '\0')+1; if (username > client->saslbuf + client->saslbufLen) -- 2.56.0