On Fri, Nov 22, 2013 at 10:44 AM, Harald Welte <laforge(a)gnumonks.org> wrote:
Hi Max,
I would like to merge your patch, but:
On Tue, Nov 19, 2013 at 12:25:52PM +0100, ☎ wrote:
+int
+comp128v2(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc)
+{
+ int r = comp128v3(ki, rand, sres, kc);
+ kc[7] = 0; /* 10 last bits of Kc forced to 0 */
+ kc[6] &= 0xfc;
+ return r;
+}
this is space-indented, not tab-indented.
+static struct osmo_sub_auth_data test_aux2 = {
+ .type = OSMO_AUTH_TYPE_GSM,
+ .algo = OSMO_AUTH_ALG_COMP128v2,
+ .u.gsm = {
+ .ki = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
0xAA, 0xAA, 0xAA, 0xAA },
those lienes are too long for 80-character wide terminals
+ uint8_t buf[12];
+ osmo_hexparse(res, buf, 12);
+ if (0 != memcmp(buf, vec->sres, 4)) {
+ printf("%d FAIL SRES:\n", rc);
there's again mixed space and tab indentation.
+void test_comp128v3(char * rand, char * res) {
we put the curly braces at the beginning of the line, not at the end of
the line. And again the functions are space indented.
Furthermore, your patch does not apply on top of master.
It's sad to see that valuable contributions are lost due to basic coding
style issues not being observed. We had this back in April with your
KASUMI related patches, and it was never fixed. Please take the time
to fix those issues, thanks.
I should probably keep my mouth shut here, but
I've always wondered why....
Why not just fix it since this is a community effort? It takes longer
to complain about it and reject it than it does to perform the actual
work. (Sans the merge problem on Master).
Anyway, please don't take it as a personal attack because its not.
Lots of folks do it and I'm interested in understanding why they do
it.
Jeff