Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Update version sscanf to match FreeBSD release info
Browse files Browse the repository at this point in the history
Release strings are of the form 9.1-RELEASE-p3 or 10.0-CURRENT.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184876 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
emaste committed Jun 25, 2013
1 parent bd5505c commit 1525e6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/Host/freebsd/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ Host::GetOSVersion(uint32_t &major,
if (uname(&un) < 0)
return false;

status = sscanf(un.release, "%u.%u-%u", &major, &minor, &update);
return status == 3;
status = sscanf(un.release, "%u.%u", &major, &minor);
update = UINT32_MAX;
return status == 2;
}

Error
Expand Down

0 comments on commit 1525e6a

Please sign in to comment.