Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30994 )
Change subject: layer23: Introduce tun.{c,h} ......................................................................
Patch Set 1:
(20 comments)
File src/host/layer23/include/osmocom/bb/common/tun.h:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/df7f2628_72fedd2d PS1, Line 39: int (*cb_ind) (struct tun_t * tun, void *pack, unsigned len); "foo * bar" should be "foo *bar"
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/785cac30_3c0c68bd PS1, Line 39: int (*cb_ind) (struct tun_t * tun, void *pack, unsigned len); Unnecessary space before function pointer arguments
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/e88384d3_ed425ac6 PS1, Line 53: int (*cb_ind) (struct tun_t * tun, void *pack, "foo * bar" should be "foo *bar"
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/97edca4c_962617ec PS1, Line 53: int (*cb_ind) (struct tun_t * tun, void *pack, Unnecessary space before function pointer arguments
File src/host/layer23/src/common/apn.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/8904dcdd_fdf1486b PS1, Line 78: memcpy(&dst.u.sin6.sin6_addr, ((uint8_t*)&ip6h->ip6_dst) + pref_offset, 8); "(foo*)" should be "(foo *)"
File src/host/layer23/src/common/tun.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/586c4790_6ed926fd PS1, Line 48: #elif defined (__FreeBSD__) space prohibited between function name and open parenthesis '('
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/5282dc84_700925e6 PS1, Line 53: #elif defined (__APPLE__) space prohibited between function name and open parenthesis '('
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/e06a1caa_75bf402c PS1, Line 65: #define SYS_ERR(sub, pri, en, fmt, args...) \ Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/f8ba3d6e_ee429ece PS1, Line 104: #if defined(__FreeBSD__) || defined (__APPLE__) space prohibited between function name and open parenthesis '('
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/4aabcc44_4b4bac76 PS1, Line 123: #if defined(__FreeBSD__) || defined (__APPLE__) space prohibited between function name and open parenthesis '('
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/641c21a4_8f01e683 PS1, Line 186: #elif defined(__FreeBSD__) || defined (__APPLE__) space prohibited between function name and open parenthesis '('
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/0684e177_bb611ef7 PS1, Line 214: strcpy(ifr.ifr_name, dev_name); Instead of strncpy()/strcpy(), use osmo_strlcpy() or OSMO_STRLCPY_ARRAY()
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/ab2711ef_2b0ff1e8 PS1, Line 221: strncpy((*tun)->devname, ifr.ifr_name, IFNAMSIZ); Instead of strncpy()/strcpy(), use osmo_strlcpy() or OSMO_STRLCPY_ARRAY()
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/c82b7323_e34d2405 PS1, Line 229: } else { else is not generally useful after a break or return
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/c36fc0dd_925a45f0 PS1, Line 230: strncpy((*tun)->devname, dev_name, IFNAMSIZ); Instead of strncpy()/strcpy(), use osmo_strlcpy() or OSMO_STRLCPY_ARRAY()
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/e63eda76_8f9eb3ab PS1, Line 243: #elif defined(__FreeBSD__) || defined (__APPLE__) space prohibited between function name and open parenthesis '('
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/ccb4e83b_98d5c2bb PS1, Line 273: strncpy(areq.ifra_name, (*tun)->devname, IFNAMSIZ); Instead of strncpy()/strcpy(), use osmo_strlcpy() or OSMO_STRLCPY_ARRAY()
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/659a20c5_f7175c47 PS1, Line 283: while (ioctl(fd, SIOCDIFADDR, (void *)&areq) != -1) ; space prohibited before semicolon
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/c1300157_65ea6381 PS1, Line 319: int (*cb_ind) (struct tun_t * tun, void *pack, unsigned len)) "foo * bar" should be "foo *bar"
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2782): https://gerrit.osmocom.org/c/osmocom-bb/+/30994/comment/0bd41f66_115b7ac7 PS1, Line 319: int (*cb_ind) (struct tun_t * tun, void *pack, unsigned len)) Unnecessary space before function pointer arguments