apparmor: use the condition in AA_BUG_FMT even with debug disabled
authorMateusz Guzik <mjguzik@gmail.com>
Mon, 27 Jan 2025 20:54:04 +0000 (21:54 +0100)
committerJohn Johansen <john.johansen@canonical.com>
Mon, 10 Feb 2025 19:17:59 +0000 (11:17 -0800)
commit67e370aa7f968f6a4f3573ed61a77b36d1b26475
treebe3ee4e0389eccbd147455edec814b1877ba0153
parentaabbe6f908d8264cd8aeeef8141665f71668ef36
apparmor: use the condition in AA_BUG_FMT even with debug disabled

This follows the established practice and fixes a build failure for me:
security/apparmor/file.c: In function ‘__file_sock_perm’:
security/apparmor/file.c:544:24: error: unused variable ‘sock’ [-Werror=unused-variable]
  544 |         struct socket *sock = (struct socket *) file->private_data;
      |                        ^~~~

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/include/lib.h