diff options
-rw-r--r-- | include/ouroboros/shm_ap_rbuff.h | 2 | ||||
-rw-r--r-- | src/lib/shm_ap_rbuff.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/ouroboros/shm_ap_rbuff.h b/include/ouroboros/shm_ap_rbuff.h index 070542b0..0ee3e81e 100644 --- a/include/ouroboros/shm_ap_rbuff.h +++ b/include/ouroboros/shm_ap_rbuff.h @@ -25,7 +25,7 @@ #define OUROBOROS_SHM_AP_RBUFF_H #ifndef SHM_AP_RBUFF -#define SHM_AP_RBUFF "ouroboros_rb_" +#define SHM_AP_RBUFF_PREFIX "ouroboros_rb_" #endif #ifndef SHM_RBUFF_SIZE diff --git a/src/lib/shm_ap_rbuff.c b/src/lib/shm_ap_rbuff.c index 4bd64775..0a41dfb3 100644 --- a/src/lib/shm_ap_rbuff.c +++ b/src/lib/shm_ap_rbuff.c @@ -59,7 +59,7 @@ struct shm_ap_rbuff * shm_ap_rbuff_create() pthread_mutexattr_t attr; char fn[25]; - sprintf(fn, SHM_AP_RBUFF "%d", getpid()); + sprintf(fn, SHM_AP_RBUFF_PREFIX "%d", getpid()); rb = malloc(sizeof(*rb)); if (rb == NULL) { @@ -132,7 +132,7 @@ struct shm_ap_rbuff * shm_ap_rbuff_open(pid_t pid) struct rb_entry * shm_base; char fn[25]; - sprintf(fn, SHM_AP_RBUFF "%d", pid); + sprintf(fn, SHM_AP_RBUFF_PREFIX "%d", pid); rb = malloc(sizeof(*rb)); if (rb == NULL) { @@ -186,7 +186,7 @@ void shm_ap_rbuff_close(struct shm_ap_rbuff * rb) return; } - sprintf(fn, SHM_AP_RBUFF "%d", rb->pid); + sprintf(fn, SHM_AP_RBUFF_PREFIX "%d", rb->pid); if (munmap(rb->shm_base, SHM_RBUFF_FILE_SIZE) == -1) LOG_DBGF("Couldn't unmap shared memory."); @@ -209,7 +209,7 @@ void shm_ap_rbuff_destroy(struct shm_ap_rbuff * rb) return; } - sprintf(fn, SHM_AP_RBUFF "%d", rb->pid); + sprintf(fn, SHM_AP_RBUFF_PREFIX "%d", rb->pid); if (munmap(rb->shm_base, SHM_RBUFF_FILE_SIZE) == -1) LOG_DBGF("Couldn't unmap shared memory."); |