trace, argdist: Fix code formatting nits
authorSasha Goldshtein <goldshtn@gmail.com>
Tue, 17 Jan 2017 07:40:57 +0000 (07:40 +0000)
committerSasha Goldshtein <goldshtn@gmail.com>
Tue, 17 Jan 2017 07:42:39 +0000 (07:42 +0000)
tools/argdist.py
tools/trace.py

index f6bb8bf..f5422d9 100755 (executable)
@@ -258,7 +258,7 @@ static inline bool %s(char const *ignored, char const *str) {
         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;
                 }
index ebe1340..52fc99d 100755 (executable)
@@ -221,7 +221,7 @@ static inline bool %s(char const *ignored, uintptr_t str) {
         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;
                 }
@@ -362,7 +362,7 @@ BPF_PERF_OUTPUT(%s);
                             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))