You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by gi...@apache.org on 2019/06/29 20:56:30 UTC

[incubator-milagro-crypto-c] branch sonar_review updated: modified: src/oct.c

This is an automated email from the ASF dual-hosted git repository.

giorgio pushed a commit to branch sonar_review
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-crypto-c.git


The following commit(s) were added to refs/heads/sonar_review by this push:
     new 8a61d04  	modified:   src/oct.c
8a61d04 is described below

commit 8a61d04668d5d9bad7a1febf68efa71fd27d5346
Author: Giorgio Zoppi <gi...@gmail.com>
AuthorDate: Sat Jun 29 22:55:04 2019 +0200

    	modified:   src/oct.c
---
 src/oct.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/oct.c b/src/oct.c
index e85f179..90ec6e6 100644
--- a/src/oct.c
+++ b/src/oct.c
@@ -27,17 +27,21 @@ static const char table_hex[] = { '0', '1', '2',
   '7', '8', '9',
   'a', 'b', 'c', 'd', 'e', 'f'
 };
-
+/**
+* @brief Nibble format used for octect conversion */
 typedef union nibbles
 {
   struct
   {
-    unsigned char first:4;
-    unsigned char second:4;
+    unsigned char first:4; /**< 4 bit of a byte */
+    unsigned char second:4; /**< 4 bit of a byte */
   } nibble_value;
-  unsigned char value;
+  unsigned char value; /**< unsigned byte to split */
 } byte_t;
 
+/**
+ * @brief Function that split a byte and convert to hex string using *        lookup table.
+ */
 static void
 uchar2hex (unsigned char c, char *dst, int idx)
 {