use our 'assert' from "lib_internal/coreassert.h"
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 29 Oct 2005 09:26:23 +0000 (09:26 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 29 Oct 2005 09:26:23 +0000 (09:26 +0000)
use Vwrite() instead of write()

git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2206 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/testsuite/hashcalc.c

index 6accac8..1f74df0 100644 (file)
@@ -25,7 +25,9 @@
 #  include "../vhashify.c"
 #undef main
 
-int main(int argc, char *argv[])
+#include "lib_internal/coreassert.h"
+
+int main(int UNUSED argc, char *argv[])
 {
   int          fd = open(argv[1], O_NOFOLLOW|O_NONBLOCK|O_RDONLY|O_NOCTTY);
   struct stat  st;
@@ -47,8 +49,8 @@ int main(int argc, char *argv[])
   
   assert(calculateHashFromFD(fd, d_path, &st));
 
-  write(1, d_path, strlen(d_path));
-  write(1, "\n", 1);
+  Vwrite(1, d_path, strlen(d_path));
+  Vwrite(1, "\n", 1);
   
   hashFunctionContextFree(&global_info.hash_context);