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:
Björn Groenvall
1996-08-07 20:06:58 +00:00
parent 5c688469ad
commit c3abc6ba6f
3 changed files with 7 additions and 4 deletions

View File

@@ -9,7 +9,9 @@
#include <stdio.h>
#include <netdb.h>
static char *msg[] = {
static
const
char *const msg[] = {
"No error",
"Authoritative Answer Host not found",
"Non-Authoritive Host not found, or SERVERFAIL",
@@ -17,9 +19,10 @@ static char *msg[] = {
"Valid name, no data record of requested type"
};
const
char *hstrerror(int herr)
{
if(herr >= 0 && herr <= 4)
if (herr >= 0 && herr <= 4)
return msg[herr];
return "Error number out of range (hstrerror)";
}

View File

@@ -42,7 +42,7 @@ char *strerror(int eno);
#endif
#ifndef HAVE_HSTRERROR
char *hstrerror(int herr);
const char *hstrerror(int herr);
#endif
#ifndef HAVE_HERROR

View File

@@ -42,7 +42,7 @@ char *strerror(int eno);
#endif
#ifndef HAVE_HSTRERROR
char *hstrerror(int herr);
const char *hstrerror(int herr);
#endif
#ifndef HAVE_HERROR