Skip to content

Commit 87c0b86

Browse files
committed
Format code
1 parent a5fa548 commit 87c0b86

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

include/unicorn/unicorn.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ typedef size_t uc_hook;
6565
#define UNICORN_DEPRECATED __declspec(deprecated)
6666
#else
6767
#pragma message( \
68-
"WARNING: You need to implement UNICORN_DEPRECATED for this compiler")
68+
"WARNING: You need to implement UNICORN_DEPRECATED for this compiler")
6969
#define UNICORN_DEPRECATED
7070
#endif
7171

tests/unit/test_x86.c

+29-9
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,9 @@ static void test_bswap_ax(void)
16821682
{
16831683
uint8_t code[] = {
16841684
// bswap ax
1685-
0x66, 0x0F, 0xC8,
1685+
0x66,
1686+
0x0F,
1687+
0xC8,
16861688
};
16871689
TEST_CODE(UC_MODE_32, code);
16881690
TEST_IN_REG(EAX, 0x44332211);
@@ -1692,7 +1694,9 @@ static void test_bswap_ax(void)
16921694
{
16931695
uint8_t code[] = {
16941696
// bswap ax
1695-
0x66, 0x0F, 0xC8,
1697+
0x66,
1698+
0x0F,
1699+
0xC8,
16961700
};
16971701
TEST_CODE(UC_MODE_64, code);
16981702
TEST_IN_REG(RAX, 0x8877665544332211);
@@ -1702,7 +1706,10 @@ static void test_bswap_ax(void)
17021706
{
17031707
uint8_t code[] = {
17041708
// bswap rax (66h ignored)
1705-
0x66, 0x48, 0x0F, 0xC8,
1709+
0x66,
1710+
0x48,
1711+
0x0F,
1712+
0xC8,
17061713
};
17071714
TEST_CODE(UC_MODE_64, code);
17081715
TEST_IN_REG(RAX, 0x8877665544332211);
@@ -1712,7 +1719,10 @@ static void test_bswap_ax(void)
17121719
{
17131720
uint8_t code[] = {
17141721
// bswap ax (rex ignored)
1715-
0x48, 0x66, 0x0F, 0xC8,
1722+
0x48,
1723+
0x66,
1724+
0x0F,
1725+
0xC8,
17161726
};
17171727
TEST_CODE(UC_MODE_64, code);
17181728
TEST_IN_REG(RAX, 0x8877665544332211);
@@ -1722,7 +1732,8 @@ static void test_bswap_ax(void)
17221732
{
17231733
uint8_t code[] = {
17241734
// bswap eax
1725-
0x0F, 0xC8,
1735+
0x0F,
1736+
0xC8,
17261737
};
17271738
TEST_CODE(UC_MODE_32, code);
17281739
TEST_IN_REG(EAX, 0x44332211);
@@ -1732,7 +1743,8 @@ static void test_bswap_ax(void)
17321743
{
17331744
uint8_t code[] = {
17341745
// bswap eax
1735-
0x0F, 0xC8,
1746+
0x0F,
1747+
0xC8,
17361748
};
17371749
TEST_CODE(UC_MODE_64, code);
17381750
TEST_IN_REG(RAX, 0x8877665544332211);
@@ -1746,7 +1758,10 @@ static void test_rex_x64(void)
17461758
{
17471759
uint8_t code[] = {
17481760
// mov ax, bx (rex.w ignored)
1749-
0x48, 0x66, 0x89, 0xD8,
1761+
0x48,
1762+
0x66,
1763+
0x89,
1764+
0xD8,
17501765
};
17511766
TEST_CODE(UC_MODE_64, code);
17521767
TEST_IN_REG(RAX, 0x8877665544332211);
@@ -1757,7 +1772,10 @@ static void test_rex_x64(void)
17571772
{
17581773
uint8_t code[] = {
17591774
// mov rax, rbx (66h ignored)
1760-
0x66, 0x48, 0x89, 0xD8,
1775+
0x66,
1776+
0x48,
1777+
0x89,
1778+
0xD8,
17611779
};
17621780
TEST_CODE(UC_MODE_64, code);
17631781
TEST_IN_REG(RAX, 0x8877665544332211);
@@ -1768,7 +1786,9 @@ static void test_rex_x64(void)
17681786
{
17691787
uint8_t code[] = {
17701788
// mov ax, bx (expected encoding)
1771-
0x66, 0x89, 0xD8,
1789+
0x66,
1790+
0x89,
1791+
0xD8,
17721792
};
17731793
TEST_CODE(UC_MODE_64, code);
17741794
TEST_IN_REG(RAX, 0x8877665544332211);

uc.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2837,7 +2837,8 @@ static uc_err uc_restore_latest_snapshot(struct uc_struct *uc)
28372837
subregions_link, subregion_next)
28382838
{
28392839
uc->memory_filter_subregions(subregion, uc->snapshot_level);
2840-
if (subregion->priority >= uc->snapshot_level || (!subregion->terminates && QTAILQ_EMPTY(&subregion->subregions))) {
2840+
if (subregion->priority >= uc->snapshot_level ||
2841+
(!subregion->terminates && QTAILQ_EMPTY(&subregion->subregions))) {
28412842
uc->memory_unmap(uc, subregion);
28422843
}
28432844
}

0 commit comments

Comments
 (0)