Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Mar 1, 2023
1 parent 0caff97 commit b88f9a9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
7 changes: 4 additions & 3 deletions src/tools/kdb/set.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ int execSet (KeySet * options, Key * errorKey)

Key * parentKey = keyNew (name, KEY_END);

if (keyGetNamespace (parentKey) == KEY_NS_NONE || keyGetNamespace (parentKey) == KEY_NS_CASCADING) {
if (keyGetNamespace (parentKey) == KEY_NS_NONE || keyGetNamespace (parentKey) == KEY_NS_CASCADING)
{
ret = 1;
ELEKTRA_SET_VALIDATION_SYNTACTIC_ERROR (errorKey, "key does not specify a namespace");
elektraFree ((void*) name);
elektraFree ((void *) name);
keyDel (parentKey);
return ret;
}
Expand Down Expand Up @@ -95,7 +96,7 @@ int execSet (KeySet * options, Key * errorKey)
{
printf ("\n");
}
elektraFree ((void*) name);
elektraFree ((void *) name);
keyDel (parentKey);
ksDel (conf);
kdbClose (handle, errorKey);
Expand Down
38 changes: 19 additions & 19 deletions src/tools/kdb/set.h
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
/**
* @file
*
* @brief KDB set subcommand header
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
* @file
*
* @brief KDB set subcommand header
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/

#ifndef ELEKTRA_KDB_SET_H
#define ELEKTRA_KDB_SET_H

#include <kdb.h>

/**
* Adds options specification of set command to keySet
*
* @param spec the base spec where the commands spec should be added
*/
* Adds options specification of set command to keySet
*
* @param spec the base spec where the commands spec should be added
*/
void addSetSpec (KeySet * spec);

/**
* Runs the set command
*
* @param options cli options and arguments as specified in addSetSpec()
* @param errorKey key where errors and warnings should be saved
*
* @retval 0 set command ran without errors
* @retval 1 errors occurred, keySetMeta (errorKey, "error/reason") for info
*
*/
* Runs the set command
*
* @param options cli options and arguments as specified in addSetSpec()
* @param errorKey key where errors and warnings should be saved
*
* @retval 0 set command ran without errors
* @retval 1 errors occurred, keySetMeta (errorKey, "error/reason") for info
*
*/
int execSet (KeySet * options, Key * errorKey);

#endif // ELEKTRA_KDB_SET_H

0 comments on commit b88f9a9

Please sign in to comment.