Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b2dd380b
Commit
b2dd380b
authored
Nov 03, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
take into accound end \0 in decimal_string_size
parent
9dfea75b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/decimal.h
include/decimal.h
+2
-2
No files found.
include/decimal.h
View file @
b2dd380b
...
@@ -70,10 +70,10 @@ int decimal_round(decimal *from, decimal *to, int new_scale, decimal_round_mode
...
@@ -70,10 +70,10 @@ int decimal_round(decimal *from, decimal *to, int new_scale, decimal_round_mode
/*
/*
returns the length of the buffer to hold string representation
returns the length of the buffer to hold string representation
of the decimal
of the decimal
(including decimal dot, possible sign and \0)
*/
*/
#define decimal_string_size(dec) ((dec)->intg + (dec)->frac + ((dec)->frac > 0) +
1
)
#define decimal_string_size(dec) ((dec)->intg + (dec)->frac + ((dec)->frac > 0) +
2
)
/* negate a decimal */
/* negate a decimal */
#define decimal_neg(dec) do { (dec)->sign^=1; } while(0)
#define decimal_neg(dec) do { (dec)->sign^=1; } while(0)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment