We have more modern replacements. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/libvirt_private.syms | 1 - src/util/virutil.c | 31 ------------------------------- src/util/virutil.h | 1 - 3 files changed, 33 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index d61c772d1a..72a378f21a 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3222,7 +3222,6 @@ virIsSUID; virMemoryLimitIsSet; virMemoryLimitTruncate; virMemoryMaxValue; -virParseNumber; virParseOwnershipIds; virParseVersionString; virScaleInteger; diff --git a/src/util/virutil.c b/src/util/virutil.c index c0acf59831..3f214629ac 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -278,37 +278,6 @@ virScaleInteger(unsigned long long *value, const char *suffix, } -/** - * virParseNumber: - * @str: pointer to the char pointer used - * - * Parse an unsigned number - * - * Returns the unsigned number or -1 in case of error. @str will be - * updated to skip the number. - */ -int -virParseNumber(const char **str) -{ - int ret = 0; - const char *cur = *str; - - if ((*cur < '0') || (*cur > '9')) - return -1; - - while (c_isdigit(*cur)) { - unsigned int c = *cur - '0'; - - if ((ret > INT_MAX / 10) || - ((ret == INT_MAX / 10) && (c > INT_MAX % 10))) - return -1; - ret = ret * 10 + c; - cur++; - } - *str = cur; - return ret; -} - /** * virParseVersionString: * @str: const char pointer to the version string diff --git a/src/util/virutil.h b/src/util/virutil.h index a80e28b670..e537cc36cb 100644 --- a/src/util/virutil.h +++ b/src/util/virutil.h @@ -54,7 +54,6 @@ int virScaleInteger(unsigned long long *value, const char *suffix, int virHexToBin(unsigned char c); -int virParseNumber(const char **str); int virParseVersionString(const char *str, unsigned long *version, bool allowMissing); -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list