(krb5_parse_name): const qualify
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10919 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997-2001 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997-2002 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -93,7 +93,7 @@ krb5_parse_name(krb5_context context,
|
|||||||
general_string realm;
|
general_string realm;
|
||||||
int ncomp;
|
int ncomp;
|
||||||
|
|
||||||
char *p;
|
const char *p;
|
||||||
char *q;
|
char *q;
|
||||||
char *s;
|
char *s;
|
||||||
char *start;
|
char *start;
|
||||||
@@ -104,7 +104,7 @@ krb5_parse_name(krb5_context context,
|
|||||||
|
|
||||||
/* count number of component */
|
/* count number of component */
|
||||||
ncomp = 1;
|
ncomp = 1;
|
||||||
for(p = (char*)name; *p; p++){
|
for(p = name; *p; p++){
|
||||||
if(*p=='\\'){
|
if(*p=='\\'){
|
||||||
if(!p[1]) {
|
if(!p[1]) {
|
||||||
krb5_set_error_string (context,
|
krb5_set_error_string (context,
|
||||||
@@ -122,7 +122,7 @@ krb5_parse_name(krb5_context context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
start = q = p = s = strdup(name);
|
p = start = q = s = strdup(name);
|
||||||
if (start == NULL) {
|
if (start == NULL) {
|
||||||
free (comp);
|
free (comp);
|
||||||
krb5_set_error_string (context, "malloc: out of memory");
|
krb5_set_error_string (context, "malloc: out of memory");
|
||||||
|
Reference in New Issue
Block a user