Revision: 55053
          http://brlcad.svn.sourceforge.net/brlcad/?rev=55053&view=rev
Author:   brlcad
Date:     2013-04-05 03:51:28 +0000 (Fri, 05 Apr 2013)
Log Message:
-----------
ws cleanup

Modified Paths:
--------------
    brlcad/trunk/src/libbu/malloc.c

Modified: brlcad/trunk/src/libbu/malloc.c
===================================================================
--- brlcad/trunk/src/libbu/malloc.c     2013-04-05 03:48:06 UTC (rev 55052)
+++ brlcad/trunk/src/libbu/malloc.c     2013-04-05 03:51:28 UTC (rev 55053)
@@ -58,6 +58,7 @@
     struct memdebug m;
 };
 
+
 static struct bu_list *bu_memq = BU_LIST_NULL;
 static struct bu_list bu_memqhd = BU_LIST_INIT_ZERO;
 #define MEMQDEBUG_NULL ((struct memqdebug *)0)
@@ -93,7 +94,7 @@
     if (LIKELY(bu_memdebug != NULL)) {
        for (; mp >= bu_memdebug; mp--) {
            /* Search for an empty slot */
-           if (mp->mdb_len > 0)  continue;
+           if (mp->mdb_len > 0) continue;
            mp->magic = MDB_MAGIC;
            mp->mdb_addr = ptr;
            mp->mdb_len = cnt;
@@ -143,16 +144,16 @@
 
     if (bu_memdebug == (struct memdebug *)0) {
        bu_semaphore_acquire(BU_SEM_SYSCALL);
-       fprintf(stderr, "memdebug_check(%p, %s)  no memdebug table yet\n",
+       fprintf(stderr, "memdebug_check(%p, %s) no memdebug table yet\n",
                ptr, str);
        bu_semaphore_release(BU_SEM_SYSCALL);
        return MEMDEBUG_NULL;
     }
     for (; mp >= bu_memdebug; mp--) {
-       if (!mp->magic)  continue;
-       if (mp->magic != MDB_MAGIC)  bu_bomb("memdebug_check() malloc tracing 
table corrupted!\n");
-       if (mp->mdb_len == 0)  continue;
-       if (mp->mdb_addr != ptr)  continue;
+       if (!mp->magic) continue;
+       if (mp->magic != MDB_MAGIC) bu_bomb("memdebug_check() malloc tracing 
table corrupted!\n");
+       if (mp->mdb_len == 0) continue;
+       if (mp->mdb_addr != ptr) continue;
        ip = (uint32_t *)((char *)ptr+mp->mdb_len-sizeof(uint32_t));
        if (*ip != MDB_MAGIC) {
            bu_semaphore_acquire(BU_SEM_SYSCALL);
@@ -246,6 +247,7 @@
     if (UNLIKELY(ptr==(char *)0 || bu_debug&BU_DEBUG_MEM_LOG)) {
        fprintf(stderr, "NULL malloc(%llu) %s\n", (unsigned long 
long)(cnt*size), str);
     }
+
 #if defined(MALLOC_NOT_MP_SAFE)
     bu_semaphore_release(BU_SEM_SYSCALL);
 #endif
@@ -505,9 +507,9 @@
     if (bu_memdebug_len > 0) {
        mp = &bu_memdebug[bu_memdebug_len-1];
        for (; mp >= bu_memdebug; mp--) {
-           if (!mp->magic)  continue;
-           if (mp->magic != MDB_MAGIC)  bu_bomb("memdebug_check() malloc 
tracing table corrupted!\n");
-           if (mp->mdb_len == 0)  continue;
+           if (!mp->magic) continue;
+           if (mp->magic != MDB_MAGIC) bu_bomb("memdebug_check() malloc 
tracing table corrupted!\n");
+           if (mp->mdb_len == 0) continue;
 
            count++;
            ip = (uint32_t *)(((char 
*)mp->mdb_addr)+mp->mdb_len-sizeof(uint32_t));
@@ -601,16 +603,16 @@
 
     if (UNLIKELY(bu_debug&BU_DEBUG_MEM_CHECK)) {
        if (bu_memdebug == (struct memdebug *)0) {
-           fprintf(stderr, "bu_ck_malloc_ptr(%p, %s)  no memdebug table yet\n",
+           fprintf(stderr, "bu_ck_malloc_ptr(%p, %s) no memdebug table yet\n",
                    ptr, str);
            /* warning only -- the program is just getting started */
            return;
        }
 
        for (; mp >= bu_memdebug; mp--) {
-           if (!mp->magic)  continue;
-           if (mp->magic != MDB_MAGIC)  bu_bomb("bu_ck_malloc_ptr() malloc 
tracing table corrupted!\n");
-           if (mp->mdb_len == 0 || mp->mdb_addr != ptr)  continue;
+           if (!mp->magic) continue;
+           if (mp->magic != MDB_MAGIC) bu_bomb("bu_ck_malloc_ptr() malloc 
tracing table corrupted!\n");
+           if (mp->mdb_len == 0 || mp->mdb_addr != ptr) continue;
 
            /* Found the relevant entry */
            ip = (uint32_t *)(((char *)ptr)+mp->mdb_len-sizeof(uint32_t));
@@ -640,18 +642,18 @@
     register uint32_t *ip;
 
     if (UNLIKELY(bu_memdebug == (struct memdebug *)0)) {
-       fprintf(stderr, "bu_mem_barriercheck()  no memdebug table yet\n");
+       fprintf(stderr, "bu_mem_barriercheck() no memdebug table yet\n");
        return 0;
     }
     bu_semaphore_acquire(BU_SEM_SYSCALL);
     for (; mp >= bu_memdebug; mp--) {
-       if (!mp->magic)  continue;
+       if (!mp->magic) continue;
        if (mp->magic != MDB_MAGIC) {
            bu_semaphore_release(BU_SEM_SYSCALL);
            fprintf(stderr, "  mp->magic = x%lx, s/b=x%x\n", (unsigned 
long)(mp->magic), MDB_MAGIC);
            bu_bomb("bu_mem_barriercheck() malloc tracing table corrupted!\n");
        }
-       if (mp->mdb_len == 0)  continue;
+       if (mp->mdb_len == 0) continue;
        ip = (uint32_t *)(((char *)mp->mdb_addr)+mp->mdb_len-sizeof(uint32_t));
        if (*ip != MDB_MAGIC) {
            bu_semaphore_release(BU_SEM_SYSCALL);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to