Skip to content

Instantly share code, notes, and snippets.

@WOnder93
Created October 23, 2024 08:38
Show Gist options
  • Save WOnder93/6fc510582f3632014cadf8036a3dc36e to your computer and use it in GitHub Desktop.
Save WOnder93/6fc510582f3632014cadf8036a3dc36e to your computer and use it in GitHub Desktop.
diff --git a/tests/binder/binder_common.c b/tests/binder/binder_common.c
index 7cf6c74..1897065 100644
--- a/tests/binder/binder_common.c
+++ b/tests/binder/binder_common.c
@@ -127,13 +127,13 @@ void print_trans_data(const struct binder_transaction_data *txn_in)
}
#if HAVE_BINDERFS
printf("\tflags: priority: 0x%x accept FDS: %s request security CTX: %s\n",
- obj->flags & FLAT_BINDER_FLAG_PRIORITY_MASK,
- obj->flags & FLAT_BINDER_FLAG_ACCEPTS_FDS ? "YES" : "NO",
- obj->flags & FLAT_BINDER_FLAG_TXN_SECURITY_CTX ? "YES" : "NO");
+ obj->flags &FLAT_BINDER_FLAG_PRIORITY_MASK,
+ obj->flags &FLAT_BINDER_FLAG_ACCEPTS_FDS ? "YES" : "NO",
+ obj->flags &FLAT_BINDER_FLAG_TXN_SECURITY_CTX ? "YES" : "NO");
#else
printf("\tflags: priority: 0x%x accept FDS: %s\n",
- obj->flags & FLAT_BINDER_FLAG_PRIORITY_MASK,
- obj->flags & FLAT_BINDER_FLAG_ACCEPTS_FDS ? "YES" : "NO");
+ obj->flags &FLAT_BINDER_FLAG_PRIORITY_MASK,
+ obj->flags &FLAT_BINDER_FLAG_ACCEPTS_FDS ? "YES" : "NO");
#endif
printf("\tcookie: %llx\n", obj->cookie);
}
diff --git a/tests/nlmsg/nlmsg.c b/tests/nlmsg/nlmsg.c
index a976b95..8160c4e 100644
--- a/tests/nlmsg/nlmsg.c
+++ b/tests/nlmsg/nlmsg.c
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
iov.iov_len = 3 * NLMSG_SPACE(0);
for (i = 0; i < 3; i++) {
- nh[i] = (struct nlmsghdr *)(data + (i * NLMSG_SPACE(0)));
+ nh[i] = (struct nlmsghdr *)(data + (i *NLMSG_SPACE(0)));
nh[i]->nlmsg_len = NLMSG_HDRLEN;
}
nh[0]->nlmsg_type = RTM_GETLINK; // nlmsg_read
diff --git a/tests/tun_tap/tun_tap.c b/tests/tun_tap/tun_tap.c
index a3db6c9..4d95cfa 100644
--- a/tests/tun_tap/tun_tap.c
+++ b/tests/tun_tap/tun_tap.c
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
count = 0xffff;
printf("TUN/TAP supported features:\n");
while (count) {
- f_switch = bit & features;
+ f_switch = bit &features;
switch (f_switch) {
case IFF_TUN:
printf("\tIFF_TUN\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment