diff options
| author | Greg Hudson <ghudson@mit.edu> | 2013-02-14 11:41:10 -0500 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2013-02-14 11:42:28 -0500 |
| commit | 6dda284554a869f7fa1e6d2a035df06c97f103ef (patch) | |
| tree | 6854b38ce7274b914b82b20bfb65eb8130df1ab8 /src/lib/kadm5 | |
| parent | 80f53c8b2c745e75dc9d22acba63812d8533c133 (diff) | |
Modernize k5buf
Rename the krb5int_buf_ family of functions to use the k5_ prefix for
brevity. Reformat some k5buf implementation code to match current
practices.
Diffstat (limited to 'src/lib/kadm5')
| -rw-r--r-- | src/lib/kadm5/alt_prof.c | 12 | ||||
| -rw-r--r-- | src/lib/kadm5/str_conv.c | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/kadm5/alt_prof.c b/src/lib/kadm5/alt_prof.c index 07158fcd5..bd1b8c82a 100644 --- a/src/lib/kadm5/alt_prof.c +++ b/src/lib/kadm5/alt_prof.c @@ -75,16 +75,16 @@ krb5_aprof_init(char *fname, char *envname, krb5_pointer *acontextp) return ret; if (envname == NULL || (kdc_config = getenv(envname)) == NULL) kdc_config = fname; - krb5int_buf_init_dynamic(&buf); + k5_buf_init_dynamic(&buf); if (kdc_config) - krb5int_buf_add(&buf, kdc_config); + k5_buf_add(&buf, kdc_config); for (i = 0; filenames[i] != NULL; i++) { - if (krb5int_buf_len(&buf) > 0) - krb5int_buf_add(&buf, ":"); - krb5int_buf_add(&buf, filenames[i]); + if (k5_buf_len(&buf) > 0) + k5_buf_add(&buf, ":"); + k5_buf_add(&buf, filenames[i]); } krb5_free_config_files(filenames); - profile_path = krb5int_buf_data(&buf); + profile_path = k5_buf_data(&buf); if (profile_path == NULL) return ENOMEM; profile = (profile_t) NULL; diff --git a/src/lib/kadm5/str_conv.c b/src/lib/kadm5/str_conv.c index cdd2786c1..a490f14c0 100644 --- a/src/lib/kadm5/str_conv.c +++ b/src/lib/kadm5/str_conv.c @@ -183,18 +183,18 @@ krb5_flags_to_string(flags, sep, buffer, buflen) pflags = 0; sepstring = (sep) ? sep : flags_default_sep; - krb5int_buf_init_fixed(&buf, buffer, buflen); + k5_buf_init_fixed(&buf, buffer, buflen); /* Blast through the table matching all we can */ for (i=0; i<flags_table_nents; i++) { if (flags & flags_table[i].fl_flags) { - if (krb5int_buf_len(&buf) > 0) - krb5int_buf_add(&buf, sepstring); - krb5int_buf_add(&buf, _(flags_table[i].fl_output)); + if (k5_buf_len(&buf) > 0) + k5_buf_add(&buf, sepstring); + k5_buf_add(&buf, _(flags_table[i].fl_output)); /* Keep track of what we matched */ pflags |= flags_table[i].fl_flags; } } - if (krb5int_buf_data(&buf) == NULL) + if (k5_buf_data(&buf) == NULL) return(ENOMEM); /* See if there's any leftovers */ |
