]> git.tuebingen.mpg.de Git - adu.git/blobdiff - adu.c
Get rid of the rbtree for the name column.
[adu.git] / adu.c
diff --git a/adu.c b/adu.c
index 8f5ff8d655b439191108d372459fe15a153ec64d..b025e2ff2162acc81489f1bfc8cb39708d2297c0 100644 (file)
--- a/adu.c
+++ b/adu.c
@@ -167,29 +167,6 @@ static int size_compare(const struct osl_object *obj1, const struct osl_object *
        return NUM_COMPARE(obj2->data, obj1->data);
 }
 
        return NUM_COMPARE(obj2->data, obj1->data);
 }
 
-/**
- * Compare two osl objects of string type.
- *
- * \param obj1 Pointer to the first object.
- * \param obj2 Pointer to the second object.
- *
- * In any case, only \p MIN(obj1->size, obj2->size) characters of each string
- * are taken into account.
- *
- * \return It returns an integer less than, equal to, or greater than zero if
- * \a obj1 is found, respectively, to be less than, to match, or be greater
- * than obj2.
- *
- * \sa strcmp(3), strncmp(3), osl_compare_func.
- */
-static int string_compare(const struct osl_object *obj1,
-               const struct osl_object *obj2)
-{
-       const char *str1 = (const char *)obj1->data;
-       const char *str2 = (const char *)obj2->data;
-       return strncmp(str1, str2, MIN(obj1->size, obj2->size));
-}
-
 /**
  * Compare two osl objects pointing to unsigned integers of 64 bit size.
  *
 /**
  * Compare two osl objects pointing to unsigned integers of 64 bit size.
  *
@@ -230,9 +207,8 @@ enum dir_table_columns {
 static struct osl_column_description dir_table_cols[] = {
        [DT_NAME] = {
                .storage_type = OSL_MAPPED_STORAGE,
 static struct osl_column_description dir_table_cols[] = {
        [DT_NAME] = {
                .storage_type = OSL_MAPPED_STORAGE,
-               .storage_flags = OSL_RBTREE | OSL_UNIQUE,
+               .storage_flags = 0,
                .name = "dir",
                .name = "dir",
-               .compare_function = string_compare,
        },
        [DT_NUM] = {
                .storage_type = OSL_MAPPED_STORAGE,
        },
        [DT_NUM] = {
                .storage_type = OSL_MAPPED_STORAGE,