[PATCH] Fix var declaration according scanf specification,

Started by Ranier Vilelaabout 6 years ago1 messages
#1Ranier Vilela
ranier_gyn@hotmail.com
1 attachment(s)

Hi,
According to specification of scanf: %x argument must be unsigned.
http://www.cplusplus.com/reference/cstdio/scanf/
I think that sscanf must follow scanf specification.

Best regards.
Ranier Vilela

--- \dll\postgresql\a\backend\utils\adt\mac.c	2019-11-23 13:19:20.000000000 -0300
+++ mac.c	2019-11-24 09:49:01.737639100 -0300
@@ -57,7 +57,7 @@
 {
 	char	   *str = PG_GETARG_CSTRING(0);
 	macaddr    *result;
-	int			a,
+	unsigned int a,
 				b,
 				c,
 				d,

Attachments:

mac.c.patchapplication/octet-stream; name=mac.c.patchDownload
--- \dll\postgresql\a\backend\utils\adt\mac.c	2019-11-23 13:19:20.000000000 -0300
+++ mac.c	2019-11-24 09:49:01.737639100 -0300
@@ -57,7 +57,7 @@
 {
 	char	   *str = PG_GETARG_CSTRING(0);
 	macaddr    *result;
-	int			a,
+	unsigned int a,
 				b,
 				c,
 				d,