1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
|