Skip to content

Commit

Permalink
Fixed Context::enable_probe method. (iovisor#2006)
Browse files Browse the repository at this point in the history
Fixed Context::enable_probe method so that it does not discard the result of Probe::enable.
  • Loading branch information
zilder authored and yonghong-song committed Oct 9, 2018
1 parent 4263e1a commit ec3fe90
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cc/usdt/usdt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,8 @@ bool Context::enable_probe(const std::string &probe_name,
}
}

if (found_probe != nullptr) {
found_probe->enable(fn_name);
return true;
}
if (found_probe != nullptr)
return found_probe->enable(fn_name);

return false;
}
Expand Down

0 comments on commit ec3fe90

Please sign in to comment.