Fix source where indent will not be able to cope
[openssl.git] / crypto / mem_dbg.c
index f80060d9471a0bf71d798e730951d2319821351c..ddb95fb549e306829a42d0ced6be049ba36209d5 100644 (file)
@@ -142,7 +142,8 @@ static LHASH_OF(MEM) *mh=NULL; /* hash-table of memory requests
 
 
 typedef struct app_mem_info_st
-/* For application-defined information (static C-string `info')
+/*-
+ * For application-defined information (static C-string `info')
  * to be displayed in memory leak list.
  * Each thread has its own stack.  For applications, there is
  *   CRYPTO_push_info("...")     to push an entry,
@@ -478,7 +479,7 @@ int CRYPTO_remove_all_info(void)
 
 
 static unsigned long break_order_num=0;
-void CRYPTO_dbg_malloc(void *addr, size_t num, const char *file, int line,
+void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
        int before_p)
        {
        MEM *m,*mm;
@@ -602,8 +603,8 @@ void CRYPTO_dbg_free(void *addr, int before_p)
                }
        }
 
-void CRYPTO_dbg_realloc(void *addr1, void *addr2, size_t num,
-                       const char *file, int line, int before_p)
+void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num,
+       const char *file, int line, int before_p)
        {
        MEM m,*mp;
 
@@ -666,7 +667,7 @@ static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
        char buf[1024];
        char *bufp = buf;
        APP_INFO *amip;
-       size_t ami_cnt;
+       int ami_cnt;
        struct tm *lcl = NULL;
        CRYPTO_THREADID ti;
 
@@ -712,7 +713,7 @@ static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
 
        do
                {
-               size_t buf_len;
+               int buf_len;
                int info_len;
 
                ami_cnt++;
@@ -772,6 +773,9 @@ void CRYPTO_mem_leaks(BIO *b)
                {
                BIO_printf(b,"%ld bytes leaked in %d chunks\n",
                           ml.bytes,ml.chunks);
+#ifdef CRYPTO_MDEBUG_ABORT
+               abort();
+#endif
                }
        else
                {
@@ -784,7 +788,7 @@ void CRYPTO_mem_leaks(BIO *b)
                 * XXX    This should be in CRYPTO_mem_leaks_cb,
                 * and CRYPTO_mem_leaks should be implemented by
                 * using CRYPTO_mem_leaks_cb.
-                * (Also their should be a variant of lh_doall_arg
+                * (Also there should be a variant of lh_doall_arg
                 * that takes a function pointer instead of a void *;
                 * this would obviate the ugly and illegal
                 * void_fn_to_char kludge in CRYPTO_mem_leaks_cb.