Browse Source

style: fix whitespace errors

Signed-off-by: Luka Perkov <luka@openwrt.org>
lede-17.01
Luka Perkov 7 years ago
committed by Felix Fietkau
parent
commit
f506323c30
6 changed files with 18 additions and 18 deletions
  1. +5
    -5
      delta.c
  2. +2
    -2
      list.c
  3. +6
    -6
      sh/uci.sh
  4. +3
    -3
      uci_internal.h
  5. +1
    -1
      ucimap.c
  6. +1
    -1
      ucimap.h

+ 5
- 5
delta.c View File

@ -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.

+ 2
- 2
list.c View File

@ -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;

+ 6
- 6
sh/uci.sh View File

@ -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

+ 3
- 3
uci_internal.h View 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
*/

+ 1
- 1
ucimap.c View File

@ -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>

+ 1
- 1
ucimap.h View File

@ -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

Loading…
Cancel
Save