diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-19 12:32:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-19 12:32:14 +0000 |
commit | 21190be21cef311e095488ee3193144ca86850cc (patch) | |
tree | e18f723f96acd497d6523b06bbec1bddcda733dc /ext/etc | |
parent | 3aacf8850001fa910edbefd48c7550daa1edcfe5 (diff) | |
download | ruby-21190be21cef311e095488ee3193144ca86850cc.tar.gz |
etc.c: fix parameter
* ext/etc/etc.c (etc_uname): call with same first parameters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc')
-rw-r--r-- | ext/etc/etc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c index 4b1ce35bb7..944b72217c 100644 --- a/ext/etc/etc.c +++ b/ext/etc/etc.c @@ -702,9 +702,10 @@ etc_uname(VALUE obj) rb_w32_conv_from_wchar(v.szCSDVersion, rb_utf8_encoding())); rb_hash_aset(result, ID2SYM(rb_intern("version")), version); - GetComputerNameExW(ComputerNameDnsFullyQualified, NULL, &len); +# define GET_COMPUTER_NAME(ptr, plen) GetComputerNameExW(ComputerNameDnsFullyQualified, ptr, len); + GET_COMPUTER_NAME(NULL, &len); buf = ALLOCV_N(WCHAR, vbuf, len); - if (GetComputerNameExW(ComputerNameDnsHostname, buf, &len)) { + if (GET_COMPUTER_NAME(buf, &len)) { nodename = rb_w32_conv_from_wchar(buf, rb_utf8_encoding()); } ALLOCV_END(vbuf); |