diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2017-04-20 03:40:44 +0300 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2017-04-20 16:22:55 +0200 |
commit | fa5f6835e00c4927cae051328642b2a5a0d8b1c1 (patch) | |
tree | 3f32032a6214781b6ee266e9d6bf2976e06949ed /libacl | |
parent | 33f01b5d5bd98fceee0ba46cdbddb60b36fc650e (diff) | |
download | acl-fa5f6835e00c4927cae051328642b2a5a0d8b1c1.tar.gz |
libacl: Fix acl_from_text() returning NULL on all input
Commit 5dac69ce914202c587f00da638123403111ca673 introduced a regression:
apparently, gcc treats
#pragma GCC diagnostic pop
as a kind of statement, so this causes parse_acl_entry()
to return -1 unconditionally, and therefore causes acl_from_text()
to return NULL unconditionally, too.
Fix this by moving the pragma after the "if" statement.
Reported-by: Valery Inozemtsev <shrek@altlinux.org>
Diffstat (limited to 'libacl')
-rw-r--r-- | libacl/acl_from_text.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libacl/acl_from_text.c b/libacl/acl_from_text.c index bb2ab04..09790c9 100644 --- a/libacl/acl_from_text.c +++ b/libacl/acl_from_text.c @@ -307,8 +307,8 @@ create_entry: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Waddress" if (acl_copy_entry(entry_d, int2ext(&entry_obj)) != 0) -#pragma GCC diagnostic pop return -1; +#pragma GCC diagnostic pop return 0; fail: |