Added const to hstrerror.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@637 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -9,7 +9,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
||||||
static char *msg[] = {
|
static
|
||||||
|
const
|
||||||
|
char *const msg[] = {
|
||||||
"No error",
|
"No error",
|
||||||
"Authoritative Answer Host not found",
|
"Authoritative Answer Host not found",
|
||||||
"Non-Authoritive Host not found, or SERVERFAIL",
|
"Non-Authoritive Host not found, or SERVERFAIL",
|
||||||
@@ -17,9 +19,10 @@ static char *msg[] = {
|
|||||||
"Valid name, no data record of requested type"
|
"Valid name, no data record of requested type"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const
|
||||||
char *hstrerror(int herr)
|
char *hstrerror(int herr)
|
||||||
{
|
{
|
||||||
if(herr >= 0 && herr <= 4)
|
if (herr >= 0 && herr <= 4)
|
||||||
return msg[herr];
|
return msg[herr];
|
||||||
return "Error number out of range (hstrerror)";
|
return "Error number out of range (hstrerror)";
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,7 @@ char *strerror(int eno);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_HSTRERROR
|
#ifndef HAVE_HSTRERROR
|
||||||
char *hstrerror(int herr);
|
const char *hstrerror(int herr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_HERROR
|
#ifndef HAVE_HERROR
|
||||||
|
@@ -42,7 +42,7 @@ char *strerror(int eno);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_HSTRERROR
|
#ifndef HAVE_HSTRERROR
|
||||||
char *hstrerror(int herr);
|
const char *hstrerror(int herr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_HERROR
|
#ifndef HAVE_HERROR
|
||||||
|
Reference in New Issue
Block a user