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

mlaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git


The following commit(s) were added to refs/heads/master by this push:
     new b509d72  cborattr.c: Fix uninitialized variable.
     new 14d0b42  Merge pull request #48 from mlaz/fixes
b509d72 is described below

commit b509d7267e29ce5ccf53b46def2964af66d8dbeb
Author: Miguel Azevedo <miguella...@gmail.com>
AuthorDate: Mon Nov 18 15:03:56 2019 +0000

    cborattr.c: Fix uninitialized variable.
---
 cborattr/src/cborattr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cborattr/src/cborattr.c b/cborattr/src/cborattr.c
index 68c18a8..662836a 100644
--- a/cborattr/src/cborattr.c
+++ b/cborattr/src/cborattr.c
@@ -157,7 +157,7 @@ cbor_internal_read_object(CborValue *root_value,
     void *lptr;
     CborValue cur_value;
     CborError err = 0;
-    size_t len;
+    size_t len = 0;
     CborType type = CborInvalidType;
 
     /* stuff fields with defaults in case they're omitted in the JSON input */
@@ -191,7 +191,6 @@ cbor_internal_read_object(CborValue *root_value,
         }
     }
 
-    
     if (cbor_value_is_map(root_value)) {
         err |= cbor_value_enter_container(root_value, &cur_value);
     } else {

Reply via email to