]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/journal-qrcode.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / journal / journal-qrcode.c
index 257ddb302b774bc1abddfe08dc31349f32af43f3..46ff1ce05321027fa78f74d4a575f48e28d88529 100644 (file)
@@ -1,5 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -19,7 +18,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <assert.h>
 #include <errno.h>
 #include <qrencode.h>
 #include <stdbool.h>
@@ -27,6 +25,7 @@
 #include <stdlib.h>
 
 #include "journal-qrcode.h"
+#include "macro.h"
 
 #define WHITE_ON_BLACK "\033[40;37;1m"
 #define NORMAL "\033[0m"
@@ -67,11 +66,11 @@ int print_qr_code(
         if (!f)
                 return -ENOMEM;
 
-        fputs("fss://", f);
+        fputs_unlocked("fss://", f);
 
         for (i = 0; i < seed_size; i++) {
                 if (i > 0 && i % 3 == 0)
-                        fputc('-', f);
+                        fputc_unlocked('-', f);
                 fprintf(f, "%02x", ((uint8_t*) seed)[i]);
         }