trace: Generated streq-helper to ignore null terminator
diff --git a/tools/trace.py b/tools/trace.py
index 8ac9201..d12e26b 100755
--- a/tools/trace.py
+++ b/tools/trace.py
@@ -217,11 +217,11 @@
fname = "streq_%d" % Probe.streq_index
Probe.streq_index += 1
self.streq_functions += """
-static inline bool %s(char const *ignored, unsigned long str) {
+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); ++i) {
+ for (int i = 0; i < sizeof(needle)-1; ++i) {
if (needle[i] != haystack[i]) {
return false;
}