diff options
Diffstat (limited to 'recipes/orc/0001-orc-Fix-indentation.patch')
-rw-r--r-- | recipes/orc/0001-orc-Fix-indentation.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/recipes/orc/0001-orc-Fix-indentation.patch b/recipes/orc/0001-orc-Fix-indentation.patch new file mode 100644 index 00000000..48078a68 --- /dev/null +++ b/recipes/orc/0001-orc-Fix-indentation.patch @@ -0,0 +1,57 @@ +From 9e221d8bec087aceebbd81cca286dde6f74d31aa Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan <nirbheek@centricular.com> +Date: Thu, 2 Jul 2020 15:01:40 +0530 +Subject: [PATCH 1/3] orc: Fix indentation + +Only whitespace changes. + +Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/44> +--- + orc/orccompiler.c | 27 ++++++++++++++------------- + 1 file changed, 14 insertions(+), 13 deletions(-) + +diff --git a/orc/orccompiler.c b/orc/orccompiler.c +index 600e66b..e6bd43c 100644 +--- a/orc/orccompiler.c ++++ b/orc/orccompiler.c +@@ -234,23 +234,24 @@ _get_protect_name (int protect) + static orc_bool + _set_virtual_protect (void * mem, size_t size, int code_protect) + { +- char *msg; +- DWORD old_protect; ++ char *msg; ++ DWORD old_protect; + +- if (!mem) +- return FALSE; + +- if (_virtualprotect (mem, size, code_protect, &old_protect) > 0) +- return TRUE; ++ if (!mem) ++ return FALSE; + +- FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER +- | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, +- GetLastError (), 0, (LPTSTR) &msg, 0, NULL); +- ORC_ERROR ("Couldn't set memory protect on %p from %s to %s: %s", mem, +- _get_protect_name (old_protect), _get_protect_name (code_protect), msg); +- LocalFree (msg); ++ if (_virtualprotect (mem, size, code_protect, &old_protect) > 0) ++ return TRUE; + +- return FALSE; ++ FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER ++ | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, ++ GetLastError (), 0, (LPTSTR) &msg, 0, NULL); ++ ORC_ERROR ("Couldn't set memory protect on %p from %s to %s: %s", mem, ++ _get_protect_name (old_protect), _get_protect_name (code_protect), msg); ++ LocalFree (msg); ++ ++ return FALSE; + } + #endif + +-- +2.25.1 + |