commit | 9bbf6b98c42a212b8a4b1aa02975ac18bb612922 | [log] [tgz] |
---|---|---|
author | Denys Vlasenko <vda.linux@googlemail.com> | Mon Mar 04 03:04:38 2013 +0100 |
committer | Denys Vlasenko <vda.linux@googlemail.com> | Mon Mar 04 03:04:38 2013 +0100 |
tree | fbe79b8201355701e68171195398a8084fca9605 | |
parent | 93b51819cf42728654769462130c4b7d50e9b67a [diff] |
hostid: do not output sign-extended host id. Closes 6056 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 5c1a4e0..e5b1f51 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c
@@ -36,7 +36,8 @@ bb_show_usage(); } - printf("%08lx\n", gethostid()); + /* POSIX says gethostid returns a "32-bit identifier" */ + printf("%08x\n", (unsigned)(uint32_t)gethostid()); return fflush_all(); }