aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2012-11-13 16:47:55 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2012-11-13 16:47:55 +0000
commit964ee11d110761538aa839e12c2c4a0bc496f2ac (patch)
tree9f5cfb4a4b62db53ba6036f20f2cb94a451a39a0
parent3e8c42679987d8b4f5eda86039a8d9f706892c24 (diff)
remove unused variable and change the min function to be static
svn path=/trunk/externals/share_mem/; revision=16546
-rw-r--r--shmem.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/shmem.c b/shmem.c
index 53dd11c..dfc24bb 100644
--- a/shmem.c
+++ b/shmem.c
@@ -11,7 +11,7 @@ typedef struct shmem
int segment_size;
} t_shmem;
-inline t_float min(t_float x1,t_float x2)
+static inline t_float min(t_float x1,t_float x2)
{
if (x1 <= x2) {
return x1;
@@ -126,13 +126,11 @@ void shmem_dump(t_shmem *x, t_symbol *unused, int argc, t_atom *argv)
void shmem_read(t_shmem *x, t_float index)
{
- int i, vecsize, index_max, shmem_offset;
- t_garray *a;
- t_word *vec;
+ int shmem_offset;
shmem_offset = index;
if (shmem_offset < 0) shmem_offset = 0;
- if (shmem_offset > x->segment_size-1) i = x->segment_size-1;
+ if (shmem_offset > x->segment_size-1) shmem_offset = x->segment_size-1;
// post("i=%d", offset);
outlet_float(x->x_obj.ob_outlet, x->share_memory[shmem_offset]);
}