]> PatchyGit - patchyircd.git/commitdiff
use unsigned char instead of uint8_t
authorSam Smith <sam@patchysicp.xyz>
Thu, 25 Jan 2024 01:54:56 +0000 (03:54 +0200)
committerEgor <egor@patchysicp.xyz>
Thu, 25 Jan 2024 01:54:56 +0000 (03:54 +0200)
src/irc.c

index fcf39ac..7991c48 100644 (file)
--- 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)