Rename getline function to unsafe, to make it greppable.
Now i can trim them one-by-one.
This commit is contained in:
@ -189,7 +189,7 @@ char *get_dpi_dir(char *dpidrc)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
while ((rcline = dGetline(In)) != NULL) {
|
||||
while ((rcline = dGetline_unsafe(In)) != NULL) {
|
||||
if (strncmp(rcline, "dpi_dir", 7) == 0)
|
||||
break;
|
||||
dFree(rcline);
|
||||
@ -497,7 +497,7 @@ int fill_services_list(struct dp *attlist, int numdpis, Dlist **services_list)
|
||||
*services_list = dList_new(8);
|
||||
|
||||
/* dpidrc parser loop */
|
||||
for (;(line = dGetline(dpidrc_stream)) != NULL; dFree(line)) {
|
||||
for (;(line = dGetline_unsafe(dpidrc_stream)) != NULL; dFree(line)) {
|
||||
st = dParser_parse_rc_line(&line, &service, &path);
|
||||
if (st < 0) {
|
||||
MSG_ERR("dpid: Syntax error in %s: service=\"%s\" path=\"%s\"\n",
|
||||
|
Reference in New Issue
Block a user