NetworkManager/clients/cli
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
..
agent.c cli: use nmc_do_cmd to get the client and check if the daemon is running 2016-11-11 16:18:03 +01:00
agent.h cli: add 'nmcli agent' command (bgo #739568) 2014-11-07 11:58:25 +01:00
common.c cli: make match() return boolean 2017-02-15 13:04:07 +01:00
common.h cli: make it possible to call sub-commands with client obtained asynchronously 2016-11-11 16:18:03 +01:00
connections.c cli: make match() return boolean 2017-02-15 13:04:07 +01:00
connections.h cli: add -f argument completion 2016-08-01 15:51:29 +02:00
devices.c cli: make match() return boolean 2017-02-15 13:04:07 +01:00
devices.h cli: add -f argument completion 2016-08-01 15:51:29 +02:00
general.c cli: make match() return boolean 2017-02-15 13:04:07 +01:00
general.h cli: output a short summary of devices when called without arguments 2016-07-19 14:29:05 +02:00
nmcli-completion cli: make nmcli do its own command completion 2017-02-13 16:32:15 +01:00
nmcli.c cli: make match() return boolean 2017-02-15 13:04:07 +01:00
nmcli.h cli: use nmc_do_cmd to get the client and check if the daemon is running 2016-11-11 16:18:03 +01:00
polkit-agent.c all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
polkit-agent.h cli: add 'nmcli agent' command (bgo #739568) 2014-11-07 11:58:25 +01:00
settings-docs.xsl clients: reorganize source tree, put all the installed clients together 2014-07-30 15:56:19 -04:00
settings.c cli: make match() return boolean 2017-02-15 13:04:07 +01:00
settings.h cli: macsec support 2017-01-16 17:47:10 +01:00
utils.c cli: make match() return boolean 2017-02-15 13:04:07 +01:00
utils.h cli: make match() return boolean 2017-02-15 13:04:07 +01:00