Skip to content

Commit

Permalink
fix: unlink return when deleting shared object
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthonin Bonnefoy committed Feb 20, 2014
1 parent 404aae3 commit e4b3338
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/netmatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int netmatch_filter_ctor(struct netmatch_filter *netmatch, char const *libname)
}

netmatch->handle = lt_dlopen(libname);
if (! unlink(libname)) {
if (-1 == unlink(libname)) {
SLOG(LOG_INFO, "Could not delete shared object %s", libname);
}
if (! netmatch->handle) {
Expand Down
2 changes: 1 addition & 1 deletion src/nettrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static int nt_graph_ctor(struct nt_graph *graph, char const *name, char const *l
}

graph->lib = lt_dlopen(libname);
if (! unlink(libname)) {
if (-1 == unlink(libname)) {
SLOG(LOG_INFO, "Could not delete shared object %s", libname);
}
if (! graph->lib) {
Expand Down

0 comments on commit e4b3338

Please sign in to comment.