[readline] Add init_editstring() wrapper function

Standardise on using init_editstring() to initialise an embedded
editable string, to match the coding style used by other embedded
objects.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2011-03-29 16:34:07 +01:00
parent 293e347a2e
commit 6a6dd5c452
3 changed files with 15 additions and 4 deletions

View File

@@ -93,8 +93,7 @@ char * readline ( const char *prompt ) {
printf ( "%s", prompt );
memset ( &string, 0, sizeof ( string ) );
string.buf = buf;
string.len = sizeof ( buf );
init_editstring ( &string, buf, sizeof ( buf ) );
buf[0] = '\0';
while ( 1 ) {