]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9899 fix use of non-standard u_char/u_int types
authorHoward Chu <hyc@openldap.org>
Wed, 26 Oct 2022 15:33:30 +0000 (16:33 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 1 Nov 2022 16:58:58 +0000 (16:58 +0000)
contrib/slapd-modules/passwd/totp/slapd-totp.c
libraries/liblutil/base64.c
libraries/liblutil/sha1.c

index 25081e1ef6b23b002335443a932ad62bce6a9682..08bd4eb8c8263f570e36d6c03f98008a285e9154 100644 (file)
@@ -133,15 +133,15 @@ static const char Pad32 = '=';
 
 static int
 totp_b32_ntop(
-       u_char const *src,
+       unsigned char const *src,
        size_t srclength,
        char *target,
        size_t targsize)
 {
        size_t datalength = 0;
-       u_char input0;
-       u_int input1;   /* assumed to be at least 32 bits */
-       u_char output[8];
+       unsigned char input0;
+       unsigned int input1;    /* assumed to be at least 32 bits */
+       unsigned char output[8];
        int i;
 
        while (4 < srclength) {
@@ -204,7 +204,7 @@ totp_b32_ntop(
 static int
 totp_b32_pton(
        char const *src,
-       u_char *target, 
+       unsigned char *target, 
        size_t targsize)
 {
        int tarindex, state, ch;
index 9c3e258eb30cff8c2e9a008198bfcfae0de82d60..3a148f0e365b3d1f2928c9596f2f46c3f6114a79 100644 (file)
@@ -116,14 +116,14 @@ static const char Pad64 = '=';
 
 int
 lutil_b64_ntop(
-       u_char const *src,
+       unsigned char const *src,
        size_t srclength,
        char *target,
        size_t targsize)
 {
        size_t datalength = 0;
-       u_char input[3];
-       u_char output[4];
+       unsigned char input[3];
+       unsigned char output[4];
        size_t i;
 
        while (2 < srclength) {
@@ -188,7 +188,7 @@ lutil_b64_ntop(
 int
 lutil_b64_pton(
        char const *src,
-       u_char *target, 
+       unsigned char *target,
        size_t targsize)
 {
        int tarindex, state, ch;
index 08093d7fada65fc74353ff756e5dbc25073b430e..de71244ea03cd2609bee689559d0e81e1ea0714d 100644 (file)
@@ -156,7 +156,7 @@ lutil_SHA1Update(
     uint32             len
 )
 {
-    u_int i, j;
+    unsigned int i, j;
 
     j = context->count[0];
     if ((context->count[0] += len << 3) < j)
@@ -181,7 +181,7 @@ lutil_SHA1Update(
 void
 lutil_SHA1Final( unsigned char *digest, lutil_SHA1_CTX *context )
 {
-    u_int i;
+    unsigned int i;
     unsigned char finalcount[8];
 
     for (i = 0; i < 8; i++) {