NetworkManager/clients
Lubomir Rintel 84c484ed5b cli: make match() return boolean
Coccinelle semantic patch:

  @@
  @@
  -int
  +gboolean
          matches (...);

  @@
  expression pattern, cmd, len;
  @@
  -int
  +gboolean
          matches (...)
          {
                  ...
  -               return memcmp (pattern, cmd, len);
  +               return memcmp (pattern, cmd, len) == 0;
          }

  @@
  expression prefix, str;
  @@
  (
  -matches (prefix, str) != 0
  +!matches (prefix, str)
  |
  -matches (prefix, str) == 0
  +matches (prefix, str)
  )

  @@
  expression prefix, str;
  @@
  -(matches (prefix, str))
  +matches (prefix, str)

  @@
  expression prefix, str;
  @@
  -(!matches (prefix, str))
  +!matches (prefix, str)

spatch --smpl-spacing --sp-file match.cocci --dir clients/cli/ \
  --include-headers --macro-file shared/nm-utils/gsystem-local-alloc.h
2017-02-15 13:04:07 +01:00
..
cli cli: make match() return boolean 2017-02-15 13:04:07 +01:00
common build: fix -Wold-style-declaration warnings 2017-02-06 19:27:21 +01:00
tui all: use nm_utils_is_valid_iface_name() 2017-01-06 15:11:56 +01:00
nm-online.c nm-online: fix wrong assertion failure during nm-online 2017-02-07 19:42:30 +01:00