Fixed: [if-feature always negative if imported from another module](https://github.com/clicon/clixon/issues/429)

Apply styleguide to snmp patch
This commit is contained in:
Olof hagsand 2023-05-05 10:26:55 +02:00
parent fc967171f9
commit a0df12134a
4 changed files with 14 additions and 7 deletions

View file

@ -162,18 +162,19 @@ static const map_str2str yang_snmp_types[] = {
* @retval 1 - true(All subtypes are the same)
* @retval 0 - false
*/
int is_same_subtypes_union(yang_stmt *ytype, cbuf *cb)
int
is_same_subtypes_union(yang_stmt *ytype,
cbuf *cb)
{
int retval = 0;
yang_stmt *y_sub_type = NULL;
yang_stmt *y_resolved_type = NULL; /* resolved type */
char *resolved_type_str; /* resolved type */
char *type_str = NULL;
int options = 0;
cvec *cvv = NULL;
cvec *patterns = NULL;
uint8_t fraction_digits = 0;
int options = 0;
cvec *cvv = NULL;
cvec *patterns = NULL;
uint8_t fraction_digits = 0;
/* Loop over all sub-types in the resolved union type, note these are
* not resolved types (unless they are built-in, but the resolve call is
@ -200,7 +201,10 @@ int is_same_subtypes_union(yang_stmt *ytype, cbuf *cb)
}
return retval;
}
char* yang_type_to_snmp(yang_stmt *ytype, char* yang_type_str)
char*
yang_type_to_snmp(yang_stmt *ytype,
char* yang_type_str)
{
char* type_str = yang_type_str;
if (yang_type_str && strcmp(yang_type_str, "union") == 0){