Skip to content

Commit

Permalink
trace, argdist: Fix code formatting nits
Browse files Browse the repository at this point in the history
  • Loading branch information
goldshtn committed Jan 17, 2017
1 parent b630092 commit dcf1675
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/argdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def _generate_streq_function(self, string):
char needle[] = %s;
char haystack[sizeof(needle)];
bpf_probe_read(&haystack, sizeof(haystack), (void *)str);
for (int i = 0; i < sizeof(needle)-1; ++i) {
for (int i = 0; i < sizeof(needle) - 1; ++i) {
if (needle[i] != haystack[i]) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions tools/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _generate_streq_function(self, string):
char needle[] = %s;
char haystack[sizeof(needle)];
bpf_probe_read(&haystack, sizeof(haystack), (void *)str);
for (int i = 0; i < sizeof(needle)-1; ++i) {
for (int i = 0; i < sizeof(needle) - 1; ++i) {
if (needle[i] != haystack[i]) {
return false;
}
Expand Down Expand Up @@ -362,7 +362,7 @@ def _generate_usdt_filter_read(self):
continue
arg_index = int(arg.replace("arg", ""))
arg_ctype = self.usdt.get_probe_arg_ctype(
self.usdt_name, arg_index-1)
self.usdt_name, arg_index - 1)
if not arg_ctype:
self._bail("Unable to determine type of {} "
"in the filter".format(arg))
Expand Down

0 comments on commit dcf1675

Please sign in to comment.