Changeset 9f30598bf080dfa7ad315db844b4a00d4d56b4dd
- Timestamp:
- 02/01/06 16:28:42
(3 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1138807722 +0000
- git-parent:
[547ace84a64f7c08cea28e2d95ace021dcc96818]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1138807722 +0000
- Message:
Simpler use of HAVE_ASSERT
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r125a27b |
r9f30598 |
|
| 43 | 43 | #include <string.h> /* strerror() */ |
|---|
| 44 | 44 | #include <stdlib.h> /* free() */ |
|---|
| 45 | | #include <assert.h> |
|---|
| | 45 | #ifdef HAVE_ASSERT |
|---|
| | 46 | # include <assert.h> |
|---|
| | 47 | #else |
|---|
| | 48 | # define assert( c ) ((void)0) |
|---|
| | 49 | #endif |
|---|
| 46 | 50 | |
|---|
| 47 | 51 | #ifndef WIN32 |
|---|
| … | … | |
| 2729 | 2733 | vlc_iconv( libvlc.from_locale, NULL, NULL, NULL, NULL ); |
|---|
| 2730 | 2734 | } |
|---|
| 2731 | | vlc_mutex_unlock( &libvlc.from_locale_lock ); |
|---|
| 2732 | | #ifdef HAVE_ASSERT |
|---|
| | 2735 | vlc_mutex_unlock( &libvlc.from_locale_lock ); |
|---|
| | 2736 | |
|---|
| 2733 | 2737 | assert (inb == 0); |
|---|
| 2734 | 2738 | assert (*iptr == '\0'); |
|---|
| 2735 | 2739 | assert (*optr == '\0'); |
|---|
| 2736 | 2740 | assert (strlen( output ) == (size_t)(optr - output)); |
|---|
| 2737 | | #endif |
|---|
| 2738 | 2741 | return realloc( output, optr - output + 1 ); |
|---|
| 2739 | 2742 | } |
|---|
| … | … | |
| 2778 | 2781 | vlc_mutex_unlock( &libvlc.to_locale_lock ); |
|---|
| 2779 | 2782 | |
|---|
| 2780 | | #ifdef HAVE_ASSERT |
|---|
| 2781 | 2783 | assert (inb == 0); |
|---|
| 2782 | 2784 | assert (*iptr == '\0'); |
|---|
| 2783 | 2785 | assert (*optr == '\0'); |
|---|
| 2784 | 2786 | assert (strlen( output ) == (size_t)(optr - output)); |
|---|
| 2785 | | #endif |
|---|
| 2786 | 2787 | return realloc( output, optr - output + 1 ); |
|---|
| 2787 | 2788 | } |
|---|