Attention is currently required from: osmith.
3 comments:
File src/osmo-bsc-nat/bssap_conn.c:
Patch Set #3, Line 56: enc_err = gsm0808_enc_aoip_trasp_addr(msg_new, ss) == 0;
Better add paraenthesis it's clearer: enc_err = (gsm0808_enc_aoip_trasp_addr(msg_new, ss) == 0);
Patch Set #3, Line 61: enc_err = tlv_encode_one(msg_new, def->def[tag].type, tag, len_v, val) < 0;
Same, paranthesis, otherwise it's easy tonot see the comparision at the end (it happened to me).
Patch Set #3, Line 64: if (enc_err) {
BTW, this looks to me a like a good candidate for goto.
at the end of function:
"""
enc_err:
LOGP(DMAIN, LOGL_ERROR, "Failed to encode tag %d into copy of bssmap msg\n", tag);
msgb_free(msg_new);
return -EINVAL;
"""
Then in all those places above, simply do "goto enc_err;", paths will become a lot simplet and cleaner imho.
To view, visit change 28582. To unsubscribe, or for help writing mail filters, visit settings.