~ubuntu-branches/ubuntu/natty/curl/natty-security

« back to all changes in this revision

Viewing changes to lib/splay.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2010-06-20 13:56:28 UTC
  • mfrom: (3.4.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100620135628-e30tp9jldq6hq985
Tags: 7.21.0-1ubuntu1
* Merge from debian unstable.  Remaining changes: LP: #596334
  - Keep build deps in main:
    - Drop build dependencies: stunnel, libssh2-1-dev
    - Add build-dependency on openssh-server
    - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

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: splay.c,v 1.13 2009-06-10 02:49:43 yangtse Exp $
22
21
 ***************************************************************************/
23
22
 
24
23
#include "setup.h"
395
394
  for (i = 0; i < MAX; i++) {
396
395
    struct timeval key;
397
396
    ptrs[i] = t = malloc(sizeof(struct Curl_tree));
 
397
    if(!t) {
 
398
      puts("out of memory!");
 
399
      return 0;
 
400
    }
398
401
 
399
402
    key.tv_sec = 0;
400
403
#ifdef TEST2
406
409
#endif
407
410
 
408
411
    t->payload = (void *)key.tv_usec; /* for simplicity */
409
 
    if(!t) {
410
 
      puts("out of memory!");
411
 
      return 0;
412
 
    }
413
412
    root = Curl_splayinsert(key, root, t);
414
413
  }
415
414