expandlabel(): if empty node name is given return empty string instead of NULL
This commit is contained in:
parent
3e4f49dbea
commit
4f0377f1e9
|
|
@ -104,7 +104,7 @@ const char *expandlabel(const char *s, int *m)
|
||||||
if(parselabel_debug >= 3) fprintf(errfp, "expandlabel(): entering\n");
|
if(parselabel_debug >= 3) fprintf(errfp, "expandlabel(): entering\n");
|
||||||
if(!strpbrk(s, "*,.:")) { /* shortcut: nothing to parse / expand */
|
if(!strpbrk(s, "*,.:")) { /* shortcut: nothing to parse / expand */
|
||||||
*m = 1;
|
*m = 1;
|
||||||
my_strdup(_ALLOC_ID_, &dest_string.str, s);
|
my_strdup2(_ALLOC_ID_, &dest_string.str, s);
|
||||||
return dest_string.str;
|
return dest_string.str;
|
||||||
}
|
}
|
||||||
buf=yy_scan_string(s);
|
buf=yy_scan_string(s);
|
||||||
|
|
@ -134,7 +134,7 @@ const char *expandlabel(const char *s, int *m)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*m=-1;
|
*m=-1;
|
||||||
my_strdup(_ALLOC_ID_, &dest_string.str, s);
|
my_strdup2(_ALLOC_ID_, &dest_string.str, s);
|
||||||
}
|
}
|
||||||
return dest_string.str;
|
return dest_string.str;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue