diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2020-10-09 14:29:20 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2020-12-10 13:28:07 +0200 |
commit | b589c11ab2bb1ec1a35ec116c01bfa767bb9efad (patch) | |
tree | 11ec6a8745273f5df9e54bb82c857a908ceba320 | |
parent | d811af03472c7b184df03c6ecff9040d9d554bbc (diff) | |
download | rpm-b589c11ab2bb1ec1a35ec116c01bfa767bb9efad.tar.gz |
Don't muck with parametric macro arguments of cli defines
When converting - to _ in cli-defined macro names, stop at first '('
as we have no business mucking with the arguments.
(cherry picked from commit b278517d7f016eb9680642a686416772cc9f291c)
-rw-r--r-- | lib/poptALL.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/poptALL.c b/lib/poptALL.c index eef8d8b05..936e37aec 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -80,7 +80,7 @@ static int cliDefine(const char *arg, int predefine) char *s, *t; /* XXX Convert '-' in macro name to underscore, skip leading %. */ s = t = xstrdup(arg); - while (*t && !risspace(*t)) { + while (*t && !risspace(*t) && (*t != '(')) { if (*t == '-') *t = '_'; t++; } |