summaryrefslogtreecommitdiff
path: root/misc/tools/osmocon
diff options
context:
space:
mode:
Diffstat (limited to 'misc/tools/osmocon')
-rw-r--r--misc/tools/osmocon/linuxlist.h58
-rw-r--r--misc/tools/osmocon/linuxrbtree.h4
-rw-r--r--misc/tools/osmocon/osmocon.c2
-rw-r--r--misc/tools/osmocon/panic.c2
-rw-r--r--misc/tools/osmocon/rbtree.c6
-rw-r--r--misc/tools/osmocon/talloc.c50
-rw-r--r--misc/tools/osmocon/talloc.h8
7 files changed, 65 insertions, 65 deletions
diff --git a/misc/tools/osmocon/linuxlist.h b/misc/tools/osmocon/linuxlist.h
index ff2c49156..b7da3f5dc 100644
--- a/misc/tools/osmocon/linuxlist.h
+++ b/misc/tools/osmocon/linuxlist.h
@@ -54,14 +54,14 @@ struct llist_head {
} while (0)
/*
- * Insert a new entry between two known consecutive entries.
+ * Insert a new entry between two known consecutive entries.
*
* This is only for internal llist manipulation where we know
* the prev/next entries already!
*/
static inline void __llist_add(struct llist_head *_new,
- struct llist_head *prev,
- struct llist_head *next)
+ struct llist_head *prev,
+ struct llist_head *next)
{
next->prev = _new;
_new->next = next;
@@ -128,7 +128,7 @@ static inline void llist_del(struct llist_head *entry)
static inline void llist_del_init(struct llist_head *entry)
{
__llist_del(entry->prev, entry->next);
- INIT_LLIST_HEAD(entry);
+ INIT_LLIST_HEAD(entry);
}
/**
@@ -220,7 +220,7 @@ static inline void llist_splice_init(struct llist_head *llist,
*/
#define llist_for_each(pos, head) \
for (pos = (head)->next, prefetch(pos->next); pos != (head); \
- pos = pos->next, prefetch(pos->next))
+ pos = pos->next, prefetch(pos->next))
/**
* __llist_for_each - iterate over a llist
@@ -242,8 +242,8 @@ static inline void llist_splice_init(struct llist_head *llist,
*/
#define llist_for_each_prev(pos, head) \
for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
- pos = pos->prev, prefetch(pos->prev))
-
+ pos = pos->prev, prefetch(pos->prev))
+
/**
* llist_for_each_safe - iterate over a llist safe against removal of llist entry
* @pos: the &struct llist_head to use as a loop counter.
@@ -262,10 +262,10 @@ static inline void llist_splice_init(struct llist_head *llist,
*/
#define llist_for_each_entry(pos, head, member) \
for (pos = llist_entry((head)->next, typeof(*pos), member), \
- prefetch(pos->member.next); \
- &pos->member != (head); \
- pos = llist_entry(pos->member.next, typeof(*pos), member), \
- prefetch(pos->member.next))
+ prefetch(pos->member.next); \
+ &pos->member != (head); \
+ pos = llist_entry(pos->member.next, typeof(*pos), member), \
+ prefetch(pos->member.next))
/**
* llist_for_each_entry_reverse - iterate backwards over llist of given type.
@@ -275,10 +275,10 @@ static inline void llist_splice_init(struct llist_head *llist,
*/
#define llist_for_each_entry_reverse(pos, head, member) \
for (pos = llist_entry((head)->prev, typeof(*pos), member), \
- prefetch(pos->member.prev); \
- &pos->member != (head); \
- pos = llist_entry(pos->member.prev, typeof(*pos), member), \
- prefetch(pos->member.prev))
+ prefetch(pos->member.prev); \
+ &pos->member != (head); \
+ pos = llist_entry(pos->member.prev, typeof(*pos), member), \
+ prefetch(pos->member.prev))
/**
* llist_for_each_entry_continue - iterate over llist of given type
@@ -289,10 +289,10 @@ static inline void llist_splice_init(struct llist_head *llist,
*/
#define llist_for_each_entry_continue(pos, head, member) \
for (pos = llist_entry(pos->member.next, typeof(*pos), member), \
- prefetch(pos->member.next); \
- &pos->member != (head); \
- pos = llist_entry(pos->member.next, typeof(*pos), member), \
- prefetch(pos->member.next))
+ prefetch(pos->member.next); \
+ &pos->member != (head); \
+ pos = llist_entry(pos->member.next, typeof(*pos), member), \
+ prefetch(pos->member.next))
/**
* llist_for_each_entry_safe - iterate over llist of given type safe against removal of llist entry
@@ -304,8 +304,8 @@ static inline void llist_splice_init(struct llist_head *llist,
#define llist_for_each_entry_safe(pos, n, head, member) \
for (pos = llist_entry((head)->next, typeof(*pos), member), \
n = llist_entry(pos->member.next, typeof(*pos), member); \
- &pos->member != (head); \
- pos = n, n = llist_entry(n->member.next, typeof(*n), member))
+ &pos->member != (head); \
+ pos = n, n = llist_entry(n->member.next, typeof(*n), member))
/**
* llist_for_each_rcu - iterate over an rcu-protected llist
@@ -315,11 +315,11 @@ static inline void llist_splice_init(struct llist_head *llist,
#define llist_for_each_rcu(pos, head) \
for (pos = (head)->next, prefetch(pos->next); pos != (head); \
pos = pos->next, ({ smp_read_barrier_depends(); 0;}), prefetch(pos->next))
-
+
#define __llist_for_each_rcu(pos, head) \
for (pos = (head)->next; pos != (head); \
pos = pos->next, ({ smp_read_barrier_depends(); 0;}))
-
+
/**
* llist_for_each_safe_rcu - iterate over an rcu-protected llist safe
* against removal of llist entry
@@ -339,15 +339,15 @@ static inline void llist_splice_init(struct llist_head *llist,
*/
#define llist_for_each_entry_rcu(pos, head, member) \
for (pos = llist_entry((head)->next, typeof(*pos), member), \
- prefetch(pos->member.next); \
- &pos->member != (head); \
- pos = llist_entry(pos->member.next, typeof(*pos), member), \
- ({ smp_read_barrier_depends(); 0;}), \
- prefetch(pos->member.next))
+ prefetch(pos->member.next); \
+ &pos->member != (head); \
+ pos = llist_entry(pos->member.next, typeof(*pos), member), \
+ ({ smp_read_barrier_depends(); 0;}), \
+ prefetch(pos->member.next))
/**
- * llist_for_each_continue_rcu - iterate over an rcu-protected llist
+ * llist_for_each_continue_rcu - iterate over an rcu-protected llist
* continuing after existing point.
* @pos: the &struct llist_head to use as a loop counter.
* @head: the head for your llist.
diff --git a/misc/tools/osmocon/linuxrbtree.h b/misc/tools/osmocon/linuxrbtree.h
index 079f440d0..57a58d502 100644
--- a/misc/tools/osmocon/linuxrbtree.h
+++ b/misc/tools/osmocon/linuxrbtree.h
@@ -1,7 +1,7 @@
/*
Red Black Trees
(C) 1999 Andrea Arcangeli <andrea@suse.de>
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -145,7 +145,7 @@ extern struct rb_node *rb_first(const struct rb_root *);
extern struct rb_node *rb_last(const struct rb_root *);
/* Fast replacement of a single node without remove/rebalance/add/rebalance */
-extern void rb_replace_node(struct rb_node *victim, struct rb_node *_new,
+extern void rb_replace_node(struct rb_node *victim, struct rb_node *_new,
struct rb_root *root);
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
diff --git a/misc/tools/osmocon/osmocon.c b/misc/tools/osmocon/osmocon.c
index 3dd738928..53f23667c 100644
--- a/misc/tools/osmocon/osmocon.c
+++ b/misc/tools/osmocon/osmocon.c
@@ -628,7 +628,7 @@ static int handle_write_dnload(void)
default:
break;
}
- } else if (dnload.write_ptr >= dnload.data + dnload.data_len) {
+ } else if (dnload.write_ptr >= dnload.data + dnload.data_len) {
printf("finished\n");
dnload.write_ptr = dnload.data;
dnload.serial_fd.when &= ~BSC_FD_WRITE;
diff --git a/misc/tools/osmocon/panic.c b/misc/tools/osmocon/panic.c
index 0dc7dcc6e..88a4bb6e5 100644
--- a/misc/tools/osmocon/panic.c
+++ b/misc/tools/osmocon/panic.c
@@ -17,7 +17,7 @@ void osmo_panic(const char *fmt, ...)
osmo_panic_default(fmt, args);
va_end(args);
}
-
+
void osmo_set_panic_handler(osmo_panic_handler_t h)
{
diff --git a/misc/tools/osmocon/rbtree.c b/misc/tools/osmocon/rbtree.c
index 9033a84ac..afdf60c0f 100644
--- a/misc/tools/osmocon/rbtree.c
+++ b/misc/tools/osmocon/rbtree.c
@@ -2,7 +2,7 @@
Red Black Trees
(C) 1999 Andrea Arcangeli <andrea@suse.de>
(C) 2002 David Woodhouse <dwmw2@infradead.org>
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -317,7 +317,7 @@ struct rb_node *rb_next(const struct rb_node *node)
/* If we have a right-hand child, go down and then left as far
as we can. */
if (node->rb_right) {
- node = node->rb_right;
+ node = node->rb_right;
while (node->rb_left)
node=node->rb_left;
return (struct rb_node *)node;
@@ -345,7 +345,7 @@ struct rb_node *rb_prev(const struct rb_node *node)
/* If we have a left-hand child, go down and then right as far
as we can. */
if (node->rb_left) {
- node = node->rb_left;
+ node = node->rb_left;
while (node->rb_right)
node=node->rb_right;
return (struct rb_node *)node;
diff --git a/misc/tools/osmocon/talloc.c b/misc/tools/osmocon/talloc.c
index c0072441d..6d99fe8a4 100644
--- a/misc/tools/osmocon/talloc.c
+++ b/misc/tools/osmocon/talloc.c
@@ -1,4 +1,4 @@
-/*
+/*
Samba Unix SMB/CIFS implementation.
Samba trivial allocation library - new interface
@@ -7,11 +7,11 @@
Copyright (C) Andrew Tridgell 2004
Copyright (C) Stefan Metzmacher 2006
-
+
** NOTE! The following LGPL license applies to the talloc
** library. This does NOT imply that all of Samba is released
** under the LGPL
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@@ -71,7 +71,7 @@
#define TALLOC_FLAG_POOLMEM 0x08 /* This is allocated in a pool */
#define TALLOC_MAGIC_REFERENCE ((const char *)1)
-/* by default we abort when given a bad pointer (such as when talloc_free() is called
+/* by default we abort when given a bad pointer (such as when talloc_free() is called
on a pointer that came from malloc() */
#ifndef TALLOC_ABORT
#define TALLOC_ABORT(reason) abort()
@@ -185,7 +185,7 @@ static inline struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr)
{
const char *pp = (const char *)ptr;
struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp - TC_HDR_SIZE);
- if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~0xF)) != TALLOC_MAGIC)) {
+ if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~0xF)) != TALLOC_MAGIC)) {
if (tc->flags & TALLOC_FLAG_FREE) {
talloc_abort_double_free();
} else {
@@ -330,7 +330,7 @@ static struct talloc_chunk *talloc_alloc_pool(struct talloc_chunk *parent,
return result;
}
-/*
+/*
Allocate a bit of memory as a child of an existing pointer
*/
static inline void *__talloc(const void *context, size_t size)
@@ -423,7 +423,7 @@ void _talloc_set_destructor(const void *ptr, int (*destructor)(void *))
}
/*
- increase the reference count on a piece of memory.
+ increase the reference count on a piece of memory.
*/
int talloc_increase_ref_count(const void *ptr)
{
@@ -446,7 +446,7 @@ static int talloc_reference_destructor(struct talloc_reference_handle *handle)
}
/*
- more efficient way to add a name to a pointer - the name must point to a
+ more efficient way to add a name to a pointer - the name must point to a
true string constant
*/
static inline void _talloc_set_name_const(const void *ptr, const char *name)
@@ -476,8 +476,8 @@ static inline void *_talloc_named_const(const void *context, size_t size, const
make a secondary reference to a pointer, hanging off the given context.
the pointer remains valid until both the original caller and this given
context are freed.
-
- the major use for this is when two different structures need to reference the
+
+ the major use for this is when two different structures need to reference the
same underlying data, and you want to be able to free the two instances separately,
and in either order
*/
@@ -503,7 +503,7 @@ void *_talloc_reference(const void *context, const void *ptr)
}
-/*
+/*
internal talloc_free call
*/
static inline int _talloc_free(void *ptr)
@@ -611,7 +611,7 @@ static inline int _talloc_free(void *ptr)
return 0;
}
-/*
+/*
move a lump of memory from one talloc context to another return the
ptr on success, or NULL if it could not be transferred.
passing NULL as ptr will always return NULL with no side effects.
@@ -640,7 +640,7 @@ void *_talloc_steal(const void *new_ctx, const void *ptr)
if (tc->prev) tc->prev->next = tc->next;
if (tc->next) tc->next->prev = tc->prev;
}
-
+
tc->parent = tc->next = tc->prev = NULL;
return discard_const_p(void, ptr);
}
@@ -729,7 +729,7 @@ int talloc_unlink(const void *context, void *ptr)
return -1;
}
}
-
+
tc_p = talloc_chunk_from_ptr(ptr);
if (tc_p->refs == NULL) {
@@ -951,7 +951,7 @@ void talloc_free_children(void *ptr)
}
}
-/*
+/*
Allocate a bit of memory as a child of an existing pointer
*/
void *_talloc(const void *context, size_t size)
@@ -977,8 +977,8 @@ void *talloc_named_const(const void *context, size_t size, const char *name)
return _talloc_named_const(context, size, name);
}
-/*
- free a talloc pointer. This also frees all child pointers of this
+/*
+ free a talloc pointer. This also frees all child pointers of this
pointer recursively
return 0 if the memory is actually freed, otherwise -1. The memory
@@ -1064,9 +1064,9 @@ void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *n
new_ptr = realloc(tc, size + TC_HDR_SIZE);
}
#endif
- if (unlikely(!new_ptr)) {
- tc->flags &= ~TALLOC_FLAG_FREE;
- return NULL;
+ if (unlikely(!new_ptr)) {
+ tc->flags &= ~TALLOC_FLAG_FREE;
+ return NULL;
}
tc = (struct talloc_chunk *)new_ptr;
@@ -1230,14 +1230,14 @@ static void talloc_report_depth_FILE_helper(const void *ptr, int depth, int max_
}
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)\n",
(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\n",
depth*4, "",
name,
(unsigned long)talloc_total_size(ptr),
@@ -1344,8 +1344,8 @@ void talloc_enable_leak_report_full(void)
atexit(talloc_report_null_full);
}
-/*
- talloc and zero memory.
+/*
+ talloc and zero memory.
*/
void *_talloc_zero(const void *ctx, size_t size, const char *name)
{
@@ -1359,7 +1359,7 @@ void *_talloc_zero(const void *ctx, size_t size, const char *name)
}
/*
- memdup with a talloc.
+ memdup with a talloc.
*/
void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name)
{
diff --git a/misc/tools/osmocon/talloc.h b/misc/tools/osmocon/talloc.h
index f7f7643b8..efaceb183 100644
--- a/misc/tools/osmocon/talloc.h
+++ b/misc/tools/osmocon/talloc.h
@@ -1,16 +1,16 @@
#ifndef _TALLOC_H_
#define _TALLOC_H_
-/*
+/*
Unix SMB/CIFS implementation.
Samba temporary memory allocation functions
Copyright (C) Andrew Tridgell 2004-2005
Copyright (C) Stefan Metzmacher 2006
-
+
** NOTE! The following LGPL license applies to the talloc
** library. This does NOT imply that all of Samba is released
** under the LGPL
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@@ -130,7 +130,7 @@ void *_talloc_reference(const void *context, const void *ptr);
int talloc_unlink(const void *context, void *ptr);
const char *talloc_set_name(const void *ptr, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
void talloc_set_name_const(const void *ptr, const char *name);
-void *talloc_named(const void *context, size_t size,
+void *talloc_named(const void *context, size_t size,
const char *fmt, ...) PRINTF_ATTRIBUTE(3,4);
void *talloc_named_const(const void *context, size_t size, const char *name);
const char *talloc_get_name(const void *ptr);