Changeset 5227:beb26bba0901 in roaraudio for libroar/vio_dstr.c
- Timestamp:
- 11/12/11 13:26:38 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/vio_dstr.c
r4984 r5227 360 360 #endif 361 361 362 int roar_vio_open_dstr (struct roar_vio_calls * calls, c har * dstr, struct roar_vio_defaults * def, int dnum) {362 int roar_vio_open_dstr (struct roar_vio_calls * calls, const char * dstr, struct roar_vio_defaults * def, int dnum) { 363 363 return roar_vio_open_dstr_vio(calls, dstr, def, dnum, NULL); 364 364 } 365 365 366 #define _ret(x) do { int _err = roar_error; roar_mm_free(dstr ); roar_error = _err; roar_err_to_errno(); return (x); } while (0)366 #define _ret(x) do { int _err = roar_error; roar_mm_free(dstr_copy); roar_error = _err; roar_err_to_errno(); return (x); } while (0) 367 367 368 368 int roar_vio_open_dstr_vio(struct roar_vio_calls * calls, 369 c har * dstr, struct roar_vio_defaults * def, int dnum,369 const char * dstr, struct roar_vio_defaults * def, int dnum, 370 370 struct roar_vio_calls * vio) { 371 371 #ifndef ROAR_WITHOUT_VIO_DSTR 372 372 struct roar_vio_dstr_chain chain[ROAR_VIO_DSTR_MAX_OBJ_PER_CHAIN]; 373 char * dstr_copy; 373 374 char * next; 374 375 char * this; … … 387 388 return -1; 388 389 389 if ( (dstr = roar_mm_strdup(dstr)) == NULL )390 if ( (dstr_copy = roar_mm_strdup(dstr)) == NULL ) 390 391 return -1; 391 392 … … 394 395 chain[0].type = ROAR_VIO_DSTR_OBJT_INTERNAL; 395 396 396 next = dstr ;397 next = dstr_copy; 397 398 398 399 while (next != NULL) {
Note: See TracChangeset
for help on using the changeset viewer.