]> diplodocus.org Git - nmh/blobdiff - test/getcanon.c
Fix invalid pointer arithmetic.
[nmh] / test / getcanon.c
index ada6802a51f9b946d20d3c573e3d4082fc96cf39..3e75f32f2b311505aa000cda068152b6259b3014 100644 (file)
@@ -46,10 +46,10 @@ main(int argc, char *argv[])
   hints.ai_family = AF_UNSPEC;
 
   if (getaddrinfo(hostname, NULL, &hints, &res)) {
-    printf("%s\n", hostname);
+    puts(hostname);
     return 1;
   }
-  printf("%s\n", res->ai_canonname);
+  puts(res->ai_canonname);
 
   return 0;
 }