Skip to content

Commit

Permalink
Prevent clang-format from complaining about the include order in open…
Browse files Browse the repository at this point in the history
…bsd.c
  • Loading branch information
plusvic committed Jun 14, 2021
1 parent 26daee2 commit 3c4dfb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ yara_SOURCES = \
cli/threading.h \
cli/yara.c

yara_LDADD = -Llibyara/.libs -lyara
yara_LDADD = -Llibyara/.libs libyara/.libs/libyara.a #-lyara
yara_DEPENDENCIES = libyara/.libs/libyara.la

yarac_SOURCES = \
Expand Down
12 changes: 6 additions & 6 deletions libyara/proc/openbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,29 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#if defined(USE_OPENBSD_PROC)

// Prevent clang-format from complaining about the include order,
// changing the order breaks compilation.
//
// clang-format off
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/sysctl.h>
#include <sys/wait.h>

#include <errno.h>
// clang-format on

#include <yara/error.h>
#include <yara/mem.h>
#include <yara/proc.h>


typedef struct _YR_PROC_INFO
{
int pid;
uint64_t old_end;
struct kinfo_vmentry vm_entry;
} YR_PROC_INFO;


int _yr_process_attach(int pid, YR_PROC_ITERATOR_CTX* context)
{
int status;
Expand Down Expand Up @@ -89,7 +93,6 @@ int _yr_process_attach(int pid, YR_PROC_ITERATOR_CTX* context)
return ERROR_SUCCESS;
}


int _yr_process_detach(YR_PROC_ITERATOR_CTX* context)
{
YR_PROC_INFO* proc_info = (YR_PROC_INFO*) context->proc_info;
Expand All @@ -99,7 +102,6 @@ int _yr_process_detach(YR_PROC_ITERATOR_CTX* context)
return ERROR_SUCCESS;
}


YR_API const uint8_t* yr_process_fetch_memory_block_data(YR_MEMORY_BLOCK* block)
{
YR_PROC_ITERATOR_CTX* context = (YR_PROC_ITERATOR_CTX*) block->context;
Expand Down Expand Up @@ -136,7 +138,6 @@ YR_API const uint8_t* yr_process_fetch_memory_block_data(YR_MEMORY_BLOCK* block)
return context->buffer;
}


YR_API YR_MEMORY_BLOCK* yr_process_get_next_memory_block(
YR_MEMORY_BLOCK_ITERATOR* iterator)
{
Expand Down Expand Up @@ -165,7 +166,6 @@ YR_API YR_MEMORY_BLOCK* yr_process_get_next_memory_block(
return &context->current_block;
}


YR_API YR_MEMORY_BLOCK* yr_process_get_first_memory_block(
YR_MEMORY_BLOCK_ITERATOR* iterator)
{
Expand Down

0 comments on commit 3c4dfb0

Please sign in to comment.