chiark / gitweb /
fileio: imply /tmp as directory if passed as NULL to open_tmpfile_unlinkable()
[elogind.git] / src / basic / string-util.c
index 6f4593e6b41259e1070cb4627acfe04a75d514fa..293a15f9c041cf59f5354829cfdc86b0b0622a20 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 /***
   This file is part of systemd.
 
 /***
   This file is part of systemd.
 
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
 #include "alloc-util.h"
 #include "gunicode.h"
 #include "alloc-util.h"
 #include "gunicode.h"
+#include "macro.h"
 #include "string-util.h"
 #include "utf8.h"
 #include "util.h"
 #include "string-util.h"
 #include "utf8.h"
 #include "util.h"
@@ -472,7 +477,7 @@ char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigne
         }
 
         if (k > x) /* last character was wide and went over quota */
         }
 
         if (k > x) /* last character was wide and went over quota */
-                x ++;
+                x++;
 
         for (j = s + old_length; k < new_length && j > i; ) {
                 char32_t c;
 
         for (j = s + old_length; k < new_length && j > i; ) {
                 char32_t c;