Move WRITE_INT to util-io.h, so other programs can use it too.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 3 Jan 2008 15:30:17 +0000 (15:30 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 3 Jan 2008 15:30:17 +0000 (15:30 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2650 94cd875c-1c1d-0410-91d2-eb244daf1a30

lib_internal/util-io.h
src/h2ext.c

index 4f364b8..1f8cbec 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <unistd.h>
 #include <string.h>
+#include "ensc_fmt/fmt.h"
 
 inline static void UNUSED
 Vwrite(int fd, char const *buf, size_t len)
@@ -34,6 +35,17 @@ writeStr(int fd, char const *cmd)
   Vwrite(fd, cmd, strlen(cmd));
 }
 
+inline static void UNUSED
+WRITE_INT(int fd, int num)
+{
+  char   buf[sizeof(num)*3+2];
+  size_t l;
+
+  l = utilvserver_fmt_long(buf,num);
+
+  Vwrite(fd, buf, l);
+}
+
 #define WRITE_MSG(FD,X)                Vwrite(FD,X,sizeof(X)-1)
 #define WRITE_STR(FD,X)                writeStr(FD,X)
 
index 50d3094..af1cc5a 100644 (file)
@@ -210,17 +210,6 @@ byteswap(void *p, size_t len)
   }
 }
 
-static inline ALWAYSINLINE void
-WRITE_INT(int fd, int num)
-{
-  char   buf[sizeof(num)*3+2];
-  size_t l;
-
-  l = utilvserver_fmt_long(buf,num);
-
-  Vwrite(fd, buf, l);
-}
-
 static int
 load_description(const char *file, file_format_t **head)
 {