[machineid] Drop trailing \n, toInt() doesn't like it
This commit is contained in:
parent
9e359c98a9
commit
642dbf449c
@ -81,6 +81,10 @@ getUrandomPoolSize()
|
||||
QByteArray v = f.read( 16 );
|
||||
if ( v.length() > 2 )
|
||||
{
|
||||
if ( v.endsWith( '\n' ) )
|
||||
{
|
||||
v.chop(1);
|
||||
}
|
||||
bool ok = false;
|
||||
poolSize = v.toInt( &ok );
|
||||
if ( !ok )
|
||||
@ -89,7 +93,7 @@ getUrandomPoolSize()
|
||||
}
|
||||
}
|
||||
}
|
||||
return poolSize >= minimumPoolSize ? poolSize : minimumPoolSize;
|
||||
return (poolSize >= minimumPoolSize) ? poolSize : minimumPoolSize;
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
Loading…
Reference in New Issue
Block a user