NetworkManager/contrib/scripts
Thomas Haller 5388542fc0
checkpatch: discourage use of API that uses numeric source IDs
The numeric source IDs exist from a time before 2000, when there
was only one "GMainContext" singleton instance. Nowadays, the source
ID is only relative to one GMainContext, and you'd have to track
that association yourself. Als, g_source_remove() requires an additional
hash lookup, when you could simply track the GSource instance from the
start.

This API should not be used anymore. Operate on GSouce instances
direclty and use API like

  nm_clear_g_source_inst()
  nm_g_idle_add_source()
  nm_g_idle_souce_new()
  nm_g_source_attach()
  g_source_attach
  g_source_destroy
  g_source_unref
  etc.

Note that if you don't care about to ever remove a source again, like
scheduling an idle action that should not be cancelled, then

  g_idle_add(callback, user_data);

is fine. It is only problematic to do something with those numeric IDs.
checkpatch.pl would also flag those uses, but these are just warnings
and in the few cases where such a warning is emitted wrongly, it's find
to ignore them.
2021-06-28 13:31:33 +02:00
..
btmodem.pl all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
checkpatch-feature-branch.sh contrib/scripts: use "main" branch name in "checkpatch-feature-branch.sh" 2021-04-01 22:28:59 +02:00
checkpatch-git-post-commit-hook contrib/scripts: add "checkpatch-git-post-commit-hook" script to contrib/ 2020-02-21 07:40:10 +01:00
checkpatch.pl checkpatch: discourage use of API that uses numeric source IDs 2021-06-28 13:31:33 +02:00
code-style-git-post-commit-hook contrib: add git-hook to verify code-style 2020-09-02 19:20:40 +02:00
find-backports contrib/scripts: drop unnecessary line in "find-backports" script 2021-05-26 23:38:58 +02:00
modemu.pl all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-ci-install-valgrind-in-ubuntu1604.sh gitlab-ci: fix workarounds for Ubuntu 16.04 in tests 2020-08-28 14:24:32 +02:00
nm-ci-patch-gtkdoc.sh gitlab-ci: patch gtk-doc to generate valid documentation 2018-12-01 08:55:44 +01:00
nm-ci-run.sh tests/client: run "test-client.py" also for meson 2021-03-15 17:10:56 +01:00
nm-code-format-container.sh clang-format: update "nm-code-format-container.sh" script to use Fedora 34 container 2021-05-04 13:56:27 +02:00
nm-code-format.sh systemd: move "src/core/systemd" to "src/libnm-systemd-core" 2021-05-30 09:45:05 +02:00
nm-copr-build-nm-git-bundle.sh contrib: update nm-git-bundle to use "main" branch 2021-04-01 22:24:49 +02:00
nm-copr-build.sh contrib: fix URL to nm-git-bundle in "nm-copr-build.sh" 2021-04-01 22:34:06 +02:00
nm-import-openconnect all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-import-openvpn all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-import-vpnc all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
NM-log contrib: update NM-log script to highlight "enslaving to master" messages 2021-06-11 10:54:15 +02:00
test-create-many-device-setup.sh contrib: extend "test-create-many-device-setup.sh" script 2021-06-22 09:47:44 +02:00
test-macsec tests: use "/run" instead of "/var/run" 2019-05-17 21:24:18 +02:00