prof_get.c (profile_get_values): If there are no relations found,
authorTheodore Tso <tytso@mit.edu>
Tue, 17 Nov 1998 22:38:20 +0000 (22:38 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 17 Nov 1998 22:38:20 +0000 (22:38 +0000)
return PROF_NO_RELATION, instead of an empty list.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11043 dc483132-0cff-0310-8789-dd5450dbe970

src/util/profile/ChangeLog
src/util/profile/prof_get.c

index 21dd99016d1e040f831a9d42dc35df85215c1a0e..a0a48dad3ed2720d7eee9eb58cf0f685589b5db5 100644 (file)
@@ -1,3 +1,8 @@
+1998-11-17  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * prof_get.c (profile_get_values): If there are no relations
+               found, return PROF_NO_RELATION, instead of an empty list.
+
 1998-11-13  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * Makefile.in: Set the myfulldir and mydir variables (which are
index 2613127b7e33a473ae8dad50cb513e12ced010b0..7f1d3c5ce4a274782e8dc12580ce15b9757fb3e5 100644 (file)
@@ -162,6 +162,11 @@ profile_get_values(profile, names, ret_values)
                        add_to_list(&values, value);
        } while (state);
 
+       if (values.num == 0) {
+               retval = PROF_NO_RELATION;
+               goto cleanup;
+       }
+
        end_list(&values, ret_values);
        return 0;