summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-09 09:28:51 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-09 09:28:51 -0300
commit1c924a165259dc8ffb9c1cdcdb1f0d43876bcb20 (patch)
tree8edee282fc8a225a291cd9be2e44e38709e31b1a /sql-common
parent024dba64b64f395151f6b95650e8ee69a1591428 (diff)
parent11fae04527098cb6c266eae41188504bd22a5b52 (diff)
downloadmariadb-git-1c924a165259dc8ffb9c1cdcdb1f0d43876bcb20.tar.gz
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/my_time.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 0a09e945022..ac6c2ace890 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -1024,30 +1024,21 @@ void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type)
int my_time_to_str(const MYSQL_TIME *l_time, char *to)
{
uint extra_hours= 0;
- return my_sprintf(to, (to, "%s%02u:%02u:%02u",
- (l_time->neg ? "-" : ""),
- extra_hours+ l_time->hour,
- l_time->minute,
- l_time->second));
+ return sprintf(to, "%s%02u:%02u:%02u", (l_time->neg ? "-" : ""),
+ extra_hours+ l_time->hour, l_time->minute, l_time->second);
}
int my_date_to_str(const MYSQL_TIME *l_time, char *to)
{
- return my_sprintf(to, (to, "%04u-%02u-%02u",
- l_time->year,
- l_time->month,
- l_time->day));
+ return sprintf(to, "%04u-%02u-%02u",
+ l_time->year, l_time->month, l_time->day);
}
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to)
{
- return my_sprintf(to, (to, "%04u-%02u-%02u %02u:%02u:%02u",
- l_time->year,
- l_time->month,
- l_time->day,
- l_time->hour,
- l_time->minute,
- l_time->second));
+ return sprintf(to, "%04u-%02u-%02u %02u:%02u:%02u",
+ l_time->year, l_time->month, l_time->day,
+ l_time->hour, l_time->minute, l_time->second);
}