Function 'yaml_parser_scan' is used to initilize and get
the next token. Call yaml_parser_scan() before using token.
Test-Parameters: trivial testlist=sanity-lnet
CoverityID: 403112 ("Uninitialized scalar variable")
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ieeb3d50a32690dc892a831fb60a9e85e4ec05113
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55330
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
* when we have all 3, create param=val and call the
* appropriate function for set/conf param
*/
- while (token.type != YAML_STREAM_END_TOKEN) {
+ do {
int i;
- yaml_token_delete(&token);
if (!yaml_parser_scan(&parser, &token)) {
rc = 1;
break;
device[0] = '\0';
free(buf);
}
- }
+ } while (token.type != YAML_STREAM_END_TOKEN);
yaml_parser_delete(&parser);
out_init: