decoder-snd.c
branchtrunk
changeset 29 640ce9201139
parent 25 887faebaba0a
child 34 afc13760179b
     1.1 --- a/decoder-snd.c	Mon Aug 17 20:55:55 2009 +0800
     1.2 +++ b/decoder-snd.c	Mon Aug 17 20:56:48 2009 +0800
     1.3 @@ -732,8 +732,7 @@
     1.4                char *s=index(cat,' '); if(s) *s=0;
     1.5                code=DoCddbCmd("cddb read %s %08x\n",cat,id->discid);
     1.6                if(code==210) {
     1.7 -                char *name=0;
     1.8 -                asprintf(&name,"%s/%s/%08x",cddbpath,cat,id->discid);
     1.9 +                char *name=aprintf("%s/%s/%08x",cddbpath,cat,id->discid);
    1.10                  if(MakeDirs(name,false)) {
    1.11                    FILE *out=fopen(name,"w");
    1.12                    if(out) {
    1.13 @@ -790,7 +789,7 @@
    1.14    va_list ap;
    1.15    va_start(ap,format);
    1.16    char *buff=0;
    1.17 -  vasprintf(&buff,format,ap);
    1.18 +  if(vasprintf(&buff,format,ap)<0);
    1.19    va_end(ap);
    1.20  #ifdef CDDB_DEBUG
    1.21    printf("cddb: -> %s",buff);