diff options
author | Dave Wallace <dwallacelf@gmail.com> | 2017-07-31 13:33:11 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2017-07-31 13:33:11 -0400 |
commit | b88566498a83209f8646e4a6b1d247e69dae2aeb (patch) | |
tree | 77a56083d0bd13e9ed6fb63b7be86294d0a71aee /src/svm/svm_fifo_segment.c | |
parent | 84f28824763031c4be3f33aed2289a1e2a32d4c4 (diff) |
ssvm->name must be a vector containing a c-string.
Change-Id: I14a97a7fdd000da62d2ed4bea71f55ee34a21311
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/svm/svm_fifo_segment.c')
-rw-r--r-- | src/svm/svm_fifo_segment.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/svm/svm_fifo_segment.c b/src/svm/svm_fifo_segment.c index a01e26e45e5..86661e516a2 100644 --- a/src/svm/svm_fifo_segment.c +++ b/src/svm/svm_fifo_segment.c @@ -105,7 +105,7 @@ svm_fifo_segment_create (svm_fifo_segment_create_args_t * a) s->ssvm.ssvm_size = a->segment_size; s->ssvm.i_am_master = 1; s->ssvm.my_pid = getpid (); - s->ssvm.name = format (0, "%s", a->segment_name); + s->ssvm.name = format (0, "%s%c", a->segment_name, 0); s->ssvm.requested_va = sm->next_baseva; rv = ssvm_master_init (&s->ssvm, s - sm->segments); @@ -192,7 +192,7 @@ svm_fifo_segment_create_process_private (svm_fifo_segment_create_args_t * a) s->ssvm.ssvm_size = ~0; s->ssvm.i_am_master = 1; s->ssvm.my_pid = getpid (); - s->ssvm.name = (u8 *) a->segment_name; + s->ssvm.name = format (0, "%s%c", a->segment_name, 0); s->ssvm.requested_va = ~0; /* Allocate a [sic] shared memory header, in process memory... */ @@ -240,7 +240,7 @@ svm_fifo_segment_attach (svm_fifo_segment_create_args_t * a) s->ssvm.ssvm_size = a->segment_size; s->ssvm.my_pid = getpid (); - s->ssvm.name = (u8 *) a->segment_name; + s->ssvm.name = format (0, "%s%c", a->segment_name, 0); s->ssvm.requested_va = sm->next_baseva; rv = ssvm_slave_init (&s->ssvm, sm->timeout_in_seconds); |