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
3066e117
Commit
3066e117
authored
Feb 01, 2005
by
reggie@bob.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bob.(none):/home/reggie/bk/mysql41
into bob.(none):/home/reggie/bk/mysql5.0
parents
6c272a5a
a5bd37e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
extra/perror.c
extra/perror.c
+12
-1
No files found.
extra/perror.c
View file @
3066e117
...
...
@@ -189,6 +189,7 @@ int main(int argc,char *argv[])
{
int
error
,
code
,
found
;
const
char
*
msg
;
char
*
unknown_error
=
0
;
MY_INIT
(
argv
[
0
]);
if
(
get_options
(
&
argc
,
&
argv
))
...
...
@@ -217,7 +218,12 @@ 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.
*/
const
char
*
unknown_error
=
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
);
for
(
;
argc
--
>
0
;
argv
++
)
{
...
...
@@ -267,6 +273,11 @@ int main(int argc,char *argv[])
}
}
}
/* if we allocated a buffer for unknown_error, free it now */
if
(
unknown_error
)
free
(
unknown_error
);
exit
(
error
);
return
error
;
}
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