[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kexi/3.1] src/migration/mdb/3rdparty/mdbtools/libmdb: Avoid dynamic array allocation on stack.
From: Jaroslaw Staniek <null () kde ! org>
Date: 2018-08-30 21:19:24
Message-ID: E1fvULc-0003tX-PW () code ! kde ! org
[Download RAW message or body]
Git commit 1bc284de58f0b0e60c47cbebae10a4e36ed9380b by Jaroslaw Staniek, on behalf of \
Nirgal Vourgère. Committed on 30/08/2018 at 20:52.
Pushed by staniek into branch '3.1'.
Avoid dynamic array allocation on stack.
This might help some non C99 compliant compilers, while being a trivial change.
FIXED-IN:3.1.1
mdbtools 9b4d5e624b4e16fd1097
M +2 -3 src/migration/mdb/3rdparty/mdbtools/libmdb/money.c
https://commits.kde.org/kexi/1bc284de58f0b0e60c47cbebae10a4e36ed9380b
diff --git a/src/migration/mdb/3rdparty/mdbtools/libmdb/money.c \
b/src/migration/mdb/3rdparty/mdbtools/libmdb/money.c index 0c8c91d61..5a75d97c7 \
100644
--- a/src/migration/mdb/3rdparty/mdbtools/libmdb/money.c
+++ b/src/migration/mdb/3rdparty/mdbtools/libmdb/money.c
@@ -42,8 +42,7 @@ static char *array_to_string(unsigned char *array, int unsigned \
scale, int neg);
*/
char *mdb_money_to_string(MdbHandle *mdb, int start)
{
-#define num_bytes 8
- int scale=4;
+ const int num_bytes=8, scale=4;
int i;
int neg=0;
unsigned char multiplier[MAX_NUMERIC_PRECISION], temp[MAX_NUMERIC_PRECISION];
@@ -82,7 +81,7 @@ char *mdb_money_to_string(MdbHandle *mdb, int start)
}
char *mdb_numeric_to_string(MdbHandle *mdb, int start, int prec, int scale) {
-#define num_bytes 16
+ const int num_bytes = 16;
int i;
int neg=0;
unsigned char multiplier[MAX_NUMERIC_PRECISION], temp[MAX_NUMERIC_PRECISION];
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic