Changeset 9f30598bf080dfa7ad315db844b4a00d4d56b4dd

Show
Ignore:
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
  • src/libvlc.c

    r125a27b r9f30598  
    4343#include <string.h>                                            /* strerror() */ 
    4444#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 
    4650 
    4751#ifndef WIN32 
     
    27292733            vlc_iconv( libvlc.from_locale, NULL, NULL, NULL, NULL ); 
    27302734        } 
    2731         vlc_mutex_unlock( &libvlc.from_locale_lock ); 
    2732 #ifdef HAVE_ASSERT 
     2735   vlc_mutex_unlock( &libvlc.from_locale_lock ); 
     2736 
    27332737        assert (inb == 0); 
    27342738        assert (*iptr == '\0'); 
    27352739        assert (*optr == '\0'); 
    27362740        assert (strlen( output ) == (size_t)(optr - output)); 
    2737 #endif 
    27382741        return realloc( output, optr - output + 1 ); 
    27392742    } 
     
    27782781        vlc_mutex_unlock( &libvlc.to_locale_lock ); 
    27792782 
    2780 #ifdef HAVE_ASSERT 
    27812783        assert (inb == 0); 
    27822784        assert (*iptr == '\0'); 
    27832785        assert (*optr == '\0'); 
    27842786        assert (strlen( output ) == (size_t)(optr - output)); 
    2785 #endif 
    27862787    return realloc( output, optr - output + 1 ); 
    27872788    }