diff options
author | Theodore Tso <tytso@mit.edu> | 1991-08-20 19:18:43 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1991-08-20 19:18:43 +0000 |
commit | f9ba7af545c43145745060c557e24f3bbd2fa996 (patch) | |
tree | 95c2fb2dc50a2b95e0b3788e1fa25c6c9fc8d200 /src/admin | |
parent | de000cc4c310b772936a5a12f2a47be847778c7f (diff) | |
download | krb5-f9ba7af545c43145745060c557e24f3bbd2fa996.tar.gz krb5-f9ba7af545c43145745060c557e24f3bbd2fa996.tar.xz krb5-f9ba7af545c43145745060c557e24f3bbd2fa996.zip |
Fixed spelling mistakes
Change to avoid fscanf() into a character array; make it go into a temporary
variable first, and then copy it in, character by character.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2190 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/admin')
-rw-r--r-- | src/admin/edit/dump.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/admin/edit/dump.c b/src/admin/edit/dump.c index 16098e3ae..25b001cd0 100644 --- a/src/admin/edit/dump.c +++ b/src/admin/edit/dump.c @@ -193,6 +193,7 @@ void load_db(argc, argv) int load_error = 0; int lineno = 0; int stype, slength; + int align; char buf[64]; /* Must be longer than ld_vers */ if (argc != 3) { @@ -249,14 +250,14 @@ void load_db(argc, argv) break; if (!(name = malloc(name_len+1))) { com_err(argv[0], errno, - "While allocating speace for name"); + "While allocating space for name"); load_error++; break; } if (!(mod_name = malloc(mod_name_len+1))) { free(name); com_err(argv[0], errno, - "While allocating speace for name"); + "While allocating space for name"); load_error++; break; } @@ -270,17 +271,18 @@ void load_db(argc, argv) free(name); free(mod_name); com_err(argv[0], errno, - "While allocating speace for name"); + "While allocating space for name"); load_error++; break; } for (i=0; i<entry.key.length; i++) { - if (fscanf(f,"%02x", entry.key.contents+i) != 1) { + if (fscanf(f,"%02x", &align) != 1) { fprintf(stderr, "Couldn't parse line #%d\n", lineno); load_error++; break; } + entry.key.contents[i] = align; } if (fscanf(f, "\t%u\t%u\t%u\t%u\t%u\t%s\t%u\t%u\t%u\t%u\t", &entry.kvno, &entry.max_life, @@ -301,19 +303,20 @@ void load_db(argc, argv) free(mod_name); xfree(entry.key.contents); com_err(argv[0], errno, - "While allocating speace for the salt"); + "While allocating space for the salt"); load_error++; break; } } else entry.salt = 0; for (i=0; i <entry.salt_length; i++) { - if (fscanf(f, "%02x", entry.salt+i) != 1) { + if (fscanf(f, "%02x", &align) != 1) { fprintf(stderr, "Couldn't parse line #%d\n", lineno); load_error++; break; } + entry.salt[i] = align; } if (((ch = fgetc(f)) != ';') || ((ch = fgetc(f)) != '\n')) { fprintf(stderr, "Ignoring trash at end of entry: "); |