Change unformat_init_string API in doc to match code 46/30846/2
authorhemant_mnkcg <hemant@mnkcg.com>
Tue, 19 Jan 2021 19:20:04 +0000 (14:20 -0500)
committerDave Wallace <dwallacelf@gmail.com>
Wed, 27 Jan 2021 20:43:29 +0000 (20:43 +0000)
Signed-off-by: hemant_mnkcg <hemant@mnkcg.com>
Change-Id: I4ec487054f928d52fe06d530df095b30edf66ae5

docs/gettingstarted/developers/infrastructure.md

index cae34fc..a61068c 100644 (file)
@@ -438,8 +438,9 @@ follows:
 
 ```c
     unformat_input_t input;
+    u8 *s = "<some-C-string>";
 
-    unformat_init_string (&input, "<some-C-string>");
+    unformat_init_string (&input, (char *) s, strlen((char *) s));
     /* or */
     unformat_init_vector (&input, <u8-vector>);
 ```