/[gxemul]/trunk/src/devices/dev_prep.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_prep.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_prep.c,v 1.10 2007/02/11 10:03:55 debug Exp $   *  $Id: dev_prep.c,v 1.11 2007/06/15 19:57:33 debug Exp $
29   *   *
30   *  PReP mainbus.   *  COMMENT: PReP machine mainbus (ISA bus + interrupt controller)
  *  
  *  o)  ISA bus  
  *  o)  Interrupt controller  
31   */   */
32    
33  #include <stdio.h>  #include <stdio.h>
# Line 75  DEVINIT(prep) Line 72  DEVINIT(prep)
72  {  {
73          struct prep_data *d;          struct prep_data *d;
74    
75          d = malloc(sizeof(struct prep_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct prep_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
76          memset(d, 0, sizeof(struct prep_data));          memset(d, 0, sizeof(struct prep_data));
77    
78          memory_device_register(devinit->machine->memory, devinit->name,          memory_device_register(devinit->machine->memory, devinit->name,

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26