On Tue, Mar 23, 2021 at 08:17:47AM +0900, Namjae Jeon wrote:ahm just a pointless comment. but
Boolean functions should tell you what they are testing in the name.Why not compare_oid()? This code is come from cifs.+Call this oid_eq()?
+static int
+compare_oid(unsigned long *oid1, unsigned int oid1len,
+ unsigned long *oid2, unsigned int oid2len) {
+ unsigned int i;
+
+ if (oid1len != oid2len)
+ return 0;
+
+ for (i = 0; i < oid1len; i++) {
+ if (oid1[i] != oid2[i])
+ return 0;
+ }
+ return 1;
+}
I need clear reason to change both cifs/cifsd...
Without any context you can't know what if (compare_oid(one, two)) {
means, but if (oid_equal(one, two)) { is readable.
regards,
dan carpenter