Base 666: Move logic into decoding function
@@ -21,7 +21,7 @@ int decode (Key * key, Key * parent)
{
const char * strVal = keyString (key);
- if (!keyGetMeta (key, "type") || strcmp (keyValue (keyGetMeta (key, "type")), "binary")) return 1;
+ if (keyIsString (key) == 0 || !keyGetMeta (key, "type") || strcmp (keyValue (keyGetMeta (key, "type")), "binary")) return 1;
ELEKTRA_LOG_DEBUG ("Decode binary value");
@@ -93,12 +93,9 @@ int elektraBase666Get (Plugin * handle ELEKTRA_UNUSED, KeySet * keySet, Key * pa
ksRewind (keySet);
int status = 0;
while (status >= 0 && (key = ksNext (keySet)))
- {
- if (keyIsString (key) == 1)
{
status = decode (key, parent);
}
- }
return status;
}
