diff options
author | Colin Walters <walters@verbum.org> | 2017-05-26 14:35:34 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-05-26 19:27:11 +0000 |
commit | 88a1fc92a9937fafd195d70abc80a30be64fc136 (patch) | |
tree | a49fb1b62005e6a48e18b0385a6ba03906246dc1 /coccinelle | |
parent | 9bf8a8503afa5cc7acacc8203490330292da7f85 (diff) | |
download | ostree-88a1fc92a9937fafd195d70abc80a30be64fc136.tar.gz |
tree-wide: Add+run spatch to use glnx_throw()
I had to run a sed job to add whitespace after, but otherwise this was easy.
Closes: #890
Approved by: jlebon
Diffstat (limited to 'coccinelle')
-rw-r--r-- | coccinelle/new-error.cocci | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/coccinelle/new-error.cocci b/coccinelle/new-error.cocci new file mode 100644 index 00000000..147a8e02 --- /dev/null +++ b/coccinelle/new-error.cocci @@ -0,0 +1,19 @@ +// Conversion for G_IO_ERROR_FAILED that could be glnx_throw() +@@ +expression p; +@@ +- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, p); +- return FALSE; ++ return glnx_throw (error, "%s", p); +@@ +expression p; +@@ +- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, p); +- return FALSE; ++ return glnx_throw (error, p); +@@ +expression p, q; +@@ +- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, p, q); +- return FALSE; ++ return glnx_throw (error, p, q); |