summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-09 09:00:17 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-09 09:00:17 -0300
commited9ffc6b09a13197f3aadaf89c1dd3accee2dfd1 (patch)
tree92777d90b1eaff5ab0cb99603ecd3c4abf18d145 /sql/partition_info.cc
parent4f59204b496f1e3fd97b85439d84089f47113630 (diff)
downloadmariadb-git-ed9ffc6b09a13197f3aadaf89c1dd3accee2dfd1.tar.gz
Bug#45288: pb2 returns a lot of compilation warnings on linux
Although the C standard mandates that sprintf return the number of bytes written, some very ancient systems (i.e. SunOS 4) returned a pointer to the buffer instead. Since these systems are not supported anymore and are hopefully long dead by now, simply remove the portability wrapper that dealt with this discrepancy. The autoconf check was causing trouble with GCC.
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 6e2f7dfad26..d85888e295c 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -103,8 +103,8 @@ char *partition_info::create_default_partition_names(uint part_no,
{
do
{
- my_sprintf(move_ptr, (move_ptr,"p%u", (start_no + i)));
- move_ptr+=MAX_PART_NAME_SIZE;
+ sprintf(move_ptr, "p%u", (start_no + i));
+ move_ptr+= MAX_PART_NAME_SIZE;
} while (++i < no_parts_arg);
}
else
@@ -135,7 +135,7 @@ char *partition_info::create_subpartition_name(uint subpart_no,
if (likely(ptr != NULL))
{
- my_sprintf(ptr, (ptr, "%ssp%u", part_name, subpart_no));
+ my_snprintf(ptr, size_alloc, "%ssp%u", part_name, subpart_no);
}
else
{