summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-02-02 22:28:22 +0200
committermonty@mysql.com <>2005-02-02 22:28:22 +0200
commit8907374947957b30a6b3def9748a08351522e71b (patch)
treee3ffc7b0497ad6b2855155be6d7a9d691296c281 /extra
parent7213ca46add8cd1674c196851ef1073046ce03d5 (diff)
parente791e8644405fcc4de6993a945fc41b2a12b96f7 (diff)
downloadmariadb-git-8907374947957b30a6b3def9748a08351522e71b.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
Diffstat (limited to 'extra')
-rw-r--r--extra/perror.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/extra/perror.c b/extra/perror.c
index fc10d8eaecc..27027520cbe 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -213,12 +213,14 @@ int main(int argc,char *argv[])
string 'Unknown Error'. To avoid printing it we try to find the
error string by asking for an impossible big error message.
*/
- msg = strerror(10000);
+ msg= strerror(10000);
- /* allocate a buffer for unknown_error since strerror always returns the same pointer
- on some platforms such as Windows */
- unknown_error = malloc( strlen(msg)+1 );
- strcpy( unknown_error, msg );
+ /*
+ Allocate a buffer for unknown_error since strerror always returns
+ the same pointer on some platforms such as Windows
+ */
+ unknown_error= malloc(strlen(msg)+1);
+ strmov(unknown_error, msg);
for ( ; argc-- > 0 ; argv++)
{
@@ -271,7 +273,7 @@ int main(int argc,char *argv[])
/* if we allocated a buffer for unknown_error, free it now */
if (unknown_error)
- free(unknown_error);
+ free(unknown_error);
exit(error);
return error;