Ignore:
Timestamp:
May 14, 2009, 3:10:51 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Cleanups
  • Fix test on return value for open (-1 is the right value to test not 0)
  • Improve asprintf usage for mountlist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-tools.c

    r2195 r2205  
    13371337    int i;
    13381338    static int depth = 0;
    1339     char *tmp;
    13401339    FILE *fout;
    13411340
     
    13451344    }
    13461345    depth++;
    1347 
    1348     malloc_string(tmp);
    13491346
    13501347    if (debug_level <= g_loglevel) {
     
    13591356                fprintf(fout, "\t");
    13601357            if (getpid() == g_main_pid)
    1361                 fprintf(fout, "[Main] %s->%s#%d: ", szFile, szFunction,
    1362                         nLine);
     1358                fprintf(fout, "[Main] %s->%s#%d: ", szFile, szFunction, nLine);
    13631359            else if (getpid() == g_buffer_pid && g_buffer_pid > 0)
    1364                 fprintf(fout, "[Buff] %s->%s#%d: ", szFile, szFunction,
    1365                         nLine);
     1360                fprintf(fout, "[Buff] %s->%s#%d: ", szFile, szFunction, nLine);
    13661361            else
    1367                 fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile,
    1368                         szFunction, nLine);
     1362                fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile, szFunction, nLine);
    13691363        }
    13701364        vfprintf(fout, fmt, args);
     
    13801374    }
    13811375    depth--;
    1382     paranoid_free(tmp);
    13831376}
    13841377
Note: See TracChangeset for help on using the changeset viewer.