web: Create man page with groff rather than man2html.
[osl.git] / util.c
diff --git a/util.c b/util.c
index 49f1914e81e59a2648a9cb9af364ad1d98ac58cd..32f3402aae7cc95a62c48f3b15965a3de75e48f9 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2009 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -110,9 +110,11 @@ int write_file(const char *filename, const void *buf, size_t size)
        if (ret < 0)
                return ret;
        fd = ret;
-       ret = write_all(fd, buf, &size);
-       if (ret < 0)
-               goto out;
+       if (size != 0) {
+               ret = write_all(fd, buf, &size);
+               if (ret < 0)
+                       goto out;
+       }
        ret = 1;
 out:
        close(fd);