Commit ecbb8ff3 authored by Lev Walkin's avatar Lev Walkin

add const

parent 7e5ea1d0
......@@ -40,7 +40,7 @@ asn1p_ref_free(asn1p_ref_t *ref) {
}
static enum asn1p_ref_lex_type_e
asn1p_ref_name2lextype(char *name) {
asn1p_ref_name2lextype(const char *name) {
enum asn1p_ref_lex_type_e lex_type;
int has_lowercase = 0;
......@@ -51,7 +51,7 @@ asn1p_ref_name2lextype(char *name) {
lex_type = RLT_Amplowercase;
}
} else if(*name >= 'A' && *name <= 'Z') {
char *p;
const char *p;
for(p = name; *p; p++) {
if(*p >= 'a' && *p <= 'z') {
......@@ -78,7 +78,7 @@ asn1p_ref_name2lextype(char *name) {
}
int
asn1p_ref_add_component(asn1p_ref_t *ref, char *name, enum asn1p_ref_lex_type_e lex_type) {
asn1p_ref_add_component(asn1p_ref_t *ref, const char *name, enum asn1p_ref_lex_type_e lex_type) {
if(!ref || !name
|| (int)lex_type < RLT_UNKNOWN || lex_type >= RLT_MAX) {
......
......@@ -58,6 +58,6 @@ asn1p_ref_t *asn1p_ref_clone(asn1p_ref_t *ref);
* -1/ENOMEM: Memory allocation failed
*/
int asn1p_ref_add_component(asn1p_ref_t *,
char *name, enum asn1p_ref_lex_type_e);
const char *name, enum asn1p_ref_lex_type_e);
#endif /* ASN1_PARSER_REFERENCE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment