Changeset 1081 in MondoRescue for trunk/mondo/src/common/libmondo-stream.c


Ignore:
Timestamp:
Jan 28, 2007, 11:20:07 PM (17 years ago)
Author:
Bruno Cornec
Message:

merge -r1078:1080 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/common/libmondo-stream.c

    r979 r1081  
    1313
    1414#include "my-stuff.h"
     15#include "mr_mem.h"
    1516#include "mondostructures.h"
    1617#include "libmondo-devices.h"
     
    106107    int i;
    107108
    108     blk = (char *) malloc(256 * 1024);
     109    blk = (char *) mr_malloc(256 * 1024);
    109110
    110111    log_it("closein_tape() -- entering");
     
    153154    char *blk;
    154155
    155     blk = (char *) malloc(256 * 1024);
     156    blk = (char *) mr_malloc(256 * 1024);
    156157
    157158    sleep(1);
     
    624625
    625626    assert_string_is_neither_NULL_nor_zerolength(bkpinfo->media_device);
    626     if (!(g_tapecatalog = malloc(sizeof(struct s_tapecatalog)))) {
    627         fatal_error("Cannot alloc mem for tape catalog");
    628     }
     627    g_tapecatalog = mr_malloc(sizeof(struct s_tapecatalog));
    629628    g_tapecatalog->entries = 0;
    630629    g_tape_posK = 0;
     
    658657        return (-1);
    659658    }
    660     if (!(datablock = (char *) malloc(256 * 1024))) {
    661         log_to_screen(_("Unable to malloc 256*1024"));
    662         exit(1);
    663     }
     659    datablock = (char *) mr_malloc(256 * 1024);
    664660    for (i = 0; i < 32; i++) {
    665661        for (j = 0; j < 4; j++) {
     
    726722    /*  initialise the catalog */
    727723    g_current_media_number = 1;
    728     if (!(g_tapecatalog = malloc(sizeof(struct s_tapecatalog)))) {
    729         fatal_error("Cannot alloc mem for tape catalog");
    730     }
     724    g_tapecatalog = mr_malloc(sizeof(struct s_tapecatalog));
    731725    g_tapecatalog->entries = 0;
    732726    /* log stuff */
     
    759753        return (0);
    760754    }
    761     if (!(g_tapecatalog = malloc(sizeof(struct s_tapecatalog)))) {
    762         fatal_error("Cannot alloc mem for tape catalog");
    763     }
     755    g_tapecatalog = mr_malloc(sizeof(struct s_tapecatalog));
    764756    g_tapecatalog->entries = 0;
    765757    g_tape_posK = 0;
     
    872864
    873865    /*@ init  ******************************************************* */
    874     datablock = malloc(TAPE_BLOCK_SIZE);
     866    datablock = mr_malloc(TAPE_BLOCK_SIZE);
    875867    crc16 = 0;
    876868    crctt = 0;
     
    1003995    /*@ end vars *************************************************** */
    1004996
    1005     tempblock = (char *) malloc((size_t) TAPE_BLOCK_SIZE);
     997    tempblock = (char *) mr_malloc((size_t) TAPE_BLOCK_SIZE);
    1006998
    1007999    for (i = 0; i < (int) TAPE_BLOCK_SIZE; i++) {
     
    11421134    long bytes_to_write;
    11431135
    1144     datablock = malloc(TAPE_BLOCK_SIZE);
     1136    datablock = mr_malloc(TAPE_BLOCK_SIZE);
    11451137    pB = strrchr(the_file_I_was_reading, '/');
    11461138    if (pB) {
Note: See TracChangeset for help on using the changeset viewer.