NetworkManager/src/platform/wifi
Thomas Haller 6f8208c0d4 platform/netlink: cleanup nla_parse*() code by using safer macros
- drop explicit MAX sizes like

      static const struct nla_policy policy[IFLA_INET6_MAX+1] = {

  The compiler will deduce that.

  It saves redundant information (which is possibly wrong). Also,
  the max define might be larger than we actually need it, so we
  just waste a few bytes of static memory and do unnecesary steps
  during validation.

  Also, the compiler will catch bugs, if the array size of policy/tb
  is too short for what we access later (-Warray-bounds).

- avoid redundant size specifiers like:

      static const struct nla_policy policy[IFLA_INET6_MAX+1] = {
      ...
      struct nlattr *tb[IFLA_INET6_MAX+1];
      ...
      err = nla_parse_nested (tb, IFLA_INET6_MAX, attr, policy);

- use the nla_parse*_arr() macros that determine the maxtype
  based on the argument types.

- move declaration of "static const struct nla_policy policy" variable
  to the beginning, before auto variables.

- drop unneeded temporay error variables.
2019-02-22 09:58:09 +01:00
..
nm-wifi-utils-nl80211.c platform/netlink: cleanup nla_parse*() code by using safer macros 2019-02-22 09:58:09 +01:00
nm-wifi-utils-nl80211.h platform: move the management of the genl socket to linux-platform 2018-06-26 16:21:54 +02:00
nm-wifi-utils-private.h platform/wifi: turn NMWifiUtils into a GObject 2018-06-26 16:21:54 +02:00
nm-wifi-utils-wext.c all: replace strerror() calls with nm_strerror_native() 2019-02-12 08:50:28 +01:00
nm-wifi-utils-wext.h platform/wifi: turn NMWifiUtils into a GObject 2018-06-26 16:21:54 +02:00
nm-wifi-utils.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-wifi-utils.h docs: misc. typos 2018-09-15 09:08:03 +02:00