IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 329


Ignore:
Timestamp:
Mar 31, 2004, 12:25:38 PM (22 years ago)
Author:
rhl
Message:

Use new psError()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/src/Utils/memory.c

    r267 r329  
    7676        fprintf(stderr, "\n");
    7777    } else if (ptr->refCounter <= 0) {
    78         psError(__func__, "Block %ld allocated at %s:%d freed more than once at %s:%d\n",
     78        psError(__func__, PS_ERR_BADFREE, PS_NEW_ERROR,
     79                "Block %ld allocated at %s:%d freed more than once at %s:%d\n",
    7980                ptr->id, ptr->file, ptr->lineno, file, lineno);
    8081    } else if (ptr->refCounter > 1) {
    81         psError(__func__, "Block %ld allocated at %s:%d freed while still referenced at %s:%d\n",
     82        psError(__func__,  PS_ERR_BADFREE, PS_NEW_ERROR,
     83                "Block %ld allocated at %s:%d freed while still referenced at %s:%d\n",
    8284                ptr->id, ptr->file, ptr->lineno, file, lineno);
    8385    }
     
    192194    if (m == NULL) {
    193195        if (!quiet) {
    194             psError(__func__, "psMemCheckCorruption: NULL memory block\n");
     196            psError(__func__,  PS_ERR_MEMORY_CORRUPTION, PS_NEW_ERROR,
     197                    "psMemCheckCorruption: NULL memory block\n");
    195198        }
    196199        return(1);
     
    199202    if (!ALIGNED(m)) {
    200203        if (!quiet) {
    201             psError(__func__, "psMemCheckCorruption: non-aligned memory block\n");
     204            psError(__func__,  PS_ERR_MEMORY_CORRUPTION, PS_NEW_ERROR,
     205                    "psMemCheckCorruption: non-aligned memory block\n");
    202206        }
    203207        return(1);
     
    206210    if (m->magic0 != P_PS_MEMMAGIC || m->magic != P_PS_MEMMAGIC) {
    207211        if (!quiet) {
    208             psError(__func__,
     212            psError(__func__, PS_ERR_MEMORY_CORRUPTION, PS_NEW_ERROR,
    209213                    "psMemCheckCorruption: memory block %ld is corrupted\n", m->id);
    210214        }
Note: See TracChangeset for help on using the changeset viewer.