Skip to content

Commit

Permalink
update TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
kodebach committed Oct 2, 2020
1 parent 529c2ec commit 8390278
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/bindings/cpp/tests/testcpp_contextual_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ TEST_F (test_contextual_update, syncCache)

TEST_F (test_contextual_update, notifyAllEvents)
{
/* TODO (kodebach): optimization doesn't work, default vs cascading names in updateContext
/* FIXME (kodebach): optimization doesn't work, default vs cascading names in updateContext
ks.append (Key ("default:/%/key", KEY_VALUE, "133", KEY_END));
c.notifyAllEvents ();
Expand Down
3 changes: 1 addition & 2 deletions src/libs/elektra/keyname.c
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,6 @@ ssize_t keyGetBaseName (const Key * key, char * returned, size_t maxSize)

size_t elektraKeyNameEscapePart (const char * part, char ** escapedPart)
{
// TODO (kodebach): array parts
if (!part) return 0;

size_t partLen = strlen (part);
Expand Down Expand Up @@ -1747,7 +1746,7 @@ elektraNamespace keyGetNamespace (const Key * key)
// TODO (kodebach): replace ssize_t with size_t?
ssize_t keySetNamespace (Key * key, elektraNamespace ns)
{
// TODO (kodebach): document and correct escaped key, lock?
// TODO (kodebach): document
if (!key) return -1;
if (ns == KEY_NS_NONE || ns == KEY_NS_EMPTY) return -1;

Expand Down
8 changes: 4 additions & 4 deletions src/libs/elektra/keyset.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ static int keyCompareByOwner (const void * p1, const void * p2)
{
Key * key1 = *(Key **) p1;
Key * key2 = *(Key **) p2;
const char * owner1 = keyValue (keyGetMeta (key1, "owner")); // TODO (kodebach): use keyString
const char * owner2 = keyValue (keyGetMeta (key2, "owner")); // TODO (kodebach): use keyString
const char * owner1 = keyValue (keyGetMeta (key1, "owner"));
const char * owner2 = keyValue (keyGetMeta (key2, "owner"));
if (!owner1 && !owner2) return 0;
if (!owner1) return -1;
if (!owner2) return 1;
Expand Down Expand Up @@ -1126,7 +1126,7 @@ KeySet * ksCut (KeySet * ks, const Key * cutpoint)
if (!ks->array) return ksNew (0, KS_END);

char * name = cutpoint->key;
if (!name) return 0; // TODO (kodebach): not required?
if (!name) return 0;
if (strcmp (name, "") == 0) return 0;

elektraOpmphmInvalidate (ks);
Expand Down Expand Up @@ -1167,7 +1167,7 @@ KeySet * ksCut (KeySet * ks, const Key * cutpoint)
((Key *) cutpoint)->ukey[0] = KEY_NS_CASCADING;

// now look for cascading keys
// TODO (kodebach): (fix me) cascading keys shouldn't be allowed in KeySet anymore
// TODO (kodebach): cascading keys shouldn't be allowed in KeySet anymore
}

set_cursor = elektraKsFindCutpoint (ks, cutpoint, &it, &found);
Expand Down
1 change: 0 additions & 1 deletion src/plugins/ini/ini.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ static int elektraKeyAppendLine (Key * target, const char * line)
return keyGetValueSize (target);
}

// TODO (kodebach): use something else
static char * keyNameGetOneLevel (const char * name, size_t * size)
{
char * real = (char *) name;
Expand Down

0 comments on commit 8390278

Please sign in to comment.