diff options
author | David Robillard <d@drobilla.net> | 2012-01-15 22:56:27 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-01-15 22:56:27 +0000 |
commit | bf86a25f33f9cb53769294e2f874f484781a37c1 (patch) | |
tree | 204ffa5dc222465cec3e1423b0a2fa32cc8738be | |
parent | 9a149b2514be527af94b33237c5ebac42c319286 (diff) | |
download | lilv-bf86a25f33f9cb53769294e2f874f484781a37c1.tar.gz lilv-bf86a25f33f9cb53769294e2f874f484781a37c1.tar.bz2 lilv-bf86a25f33f9cb53769294e2f874f484781a37c1.zip |
Shrink code.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3951 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/state.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/src/state.c b/src/state.c index ca71b28..9f2b738 100644 --- a/src/state.c +++ b/src/state.c @@ -66,39 +66,34 @@ struct LilvStateImpl { static int abs_cmp(const void* a, const void* b, void* user_data) { - return strcmp(((const PathMap*)a)->abs, - ((const PathMap*)b)->abs); + return strcmp(((const PathMap*)a)->abs, ((const PathMap*)b)->abs); } static int rel_cmp(const void* a, const void* b, void* user_data) { - return strcmp(((const PathMap*)a)->rel, - ((const PathMap*)b)->rel); -} - -static void -path_rel_free(void* ptr) -{ - free(((PathMap*)ptr)->abs); - free(((PathMap*)ptr)->rel); - free(ptr); + return strcmp(((const PathMap*)a)->rel, ((const PathMap*)b)->rel); } static int property_cmp(const void* a, const void* b) { - const Property* pa = (const Property*)a; - const Property* pb = (const Property*)b; - return pa->key - pb->key; + return ((const Property*)a)->key - ((const Property*)b)->key; } static int value_cmp(const void* a, const void* b) { - const PortValue* pa = (const PortValue*)a; - const PortValue* pb = (const PortValue*)b; - return strcmp(pa->symbol, pb->symbol); + return strcmp(((const PortValue*)a)->symbol, + ((const PortValue*)b)->symbol); +} + +static void +path_rel_free(void* ptr) +{ + free(((PathMap*)ptr)->abs); + free(((PathMap*)ptr)->rel); + free(ptr); } static PortValue* |