Skip to content
Snippets Groups Projects
Commit 8a1428e1 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

lib_commons: some cleanup

parent 01b065e0
No related branches found
No related tags found
No related merge requests found
/** @file libcommons.c */
#include "lib_commons.h"
struct key_exchange *prep_key_obj(char *current, char *desired)
{
struct key_exchange *obj;
if (current[0] == '\0' || desired[0] == '\0')
goto fail;
obj = calloc(1, sizeof(struct key_exchange));
if (!obj)
goto fail;
obj->current_key = current;
obj->desired_key = desired;
return obj;
fail:
return NULL;
}
size_t write_func(void *buffer, size_t size, size_t nmemb, void *data)
{
struct string *str = (struct string *)data;
......
......@@ -8,14 +8,6 @@
#include "keys.h"
/**
* Struct used to provide consistent keys to ubus.
*/
struct key_exchange {
char *current_key; /*!< Current key to be altered. */
char *desired_key; /*!< Key to use. */
};
#define HARDWARE_VERSION_Z "hardware_version"
#define HARDWARE_VERSION_H ""
#define HARDWARE_VERSION "hardware_version"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment