ACR: Fix notation for pointer variables. 73/72773/3
authorDariusz Michaluk <d.michaluk@samsung.com>
Thu, 2 Jun 2016 10:26:03 +0000 (12:26 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Mon, 6 Jun 2016 10:34:57 +0000 (12:34 +0200)
Change-Id: I6060a5a0d632ad3d647059cd08efce65fed57f30

api/yaca/yaca_simple.h
examples/key_password.c
examples/misc.c
examples/misc.h
examples/sign.c
src/crypto.c
src/simple.c

index 00149af..352b138 100644 (file)
@@ -142,7 +142,7 @@ int yaca_decrypt(yaca_enc_algo_e algo,
                  const char *cipher,
                  size_t cipher_len,
                  char **plain,
-                 size_t * plain_len);
+                 size_t *plain_len);
 
 /**
  * @brief  Create a signature using asymmetric private key.
@@ -176,8 +176,8 @@ int yaca_sign(yaca_digest_algo_e algo,
               const yaca_key_h key,
               const char *data,
               size_t data_len,
-              char** signature,
-              size_tsignature_len);
+              char **signature,
+              size_t *signature_len);
 
 /**
  * @brief  Verify a signature using asymmetric public key.
@@ -211,7 +211,7 @@ int yaca_verify(yaca_digest_algo_e algo,
                 const yaca_key_h key,
                 const char *data,
                 size_t data_len,
-                const charsignature,
+                const char *signature,
                 size_t signature_len);
 
 /**
@@ -247,8 +247,8 @@ int yaca_hmac(yaca_digest_algo_e algo,
               const yaca_key_h key,
               const char *data,
               size_t data_len,
-              char** mac,
-              size_tmac_len);
+              char **mac,
+              size_t *mac_len);
 
 /**
  * @brief  Calculate a CMAC of given message using symmetric key.
@@ -283,8 +283,8 @@ int yaca_cmac(yaca_enc_algo_e algo,
               const yaca_key_h key,
               const char *data,
               size_t data_len,
-              char** mac,
-              size_tmac_len);
+              char **mac,
+              size_t *mac_len);
 
 /**@}*/
 
index 772aca3..133ee75 100644 (file)
@@ -76,7 +76,7 @@ exit:
        yaca_key_free(lkey);
 }
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
        int ret;
        yaca_key_h key = YACA_KEY_NULL;
index ad7bc40..04e30fd 100644 (file)
@@ -44,7 +44,7 @@ void dump_hex(const char *buf, size_t dump_size, const char *fmt, ...)
        BIO_dump_fp(stdout, buf, dump_size);
 }
 
-void debug_func(const charbuf)
+void debug_func(const char *buf)
 {
        puts(buf);
 }
index 6eaa12f..e59b382 100644 (file)
@@ -35,7 +35,7 @@ void dump_hex(const char *buf,
              size_t dump_size,
              const char *fmt, ...);
 
-void debug_func(const charbuf);
+void debug_func(const char *buf);
 
 int write_file(const char *path, char *data, size_t data_len);
 
index fe85a02..111f704 100644 (file)
@@ -36,7 +36,7 @@
 // Signature creation and verification using simple API
 void simple_sign_verify_asym(yaca_key_type_e type, const char *algo)
 {
-       charsignature = NULL;
+       char *signature = NULL;
        size_t signature_len;
 
        yaca_key_h prv = YACA_KEY_NULL;
@@ -167,7 +167,7 @@ exit:
 // Signature creation and verification using advanced API
 void sign_verify_asym(yaca_key_type_e type, const char *algo)
 {
-       charsignature = NULL;
+       char *signature = NULL;
        size_t signature_len;
 
        yaca_ctx_h ctx = YACA_CTX_NULL;
index 1011aec..57c7371 100644 (file)
@@ -37,7 +37,7 @@
 
 static pthread_mutex_t *mutexes = NULL;
 
-static void locking_callback(int mode, int type, const charfile, int line)
+static void locking_callback(int mode, int type, const char *file, int line)
 {
        /* Ignore NULL mutexes and lock/unlock error codes as we can't do anything
         * about them. */
index f759af3..e3196aa 100644 (file)
@@ -231,7 +231,7 @@ exit:
 }
 
 static int sign(const yaca_ctx_h ctx, const char *data, size_t data_len,
-                char** signature, size_t* signature_len)
+                char **signature, size_t *signature_len)
 {
        int ret;
 
@@ -263,8 +263,8 @@ API int yaca_sign(yaca_digest_algo_e algo,
                   const yaca_key_h key,
                   const char *data,
                   size_t data_len,
-                  char** signature,
-                  size_tsignature_len)
+                  char **signature,
+                  size_t *signature_len)
 {
        int ret;
        yaca_ctx_h ctx = YACA_CTX_NULL;
@@ -284,7 +284,7 @@ API int yaca_verify(yaca_digest_algo_e algo,
                     const yaca_key_h key,
                     const char *data,
                     size_t data_len,
-                    const charsignature,
+                    const char *signature,
                     size_t signature_len)
 {
        int ret;
@@ -310,8 +310,8 @@ API int yaca_hmac(yaca_digest_algo_e algo,
                   const yaca_key_h key,
                   const char *data,
                   size_t data_len,
-                  char** mac,
-                  size_tmac_len)
+                  char **mac,
+                  size_t *mac_len)
 {
        int ret;
        yaca_ctx_h ctx = YACA_CTX_NULL;
@@ -331,8 +331,8 @@ API int yaca_cmac(yaca_enc_algo_e algo,
                   const yaca_key_h key,
                   const char *data,
                   size_t data_len,
-                  char** mac,
-                  size_tmac_len)
+                  char **mac,
+                  size_t *mac_len)
 {
        int ret;
        yaca_ctx_h ctx = YACA_CTX_NULL;