Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13994


Change subject: talloc: \n -> \r\n for serial output
......................................................................

talloc: \n -> \r\n for serial output

Change-Id: Ieeb6a93c2dc9578220c73771136e2df7476f5e45
---
M sysmoOCTSIM/talloc.c
1 file changed, 17 insertions(+), 17 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware 
refs/changes/94/13994/1

diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c
index 54be634..c5c9062 100644
--- a/sysmoOCTSIM/talloc.c
+++ b/sysmoOCTSIM/talloc.c
@@ -494,7 +494,7 @@

 static void talloc_abort(const char *reason)
 {
-       talloc_log("%s\n", reason);
+       talloc_log("%s\r\n", reason);

        if (!talloc_abort_fn) {
                TALLOC_ABORT(reason);
@@ -521,7 +521,7 @@
        if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) != 
talloc_magic)) {
                if ((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK))
                    == (TALLOC_MAGIC_NON_RANDOM | TALLOC_FLAG_FREE)) {
-                       talloc_log("talloc: access after free error - first 
free may be at %s\n", tc->name);
+                       talloc_log("talloc: access after free error - first 
free may be at %s\r\n", tc->name);
                        talloc_abort_access_after_free();
                        return NULL;
                }
@@ -1331,11 +1331,11 @@
        if (unlikely(tc->refs != NULL) && talloc_parent(ptr) != new_ctx) {
                struct talloc_reference_handle *h;

-               talloc_log("WARNING: talloc_steal with references at %s\n",
+               talloc_log("WARNING: talloc_steal with references at %s\r\n",
                           location);

                for (h=tc->refs; h; h=h->next) {
-                       talloc_log("\treference at %s\n",
+                       talloc_log("\treference at %s\r\n",
                                   h->location);
                }
        }
@@ -1344,7 +1344,7 @@
        /* this test is probably too expensive to have on in the
           normal build, but it useful for debugging */
        if (talloc_is_parent(new_ctx, ptr)) {
-               talloc_log("WARNING: stealing into talloc child at %s\n", 
location);
+               talloc_log("WARNING: stealing into talloc child at %s\r\n", 
location);
        }
 #endif

@@ -1756,11 +1756,11 @@
                        return talloc_unlink(null_context, ptr);
                }

-               talloc_log("ERROR: talloc_free with references at %s\n",
+               talloc_log("ERROR: talloc_free with references at %s\r\n",
                           location);

                for (h=tc->refs; h; h=h->next) {
-                       talloc_log("\treference at %s\n",
+                       talloc_log("\treference at %s\r\n",
                                   h->location);
                }
                return -1;
@@ -2251,14 +2251,14 @@
        FILE *f = (FILE *)_f;

        if (is_ref) {
-               fprintf(f, "%*sreference to: %s\n", depth*4, "", name);
+               fprintf(f, "%*sreference to: %s\r\n", depth*4, "", name);
                return;
        }

        tc = talloc_chunk_from_ptr(ptr);
        if (tc->limit && tc->limit->parent == tc) {
                fprintf(f, "%*s%-30s is a memlimit context"
-                       " (max_size = %lu bytes, cur_size = %lu bytes)\n",
+                       " (max_size = %lu bytes, cur_size = %lu bytes)\r\n",
                        depth*4, "",
                        name,
                        (unsigned long)tc->limit->max_size,
@@ -2266,14 +2266,14 @@
        }

        if (depth == 0) {
-               fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu 
blocks)\n",
+               fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu 
blocks)\r",
                        (max_depth < 0 ? "full " :""), name,
                        (unsigned long)talloc_total_size(ptr),
                        (unsigned long)talloc_total_blocks(ptr));
                return;
        }

-       fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n",
+       fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) 
%p\r\n",
                depth*4, "",
                name,
                (unsigned long)talloc_total_size(ptr),
@@ -2294,7 +2294,7 @@
                        }
                }
        }
-       fprintf(f, "\n");
+       fprintf(f, "\r\n");
 #endif
 }

@@ -2837,14 +2837,14 @@
        struct talloc_chunk *tc;

        if (context == NULL) {
-               fprintf(file, "talloc no parents for NULL\n");
+               fprintf(file, "talloc no parents for NULL\r\n");
                return;
        }

        tc = talloc_chunk_from_ptr(context);
-       fprintf(file, "talloc parents of '%s'\n", __talloc_get_name(context));
+       fprintf(file, "talloc parents of '%s'\r\n", __talloc_get_name(context));
        while (tc) {
-               fprintf(file, "\t'%s'\n", 
__talloc_get_name(TC_PTR_FROM_CHUNK(tc)));
+               fprintf(file, "\t'%s'\r\n", 
__talloc_get_name(TC_PTR_FROM_CHUNK(tc)));
                while (tc && tc->prev) tc = tc->prev;
                if (tc) {
                        tc = tc->parent;
@@ -2971,7 +2971,7 @@
        for (l = limit; l != NULL; l = l->upper) {
                size_t new_cur_size = l->cur_size + size;
                if (new_cur_size < l->cur_size) {
-                       talloc_abort("logic error in talloc_memlimit_grow\n");
+                       talloc_abort("logic error in talloc_memlimit_grow\r\n");
                        return;
                }
                l->cur_size = new_cur_size;
@@ -2988,7 +2988,7 @@

        for (l = limit; l != NULL; l = l->upper) {
                if (l->cur_size < size) {
-                       talloc_abort("logic error in talloc_memlimit_shrink\n");
+                       talloc_abort("logic error in 
talloc_memlimit_shrink\r\n");
                        return;
                }
                l->cur_size = l->cur_size - size;

--
To view, visit https://gerrit.osmocom.org/13994
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieeb6a93c2dc9578220c73771136e2df7476f5e45
Gerrit-Change-Number: 13994
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <[email protected]>

Reply via email to