Attention is currently required from: pespin.
4 comments:
File src/gb_proxy_vty.c:
Patch Set #1, Line 549: if (!strcmp(argv[0], "bss")) {
you could simply store g_cfg->bss_nses or g_cfg->sgsn_nses in a pointer and use shared code below.
I don't think that works with hashtable. DECLARE_HASHTABLE makes those:
struct hlist_head X_nses[256];
hash_for_hash() uses ARRAY_SIZE, so it doesn't work on a struct hlist_head *nses:
gb_proxy_vty.c: In function ‘show_gbproxy_bvc’:
/home/daniel/local/osmo-master/include/osmocom/core/utils.h:19:34: warning: division ‘sizeof (struct hlist_head *) / sizeof (struct hlist_head)’ does not compute the number of array elements [-Wsizeof-pointer-div]
19 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
| ^
/home/daniel/local/osmo-master/include/osmocom/core/hashtable.h:19:26: note: in expansion of macro ‘ARRAY_SIZE’
19 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
| ^~~~~~~~~~
/home/daniel/local/osmo-master/include/osmocom/core/hashtable.h:101:60: note: in expansion of macro ‘HASH_SIZE’
101 | for ((bkt) = 0, obj = NULL; obj == NULL && (bkt) < HASH_SIZE(name);\
| ^~~~~~~~~
gb_proxy_vty.c:529:9: note: in expansion of macro ‘hash_for_each’
529 | hash_for_each(nses, i, nse, list) {
| ^~~~~~~~~~~~~
gb_proxy_vty.c:516:28: note: first ‘sizeof’ operand was declared here
516 | struct hlist_head *nses;
| ^~~~
Patch Set #1, Line 550: hash_for_each(g_cfg->bss_nses, i, nse, list)
please add {} around hash_for_each
Done
Patch Set #1, Line 554: hash_for_each(g_cfg->sgsn_nses, i, nse, list)
please add {} around hash_for_each
Done
Patch Set #1, Line 588: hash_for_each(g_cfg->cells, i, cell, list)
please add {} around hash_for_each
Done
To view, visit change 29714. To unsubscribe, or for help writing mail filters, visit settings.