summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/util.cc b/src/util.cc
index a215dd2..fa72dd2 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -359,9 +359,8 @@ string ElideMiddle(const string& str, size_t width) {
bool Truncate(const string& path, size_t size, string* err) {
#ifdef _WIN32
- int fh;
- fh = _sopen(path.c_str(), _O_RDWR | _O_CREAT, _SH_DENYNO,
- _S_IREAD | _S_IWRITE);
+ int fh = _sopen(path.c_str(), _O_RDWR | _O_CREAT, _SH_DENYNO,
+ _S_IREAD | _S_IWRITE);
int success = _chsize(fh, size);
_close(fh);
#else