]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/audit-type.h
Merge pull request #17549 from yuwata/tiny-fixes
[thirdparty/systemd.git] / src / journal / audit-type.h
index 603ad41cc7f865372bfacceee17c38ddbfbb389c..f2c489856c386f6fa142ea043c190bfd817cba89 100644 (file)
@@ -1,25 +1,9 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-/***
-  This file is part of systemd.
-
-  Copyright 2015 Zbigniew JÄ™drzejewski-Szmek
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
+#include <stdio.h>
 
+#include "alloc-util.h"
 #include "macro.h"
 
 const char *audit_type_to_string(int type);
@@ -31,7 +15,7 @@ int audit_type_from_string(const char *s);
                 const char *_s_;                                        \
                 _s_ = audit_type_to_string(type);                       \
                 if (!_s_) {                                             \
-                        _s_ = alloca(STRLEN("AUDIT") + DECIMAL_STR_MAX(int)); \
+                        _s_ = newa(char, STRLEN("AUDIT") + DECIMAL_STR_MAX(int)); \
                         sprintf((char*) _s_, "AUDIT%04i", type);        \
                 }                                                       \
                 _s_;                                                    \