readlink: Reduce size by calling _fwrite() instead of puts()
We know how long the output is, so we might as well call _fwrite()
directly, with the explicit termination set to \n instead of \0.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c
index bf9501b..4e3cfcb 100644
--- a/usr/utils/readlink.c
+++ b/usr/utils/readlink.c
@@ -29,8 +29,8 @@
perror(name);
exit(1);
}
- link_name[rv] = '\0';
- puts(link_name);
+ link_name[rv] = '\n';
+ _fwrite(link_name, rv+1, stdout);
}
return 0;