| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* Simplified ASN.1 notation parser |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. |
|---|
| 4 | 5 | * Written by David Howells (dhowells@redhat.com) |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public Licence |
|---|
| 8 | | - * as published by the Free Software Foundation; either version |
|---|
| 9 | | - * 2 of the Licence, or (at your option) any later version. |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | |
|---|
| 12 | 8 | #include <stdarg.h> |
|---|
| .. | .. |
|---|
| 413 | 409 | |
|---|
| 414 | 410 | /* Handle string tokens */ |
|---|
| 415 | 411 | if (isalpha(*p)) { |
|---|
| 416 | | - const char **dir, *start = p; |
|---|
| 412 | + const char **dir; |
|---|
| 417 | 413 | |
|---|
| 418 | 414 | /* Can be a directive, type name or element |
|---|
| 419 | 415 | * name. Find the end of the name. |
|---|
| .. | .. |
|---|
| 629 | 625 | p = strrchr(argv[1], '/'); |
|---|
| 630 | 626 | p = p ? p + 1 : argv[1]; |
|---|
| 631 | 627 | grammar_name = strdup(p); |
|---|
| 632 | | - if (!p) { |
|---|
| 628 | + if (!grammar_name) { |
|---|
| 633 | 629 | perror(NULL); |
|---|
| 634 | 630 | exit(1); |
|---|
| 635 | 631 | } |
|---|