From 97841dad2ba5a79acb0b22db9a01ae45f7b2e80b Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 Dec 2014 17:18:11 +0300 Subject: file: Use 'long' to represent the parsed LOCK TIMEOUT value Convert the StringToInt helper into a StringToLong helper with a 'long' result type. This will make the helper more useful to other callers that want to use strtol. While at it, also check errno after calling strtol in case the conversion fails with a range error. --- Source/cmFileLockWin32.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/cmFileLockWin32.cxx') diff --git a/Source/cmFileLockWin32.cxx b/Source/cmFileLockWin32.cxx index 17231eaa92..469168985f 100644 --- a/Source/cmFileLockWin32.cxx +++ b/Source/cmFileLockWin32.cxx @@ -86,7 +86,7 @@ cmFileLockResult cmFileLock::LockWithoutTimeout() } } -cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds) +cmFileLockResult cmFileLock::LockWithTimeout(unsigned long seconds) { const DWORD flags = LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY; while (true) -- cgit v1.2.1