~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to lib/strdup.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-04-02 23:35:45 UTC
  • mto: (1.2.1 upstream) (3.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20090402233545-geixkwhe3izccjt7
Tags: upstream-7.19.4
ImportĀ upstreamĀ versionĀ 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: strdup.c,v 1.5 2008-02-06 19:01:13 yangtse Exp $
 
21
 * $Id: strdup.c,v 1.6 2008-09-06 05:29:06 yangtse Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
38
38
  if(len >= ((size_t)-1) / sizeof(char))
39
39
    return (char *)NULL;
40
40
 
41
 
  newstr = (char *) malloc((len+1)*sizeof(char));
 
41
  newstr = malloc((len+1)*sizeof(char));
42
42
  if(!newstr)
43
43
    return (char *)NULL;
44
44