diff options
author | unknown <wax@mysql.com> | 2005-02-08 18:51:42 +0500 |
---|---|---|
committer | unknown <wax@mysql.com> | 2005-02-08 18:51:42 +0500 |
commit | 30e89d0a48a7bf875b485f8b5987a5ef1bc4bf56 (patch) | |
tree | a0d98abfc1c068202b5a8081ba0c2ee7529e5171 /extra | |
parent | f6843329343199f2eb86573543b3292748b3cb41 (diff) | |
parent | a73256494e18fb189358125be055bfd89479f710 (diff) | |
download | mariadb-git-30e89d0a48a7bf875b485f8b5987a5ef1bc4bf56.tar.gz |
Merge mysql.com:/home/wax/mysql/mysql-4.1
into mysql.com:/home/wax/mysql/mysql-4.1test2
Diffstat (limited to 'extra')
-rw-r--r-- | extra/perror.c | 14 |
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; |