style: fix whitespace errors
authorLuka Perkov <luka@openwrt.org>
Tue, 15 Oct 2013 10:57:14 +0000 (12:57 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 15 Oct 2013 11:17:09 +0000 (13:17 +0200)
Signed-off-by: Luka Perkov <luka@openwrt.org>
delta.c
list.c
sh/uci.sh
uci_internal.h
ucimap.c
ucimap.h

diff --git a/delta.c b/delta.c
index 8a1ca77..73c2728 100644 (file)
--- a/delta.c
+++ b/delta.c
@@ -316,8 +316,8 @@ static void uci_filter_delta(struct uci_context *ctx, const char *name, const ch
                if (!buf[0])
                        continue;
 
-               /* NB: need to allocate the element before the call to 
-                * uci_parse_delta_tuple, otherwise the original string 
+               /* NB: need to allocate the element before the call to
+                * uci_parse_delta_tuple, otherwise the original string
                 * gets modified before it is saved */
                e = uci_alloc_generic(ctx, UCI_TYPE_DELTA, pctx->buf, sizeof(struct uci_element));
                uci_list_add(&list, &e->list);
@@ -364,7 +364,7 @@ int uci_revert(struct uci_context *ctx, struct uci_ptr *ptr)
        uci_expand_ptr(ctx, ptr, false);
        UCI_ASSERT(ctx, ptr->p->has_delta);
 
-       /* 
+       /*
         * - flush unwritten changes
         * - save the package name
         * - unload the package
@@ -374,7 +374,7 @@ int uci_revert(struct uci_context *ctx, struct uci_ptr *ptr)
        UCI_TRAP_SAVE(ctx, error);
        UCI_INTERNAL(uci_save, ctx, ptr->p);
 
-       /* NB: need to clone package, section and option names, 
+       /* NB: need to clone package, section and option names,
         * as they may get freed on uci_free_package() */
        package = uci_strdup(ctx, ptr->p->e.name);
        if (ptr->section)
@@ -408,7 +408,7 @@ int uci_save(struct uci_context *ctx, struct uci_package *p)
        UCI_HANDLE_ERR(ctx);
        UCI_ASSERT(ctx, p != NULL);
 
-       /* 
+       /*
         * if the config file was outside of the /etc/config path,
         * don't save the delta to a file, update the real file
         * directly.
diff --git a/list.c b/list.c
index 863c48c..faf4494 100644 (file)
--- a/list.c
+++ b/list.c
@@ -33,7 +33,7 @@ static inline void uci_list_fixup(struct uci_list *ptr)
        ptr->next->prev = ptr;
 }
 
-/* 
+/*
  * uci_alloc_generic allocates a new uci_element with payload
  * payload is appended to the struct to save memory and reduce fragmentation
  */
@@ -318,7 +318,7 @@ uci_lookup_ext_section(struct uci_context *ctx, struct uci_ptr *ptr)
        else if (!uci_validate_type(name))
                goto error;
 
-       /* if the given index is negative, it specifies the section number from 
+       /* if the given index is negative, it specifies the section number from
         * the end of the list */
        if (idx < 0) {
                c = 0;
index 595a007..cb01a7d 100755 (executable)
--- a/sh/uci.sh
+++ b/sh/uci.sh
@@ -19,7 +19,7 @@ append() {
        local var="$1"
        local value="$2"
        local sep="${3:- }"
-       
+
        eval "export ${NO_EXPORT:+-n} -- \"$var=\${$var:+\${$var}\${value:+\$sep}}\$value\""
 }
 
@@ -66,7 +66,7 @@ package() {
 config () {
        local cfgtype="$1"
        local name="$2"
-       
+
        export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1))
        name="${name:-cfg$CONFIG_NUM_SECTIONS}"
        append CONFIG_SECTIONS "$name"
@@ -88,7 +88,7 @@ list() {
        local value="$*"
        local len
 
-       config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 
+       config_get len "$CONFIG_SECTION" "${varname}_LENGTH"
        len="$((${len:-0} + 1))"
        config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
        config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
@@ -108,8 +108,8 @@ config_clear() {
        export ${NO_EXPORT:+-n} CONFIG_SECTIONS="${SECTION:+$CONFIG_SECTIONS}"
 
        for oldvar in `set | grep ^CONFIG_${SECTION:+${SECTION}_} | \
-               sed -e 's/\(.*\)=.*$/\1/'` ; do 
-               unset $oldvar 
+               sed -e 's/\(.*\)=.*$/\1/'` ; do
+               unset $oldvar
        done
 }
 
@@ -148,7 +148,7 @@ config_foreach() {
        local type="$1"
        [ "$#" -ge 1 ] && shift
        local section cfgtype
-       
+
        [ -z "$CONFIG_SECTIONS" ] && return 0
        for section in ${CONFIG_SECTIONS}; do
                config_get cfgtype "$section" TYPE
index 453aabb..30d79a6 100644 (file)
@@ -160,7 +160,7 @@ struct uci_backend _var = {         \
 #define DPRINTF(...)
 #endif
 
-/* 
+/*
  * throw an uci exception and store the error number
  * in the context.
  */
@@ -217,7 +217,7 @@ struct uci_backend _var = {         \
 
 /**
  * UCI_INTERNAL: Do an internal call of a public API function
- * 
+ *
  * Sets Exception handling to passthrough mode.
  * Allows API functions to change behavior compared to public use
  */
@@ -228,7 +228,7 @@ struct uci_backend _var = {         \
 
 /**
  * UCI_NESTED: Do an normal nested call of a public API function
- * 
+ *
  * Sets Exception handling to passthrough mode.
  * Allows API functions to change behavior compared to public use
  */
index b68f1ae..b4f9518 100644 (file)
--- a/ucimap.c
+++ b/ucimap.c
@@ -13,7 +13,7 @@
  */
 
 /*
- * This file contains ucimap, an API for mapping UCI to C data structures 
+ * This file contains ucimap, an API for mapping UCI to C data structures
  */
 
 #include <strings.h>
index 8386fff..be813dc 100644 (file)
--- a/ucimap.h
+++ b/ucimap.h
@@ -13,7 +13,7 @@
  */
 
 /*
- * This file contains ucimap, an API for mapping UCI to C data structures 
+ * This file contains ucimap, an API for mapping UCI to C data structures
  */
 
 #ifndef __UCIMAP_H