View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002305 | ardour | other | public | 2008-06-18 15:44 | 2011-08-16 11:16 |
| Reporter | colinf | Assigned To | paul | ||
| Priority | normal | Severity | trivial | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Product Version | SVN/2.0-ongoing | ||||
| Summary | 0002305: Use sizeof(Sample) consistently | ||||
| Description | A couple of places in libs/ardour/session.cc use 4 rather than explicitly using sizeof(Sample). Here's a trivial patch to make these consistent with the rest of the file. | ||||
| Tags | No tags attached. | ||||
|
2008-06-18 15:44
|
sizeof-sample.patch (1,143 bytes)
Index: libs/ardour/session.cc
===================================================================
--- libs/ardour/session.cc (revision 3470)
+++ libs/ardour/session.cc (working copy)
@@ -3731,7 +3731,7 @@
#ifdef NO_POSIX_MEMALIGN
p = (Sample *) malloc(current_block_size * sizeof(Sample));
#else
- if (posix_memalign((void **)&p,CPU_CACHE_ALIGN,current_block_size * 4) != 0) {
+ if (posix_memalign((void **)&p,CPU_CACHE_ALIGN,current_block_size * sizeof(Sample)) != 0) {
fatal << string_compose (_("Memory allocation error: posix_memalign (%1 * %2) failed (%3)"),
current_block_size, sizeof (Sample), strerror (errno))
<< endmsg;
@@ -4131,7 +4131,7 @@
#ifdef NO_POSIX_MEMALIGN
p = (Sample *) malloc(current_block_size * sizeof(Sample));
#else
- if (posix_memalign((void **)&p,CPU_CACHE_ALIGN,current_block_size * 4) != 0) {
+ if (posix_memalign((void **)&p,CPU_CACHE_ALIGN,current_block_size * sizeof(Sample)) != 0) {
fatal << string_compose (_("Memory allocation error: posix_memalign (%1 * %2) failed (%3)"),
current_block_size, sizeof (Sample), strerror (errno))
<< endmsg;
|
|
|
applied and committed, thanks. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2008-06-18 15:44 | colinf | New Issue | |
| 2008-06-18 15:44 | colinf | File Added: sizeof-sample.patch | |
| 2008-06-18 16:16 | paul | cost | => 0.00 |
| 2008-06-18 16:16 | paul | Status | new => resolved |
| 2008-06-18 16:16 | paul | Resolution | open => fixed |
| 2008-06-18 16:16 | paul | Assigned To | => paul |
| 2008-06-18 16:16 | paul | Note Added: 0005044 | |
| 2011-08-16 11:16 | colinf | Status | resolved => closed |