Changeset 3552

Show
Ignore:
Timestamp:
08/18/08 09:40:26 (4 months ago)
Author:
bricks
Message:

added some sanity checks

Location:
trunk/opensync
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/opensync/module/opensync_module.c

    r2649 r3552  
    7676void *osync_module_get_function(OSyncModule *module, const char *name, OSyncError **error) 
    7777{ 
     78        osync_assert(module); 
     79        osync_assert(name); 
     80         
    7881        void *function = NULL; 
    7982        if (!module->module) { 
     
    8386         
    8487        if (!g_module_symbol(module->module, name, &function)) { 
    85                 osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to locate symbol %s: %s", name, g_module_error()); 
     88                osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to locate symbol %s: %s", __NULLSTR(name), g_module_error()); 
    8689                return NULL; 
    8790        } 
     
    164167int osync_module_get_version(OSyncModule *module) 
    165168{ 
     169        osync_assert(module); 
     170         
    166171        void *function = NULL; 
    167172        int (* fct_version)(void) = NULL; 
     
    217222{ 
    218223        osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, module, path, error); 
     224        osync_assert(module); 
    219225        osync_assert(!module->module); 
    220226         
     
    250256{ 
    251257        osync_trace(TRACE_ENTRY, "%s(%p)", __func__, module); 
     258        osync_assert(module); 
    252259        osync_assert(module->module); 
    253260         
  • trunk/opensync/plugin/opensync_plugin_env.c

    r3536 r3552  
    8282{ 
    8383        osync_trace(TRACE_ENTRY, "%s(%p)", __func__, env); 
    84         g_assert(env); 
     84        osync_assert(env); 
    8585         
    8686        /* Free the plugins */