aboutsummaryrefslogtreecommitdiff
path: root/read_config_file.c
diff options
context:
space:
mode:
authorJuan Cespedes <cespedes@debian.org>2007-08-31 18:49:48 +0200
committerJuan Cespedes <cespedes@debian.org>2007-08-31 18:49:48 +0200
commitaee093126654f722523b47848a0c5449e39cf4bb (patch)
tree30c8c62185406f4aab5c907f947e0a8d5af90055 /read_config_file.c
parent55ed83b24df9c6d671091a8c75caab33ffecd40e (diff)
downloadltrace-aee093126654f722523b47848a0c5449e39cf4bb.tar.gz
Some random fixes
* General: Small fixes (indentation, typos, clean-up of code) * ltrace.c: Close output file on exit * ltrace.c: use getenf("HOME") instead of getpwuid(geteuid())->pw_dir * read_config_file.c, display_args.c: remove "ignore" argtype; that's what "void" is for * packaging/debian/: misc fixes, sync with version 0.5-1 * etc/ltrace.conf: added more system calls * testsuite/ltrace.minor/trace-clone.c: sleep(1) to avoid earlier termination of process * sysdeps/linux-gnu/trace.c: trace_pid(): reverted Petr's patch to wait for child to stop, as it stopped following clone() * process_event.c: Disable breakpoints before doing fork() (again!), to make children work as expected
Diffstat (limited to 'read_config_file.c')
-rw-r--r--read_config_file.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/read_config_file.c b/read_config_file.c
index 3c7c971..6c42ca5 100644
--- a/read_config_file.c
+++ b/read_config_file.c
@@ -44,7 +44,6 @@ static struct list_of_pt_t {
"array", ARGTYPE_ARRAY}, {
"struct", ARGTYPE_STRUCT}, {
"enum", ARGTYPE_ENUM}, {
- "ignore", ARGTYPE_IGNORE}, {
NULL, ARGTYPE_UNKNOWN} /* Must finish with NULL */
};
@@ -71,7 +70,6 @@ static arg_type_info arg_type_prototypes[] = {
{ ARGTYPE_ARRAY },
{ ARGTYPE_ENUM },
{ ARGTYPE_STRUCT },
- { ARGTYPE_IGNORE },
{ ARGTYPE_POINTER },
{ ARGTYPE_UNKNOWN }
};
@@ -590,7 +588,7 @@ static struct function *process_line(char *buf)
eat_spaces(&str);
fun.return_info = parse_type(&str);
if (fun.return_info == NULL)
- return NULL;
+ return NULL;
if (fun.return_info->type == ARGTYPE_UNKNOWN) {
debug(3, " Skipping line %d", line_no);
return NULL;
@@ -661,13 +659,13 @@ void read_config_file(char *file)
char buf[1024];
filename = file;
-
- debug(1, "Reading config file `%s'...", filename);
-
stream = fopen(filename, "r");
if (!stream) {
return;
}
+
+ debug(1, "Reading config file `%s'...", filename);
+
line_no = 0;
while (fgets(buf, 1024, stream)) {
struct function *tmp;