diff options
Diffstat (limited to 'package/network/utils/nftables/patches/202-datatype-use-mpz_set_str-instead-of-gmp_sscanf.patch')
-rw-r--r-- | package/network/utils/nftables/patches/202-datatype-use-mpz_set_str-instead-of-gmp_sscanf.patch | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/package/network/utils/nftables/patches/202-datatype-use-mpz_set_str-instead-of-gmp_sscanf.patch b/package/network/utils/nftables/patches/202-datatype-use-mpz_set_str-instead-of-gmp_sscanf.patch deleted file mode 100644 index 4b22ec26e5..0000000000 --- a/package/network/utils/nftables/patches/202-datatype-use-mpz_set_str-instead-of-gmp_sscanf.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 23e8958a5e539f682be4cbdf5196aa2014c7e295 Mon Sep 17 00:00:00 2001 -From: Steven Barth <cyrus@openwrt.org> -Date: Mon, 15 Dec 2014 14:09:27 +0100 -Subject: [PATCH 2/5] datatype: use mpz_set_str instead of gmp_sscanf - -This simplifies the integer parsing logic and restricts it to -functions being part of the mini-gmp subset. - -Signed-off-by: Steven Barth <cyrus@openwrt.org> ---- - src/datatype.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - ---- a/src/datatype.c -+++ b/src/datatype.c -@@ -275,11 +275,9 @@ static struct error_record *integer_type - struct expr **res) - { - mpz_t v; -- int len; - - mpz_init(v); -- if (gmp_sscanf(sym->identifier, "%Zu%n", v, &len) != 1 || -- (int)strlen(sym->identifier) != len) { -+ if (mpz_set_str(v, sym->identifier, 0)) { - mpz_clear(v); - return error(&sym->location, "Could not parse %s", - sym->dtype->desc); |