From: Ken Raeburn Date: Wed, 21 Jul 1999 21:26:11 +0000 (+0000) Subject: * init_os_ctx.c (os_get_default_config_files): Fix some typos and missed name X-Git-Tag: krb5-1.1-beta1~51 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5067f62b3209251ae0581c63a60390b5c52ba7c8;p=krb5.git * init_os_ctx.c (os_get_default_config_files): Fix some typos and missed name changes in the patch Miro just checked in but forgot to mention here, in which Mac filespecs are used instead of filenames. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11572 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 64f321349..1808b11ba 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,10 @@ +1999-07-21 Ken Raeburn + + * init_os_ctx.c (os_get_default_config_files): Fix some typos and + missed name changes in the patch Miro just checked in but forgot + to mention here, in which Mac filespecs are used instead of + filenames. + 1999-06-30 Ken Raeburn * locate_kdc.c (krb5_locate_kdc): Kerberos admin service name is diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index f1b4f62c7..0a51429ba 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -195,7 +195,7 @@ free_filespecs(files) static krb5_error_code os_get_default_config_files(pfiles, secure) - profile_filespect** pfiles; + profile_filespec_t ** pfiles; krb5_boolean secure; { profile_filespec_t* files; @@ -279,33 +279,33 @@ os_get_default_config_files(pfiles, secure) } /* the array is NULL terminated */ - filenames = (char**) malloc((n_entries+1) * sizeof(char*)); - if (filenames == 0) + files = (char**) malloc((n_entries+1) * sizeof(char*)); + if (files == 0) return ENOMEM; /* measure, copy, and skip each one */ for(s = filepath, i=0; (t = strchr(s, ':')) || (t=s+strlen(s)); s=t+1, i++) { ent_len = t-s; - filenames[i] = (char*) malloc(ent_len + 1); - if (filenames[i] == 0) { + files[i] = (char*) malloc(ent_len + 1); + if (files[i] == 0) { /* if malloc fails, free the ones that worked */ - while(--i >= 0) free(filenames[i]); - free(filenames); + while(--i >= 0) free(files[i]); + free(files); return ENOMEM; } - strncpy(filenames[i], s, ent_len); - filenames[i][ent_len] = 0; + strncpy(files[i], s, ent_len); + files[i][ent_len] = 0; if (*t == 0) { i++; break; } } /* cap the array */ - filenames[i] = 0; + files[i] = 0; #endif /* !_MSDOS && !_WIN32 */ #endif /* !macintosh */ - *pfilenames = filenames; + *pfiles = files; return 0; }