~ubuntu-branches/ubuntu/jaunty/monit/jaunty

« back to all changes in this revision

Viewing changes to xmalloc.c

  • Committer: Bazaar Package Importer
  • Author(s): Steinar H. Gunderson
  • Date: 2006-11-13 13:38:47 UTC
  • mfrom: (3.1.2 edgy)
  • Revision ID: james.westby@ubuntu.com-20061113133847-s552y2xbe1tiiqgy
Tags: 1:4.8.1-2.1
* Non-maintainer upload.
* monit-lfs.patch: Add LFS support; patch adapted from upstream CVS by
  Michael Mende. (Closes: #395164)
* Build-depend on automake and set some magical cdbs option to enable
  re-automaking, as monit-lfs.patch touches configure.ac.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright (C), 1998 by Eric S. Raymond.
3
 
 * Copyright (C), 2000-2005 by the monit project group.
 
3
 * Copyright (C), 2000-2006 by the monit project group.
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or
6
6
 * modify it under the terms of the GNU General Public License as
48
48
 *  @author Eric S. Raymond <esr@snark.thyrsus.com>
49
49
 *  @author Jan-Henrik Haukeland, <hauk@tildeslash.com>
50
50
 *
51
 
 *  @version \$Id: xmalloc.c,v 1.12 2005/01/06 20:51:49 martinp Exp $
 
51
 *  @version \$Id: xmalloc.c,v 1.14 2006/04/27 20:16:03 martinp Exp $
52
52
 *
53
53
 *  @file
54
54
 */
69
69
#if ! HAVE_MALLOC
70
70
    if ( n == 0) {
71
71
 
72
 
      log("%s: passed a broken malloc 0\n", prog);
 
72
      LogError("%s: passed a broken malloc 0\n", prog);
73
73
      exit(1);
74
74
 
75
75
    }
77
77
 
78
78
    if ( p == NULL ) {
79
79
      
80
 
      log("%s: malloc failed -- %s\n", prog, STRERROR);
 
80
      LogError("%s: malloc failed -- %s\n", prog, STRERROR);
81
81
      exit(1);
82
82
      
83
83
    }
93
93
    p= (void *)calloc(count, nbytes);
94
94
    if ( p == NULL ) {
95
95
      
96
 
      log("%s: malloc failed -- %s\n", prog, STRERROR);
 
96
      LogError("%s: malloc failed -- %s\n", prog, STRERROR);
97
97
      exit(1);
98
98
      
99
99
    }
143
143
  p= realloc(p, nbytes);
144
144
  if(p == NULL) {
145
145
    
146
 
    log("%s: realloc failed -- %s\n", prog, STRERROR);
 
146
    LogError("%s: realloc failed -- %s\n", prog, STRERROR);
147
147
    exit(1);
148
148
    
149
149
  }