projects
/
platform
/
upstream
/
glog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c28a49
)
Initializes the length of machine name properly.
author
<shinichiro.hamaji@gmail.com>
<>
Wed, 29 Jul 2009 07:34:28 +0000
(07:34 +0000)
committer
<shinichiro.hamaji@gmail.com>
<>
Wed, 29 Jul 2009 07:34:28 +0000
(07:34 +0000)
This fix was suggested at (thanks!)
http://code.google.com/p/google-glog/issues/detail?id=9
git-svn-id: https://google-glog.googlecode.com/svn/trunk@62
eb4d4688
-79bd-11dd-afb4-
1d65580434c0
src/logging.cc
patch
|
blob
|
history
diff --git
a/src/logging.cc
b/src/logging.cc
index 25e9a867f7da6991dfa10b90980b583e61a6b6a9..1c39c35a1dee73951e7fbd22ff99be9302566b9a 100644
(file)
--- a/
src/logging.cc
+++ b/
src/logging.cc
@@
-177,8
+177,8
@@
static void GetHostName(string* hostname) {
}
*hostname = buf.nodename;
#elif defined(OS_WINDOWS)
- char buf[
256
];
- DWORD len;
+ char buf[
MAX_COMPUTERNAME_LENGTH + 1
];
+ DWORD len
= MAX_COMPUTERNAME_LENGTH + 1
;
if (GetComputerNameA(buf, &len)) {
*hostname = buf;
} else {