|
@@ -5,17 +5,17 @@
|
|
|
#include "keyval.h"
|
|
|
|
|
|
keyval *keyval_new(char *key, void *value){
|
|
|
- keyval *out = malloc(sizeof(keyval));
|
|
|
- *out = (keyval){.key = strdup(key), .value=strdup(value)};
|
|
|
- return out;
|
|
|
+ keyval *out = malloc(sizeof(keyval));
|
|
|
+ *out = (keyval){.key = strdup(key), .value=strdup(value)};
|
|
|
+ return out;
|
|
|
}
|
|
|
|
|
|
|
|
|
the values in the old pair, not copies of their data. */
|
|
|
keyval *keyval_copy(keyval const *in){
|
|
|
- keyval *out = malloc(sizeof(keyval));
|
|
|
- *out = *in;
|
|
|
- return out;
|
|
|
+ keyval *out = malloc(sizeof(keyval));
|
|
|
+ *out = *in;
|
|
|
+ return out;
|
|
|
}
|
|
|
|
|
|
void keyval_free(keyval *in){
|
|
@@ -25,5 +25,5 @@ void keyval_free(keyval *in){
|
|
|
}
|
|
|
|
|
|
int keyval_matches(keyval const *in, char const *key){
|
|
|
- return !strcasecmp(in->key, key);
|
|
|
-}
|
|
|
+ return !strcasecmp(in->key, key);
|
|
|
+}
|