Skip to content

Commit

Permalink
Move variable closer to where it's used
Browse files Browse the repository at this point in the history
  • Loading branch information
jackburton79 committed Feb 15, 2015
1 parent e46f4e5 commit 323cc01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ Configuration::LocalInventory() const
void
Configuration::_GenerateDeviceID()
{
std::string deviceID;
char buffer[64];
if (::gethostname(buffer, sizeof(buffer)) != 0)
throw errno;

std::string deviceID;
deviceID.append(buffer);
// TODO: PXE-booted machines can't have this saved anywhere.
// Either use the MAC address to generate this, or just keep it fixed.
Expand Down

0 comments on commit 323cc01

Please sign in to comment.