comparison sidlib.c @ 236:609bfc1bd628

Change sidlib_sldb_new() API to int sidlib_sldb_new(SIDLibSLDB **pdbh).
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 04 Jan 2020 13:18:55 +0200
parents 03b6f8604a7f
children d28f3d537284
comparison
equal deleted inserted replaced
235:3cb7be7b98a6 236:609bfc1bd628
419 sidlib_sldb_node_free(node); 419 sidlib_sldb_node_free(node);
420 return NULL; 420 return NULL;
421 } 421 }
422 422
423 423
424 SIDLibSLDB * sidlib_sldb_new(void) 424 int sidlib_sldb_new(SIDLibSLDB **pdbh)
425 { 425 {
426 return (SIDLibSLDB *) th_malloc0(sizeof(SIDLibSLDB)); 426 SIDLibSLDB *dbh;
427 if ((dbh = *pdbh = (SIDLibSLDB *) th_malloc0(sizeof(SIDLibSLDB))) == NULL)
428 return THERR_MALLOC;
429
430 return THERR_OK;
427 } 431 }
428 432
429 433
430 // Read SLDB database to memory 434 // Read SLDB database to memory
431 // 435 //