From be4847fe057db23d0412faca6614227fb5c01a9f Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 17 Nov 1998 22:38:20 +0000 Subject: [PATCH] prof_get.c (profile_get_values): If there are no relations found, 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 | 5 +++++ src/util/profile/prof_get.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 21dd99016..a0a48dad3 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,8 @@ +1998-11-17 Theodore Ts'o + + * 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 * Makefile.in: Set the myfulldir and mydir variables (which are diff --git a/src/util/profile/prof_get.c b/src/util/profile/prof_get.c index 2613127b7..7f1d3c5ce 100644 --- a/src/util/profile/prof_get.c +++ b/src/util/profile/prof_get.c @@ -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; -- 2.26.2