'Fixed' issue #8; but done so by introducing a goto. Not entirely happy about this.
This commit is contained in:
parent
dc5cac0bd8
commit
a20c956288
11 changed files with 63 additions and 53 deletions
|
|
@ -67,7 +67,7 @@ struct cons_page *conspages[NCONSPAGES];
|
|||
void make_cons_page( ) {
|
||||
struct cons_page *result = NULL;
|
||||
|
||||
if ( initialised_cons_pages < NCONSPAGES) {
|
||||
if ( initialised_cons_pages < NCONSPAGES ) {
|
||||
result = malloc( sizeof( struct cons_page ) );
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,9 @@ void make_cons_page( ) {
|
|||
initialised_cons_pages++;
|
||||
} else {
|
||||
fwide( stderr, 1 );
|
||||
fwprintf( stderr, L"FATAL: Failed to allocate memory for cons page %d\n", initialised_cons_pages );
|
||||
fwprintf( stderr,
|
||||
L"FATAL: Failed to allocate memory for cons page %d\n",
|
||||
initialised_cons_pages );
|
||||
exit( 1 );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue