Print this page
XXXX update sendmail to 8.14.9

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sendmail/libsm/t-memstat.c
          +++ new/usr/src/cmd/sendmail/libsm/t-memstat.c
   1    1  /*
   2      - * Copyright (c) 2005-2007 Sendmail, Inc. and its suppliers.
        2 + * Copyright (c) 2005-2007 Proofpoint, Inc. and its suppliers.
   3    3   *      All rights reserved.
   4    4   *
   5    5   * By using this file, you agree to the terms and conditions set
   6    6   * forth in the LICENSE file which can be found at the top level of
   7    7   * the sendmail distribution.
   8    8   */
   9    9  
  10      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  11      -
  12   10  #include <sm/gen.h>
  13      -SM_IDSTR(id, "@(#)$Id: t-memstat.c,v 1.9 2007/03/14 21:41:09 ca Exp $")
       11 +SM_IDSTR(id, "@(#)$Id: t-memstat.c,v 1.11 2013-11-22 20:51:43 ca Exp $")
  14   12  
  15   13  #include <sm/misc.h>
  16   14  
  17   15  /*
  18   16  **  Simple test program for memstat
  19   17  */
  20   18  
  21   19  #include <stdlib.h>
  22   20  #include <unistd.h>
  23   21  #include <stdio.h>
↓ open down ↓ 34 lines elided ↑ open up ↑
  58   56                    case 'l':
  59   57                          l = strtol(optarg, NULL, 0);
  60   58                          break;
  61   59  
  62   60                    case 'm':
  63   61                          sz = strtol(optarg, NULL, 0);
  64   62                          break;
  65   63  
  66   64                    case 'r':
  67   65                          resource = strdup(optarg);
       66 +                        if (resource == NULL)
       67 +                        {
       68 +                                fprintf(stderr, "strdup(%s) failed\n",
       69 +                                        optarg);
       70 +                                exit(1);
       71 +                        }
  68   72                          break;
  69   73  
  70   74                    case 's':
  71   75                          slp = strtol(optarg, NULL, 0);
  72   76                          break;
  73   77  
  74   78                    default:
  75   79                          usage(argv[0]);
  76   80                          exit(1);
  77   81                  }
↓ open down ↓ 35 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX