summaryrefslogtreecommitdiff
path: root/src/lib/shm_ap_rbuff.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-05-08 16:23:24 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-05-08 16:23:24 +0200
commit021af9e01ce6c6376534b33ef1a06ea4189028d4 (patch)
tree93a02e1b20f54bb869eadc856f201412c633315c /src/lib/shm_ap_rbuff.c
parent7d0fcf6392be6a738d0ba7450b62f8c48062279a (diff)
downloadouroboros-021af9e01ce6c6376534b33ef1a06ea4189028d4.tar.gz
ouroboros-021af9e01ce6c6376534b33ef1a06ea4189028d4.zip
lib: changed SHM_AP_RBUFF to SHM_AP_RBUFF_PREFIX
This better reflects the use as the pid is appended to that name.
Diffstat (limited to 'src/lib/shm_ap_rbuff.c')
-rw-r--r--src/lib/shm_ap_rbuff.c8
1 files changed, 4 insertions, 4 deletions
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.");