svn rev #24595: trunk/src/lib/krb5/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Wed Jan 12 18:31:58 EST 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=24595
Commit By: ghudson
Log Message:
In krb5_set_realm():
* Return EINVAL and ENOMEM correctly.
* Accept an empty realm instead of returning EINVAL.
* Wrap a long line.
Changed Files:
U trunk/src/lib/krb5/krb/set_realm.c
Modified: trunk/src/lib/krb5/krb/set_realm.c
===================================================================
--- trunk/src/lib/krb5/krb/set_realm.c 2011-01-12 22:00:40 UTC (rev 24594)
+++ trunk/src/lib/krb5/krb/set_realm.c 2011-01-12 23:31:58 UTC (rev 24595)
@@ -28,18 +28,19 @@
#include "k5-int.h"
krb5_error_code KRB5_CALLCONV
-krb5_set_principal_realm(krb5_context context, krb5_principal principal, const char *realm)
+krb5_set_principal_realm(krb5_context context, krb5_principal principal,
+ const char *realm)
{
size_t length;
char *newrealm;
- if (!realm || !*realm)
- return -EINVAL;
+ if (!realm)
+ return EINVAL;
length = strlen(realm);
newrealm = strdup(realm);
if (!newrealm)
- return -ENOMEM;
+ return ENOMEM;
(void) free(krb5_princ_realm(context,principal)->data);
More information about the cvs-krb5
mailing list