]> git.tuebingen.mpg.de Git - adu.git/blobdiff - format.c
print_complete_help_and_die() does not return.
[adu.git] / format.c
index 37bb087ba02fff7f472d14b0739e715626263c26..e8a9a28617656700fda8352ec82bd1fb2517e144 100644 (file)
--- a/format.c
+++ b/format.c
@@ -4,7 +4,7 @@
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
-/** \file format.c Functions for pretty-printing numbers and strings. */
+/** \file format.c \brief Functions for pretty-printing numbers and strings. */
 
 #include <dirent.h> /* readdir() */
 #include "adu.h"
@@ -14,6 +14,7 @@
 #include "error.h"
 #include "format.h"
 
+/** The three different alignment types. */
 enum alignment {ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER};
 
 struct num_format {
@@ -457,5 +458,7 @@ char *format_items(struct format_info *info, union atom_value *values)
                buf = adu_strcat(buf, val);
                free(val);
        }
+       if (!buf)
+               buf = adu_strdup("");
        return buf;
 }