mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: conf: Use long long when parsing
Commit 6381c89f8c
changed virConfValue to store long long
integers instead of long integers; however, the temporary variable
used in virConfParseLong() was not updated accordingly, causing
trouble for 32-bit machines.
This commit is contained in:
parent
fa0b00f94e
commit
ac3ba19135
@ -364,9 +364,9 @@ virConfSaveEntry(virBufferPtr buf, virConfEntryPtr cur)
|
|||||||
* Returns 0 in case of success and -1 in case of error
|
* Returns 0 in case of success and -1 in case of error
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
virConfParseLong(virConfParserCtxtPtr ctxt, long *val)
|
virConfParseLong(virConfParserCtxtPtr ctxt, long long *val)
|
||||||
{
|
{
|
||||||
long l = 0;
|
long long l = 0;
|
||||||
int neg = 0;
|
int neg = 0;
|
||||||
|
|
||||||
if (CUR == '-') {
|
if (CUR == '-') {
|
||||||
@ -476,7 +476,7 @@ virConfParseValue(virConfParserCtxtPtr ctxt)
|
|||||||
virConfValuePtr ret, lst = NULL, tmp, prev;
|
virConfValuePtr ret, lst = NULL, tmp, prev;
|
||||||
virConfType type = VIR_CONF_NONE;
|
virConfType type = VIR_CONF_NONE;
|
||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
long l = 0;
|
long long l = 0;
|
||||||
|
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
if (ctxt->cur >= ctxt->end) {
|
if (ctxt->cur >= ctxt->end) {
|
||||||
|
Loading…
Reference in New Issue
Block a user