Skip to content

Commit

Permalink
Merge branch '1.0.x' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Aug 9, 2016
2 parents b34281a + eb2493b commit 682575f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion reprozip/native/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int log_open_file(const char *filename)
if(logfile == NULL)
{
log_critical(0, "couldn't open log file: %s", strerror(errno));
return 1;
return -1;
}
return 0;
}
Expand Down
10 changes: 5 additions & 5 deletions reprozip/native/pytracer.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ static PyObject *pytracer_execute(PyObject *self, PyObject *args)
size_t argv_len;
int verbosity;
PyObject *py_binary, *py_argv, *py_databasepath;
if(!(PyArg_ParseTuple(args, "OO!Oi",
&py_binary,
&PyList_Type, &py_argv,
&py_databasepath,
&verbosity)))
if(!PyArg_ParseTuple(args, "OO!Oi",
&py_binary,
&PyList_Type, &py_argv,
&py_databasepath,
&verbosity))
return NULL;

if(verbosity < 0)
Expand Down
12 changes: 9 additions & 3 deletions reprozip/native/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ static int syscall_readlink(const char *name, struct Process *process,
char *pathname = abs_path_arg(process, 0);
if(db_add_file_open(process->identifier,
pathname,
FILE_STAT,
FILE_STAT | FILE_LINK,
0) != 0)
return -1;
free(pathname);
Expand Down Expand Up @@ -409,12 +409,18 @@ static int record_shebangs(struct Process *process, const char *exec_target)
if(*start != '/')
{
char *pathname = abspath(wd, start);
if(db_add_file_open(process->identifier, pathname, FILE_READ, 0) != 0)
if(db_add_file_open(process->identifier,
pathname,
FILE_READ,
0) != 0)
return -1;
free(pathname);
}
else
if(db_add_file_open(process->identifier, start, FILE_READ, 0) != 0)
if(db_add_file_open(process->identifier,
start,
FILE_READ,
0) != 0)
return -1;
exec_target = strcpy(target_buffer, start);
}
Expand Down
1 change: 1 addition & 0 deletions reprozip/native/tracer.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ int trace_add_files_from_proc(unsigned int process, pid_t tid,
log_info(tid, "parsing %s", procfile);
#endif
fp = fopen(procfile, "r");
free(procfile);

while((line = read_line(line, &length, fp)) != NULL)
{
Expand Down

0 comments on commit 682575f

Please sign in to comment.