Skip to content

Commit

Permalink
Refactor postject_has_resource() to return the postject_resource_sent…
Browse files Browse the repository at this point in the history
…inel() value
  • Loading branch information
xicilion committed Oct 16, 2024
1 parent fa4ad8e commit 076d778
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/postject-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ inline void postject_options_init(struct postject_options* options)
options->pe_resource_name = NULL;
}

static inline char postject_resource_marker()
static inline volatile char* postject_resource_sentinel()
{
static const volatile char* sentinel = POSTJECT_SENTINEL_FUSE ":0";
return sentinel[sizeof(POSTJECT_SENTINEL_FUSE)];
return sentinel;
}

static inline char postject_resource_marker()
{
return postject_resource_sentinel()[sizeof(POSTJECT_SENTINEL_FUSE)];
}

#if defined(__linux__)
Expand Down

0 comments on commit 076d778

Please sign in to comment.