aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/asn1_compiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/asn1_compiler.c')
-rw-r--r--scripts/asn1_compiler.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c
index adabd4145264..4c3f645065a4 100644
--- a/scripts/asn1_compiler.c
+++ b/scripts/asn1_compiler.c
@@ -567,8 +567,8 @@ int main(int argc, char **argv)
int fd;
kbuild_verbose = getenv("KBUILD_VERBOSE");
- if (kbuild_verbose)
- verbose_opt = atoi(kbuild_verbose);
+ if (kbuild_verbose && strchr(kbuild_verbose, '1'))
+ verbose_opt = true;
while (argc > 4) {
if (strcmp(argv[1], "-v") == 0)
@@ -625,7 +625,7 @@ int main(int argc, char **argv)
p = strrchr(argv[1], '/');
p = p ? p + 1 : argv[1];
grammar_name = strdup(p);
- if (!p) {
+ if (!grammar_name) {
perror(NULL);
exit(1);
}
@@ -832,7 +832,7 @@ static void parse(void)
static struct element *element_list;
-static struct element *alloc_elem(struct token *type)
+static struct element *alloc_elem(void)
{
struct element *e = calloc(1, sizeof(*e));
if (!e) {
@@ -860,7 +860,7 @@ static struct element *parse_type(struct token **_cursor, struct token *end,
char *p;
int labelled = 0, implicit = 0;
- top = element = alloc_elem(cursor);
+ top = element = alloc_elem();
element->class = ASN1_UNIV;
element->method = ASN1_PRIM;
element->tag = token_to_tag[cursor->token_type];
@@ -939,7 +939,7 @@ static struct element *parse_type(struct token **_cursor, struct token *end,
if (!implicit)
element->method |= ASN1_CONS;
element->compound = implicit ? TAG_OVERRIDE : SEQUENCE;
- element->children = alloc_elem(cursor);
+ element->children = alloc_elem();
element = element->children;
element->class = ASN1_UNIV;
element->method = ASN1_PRIM;