Navigation


Changeset 730:e21d79595045 in freeDiameter for libfdproto/ostr.c


Ignore:
Timestamp:
Feb 24, 2011, 5:19:42 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

minor improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/ostr.c

    r719 r730  
    4141#endif /* !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT) */
    4242
    43 /* Similar to strdup with (must be verified) os0_t */
     43/* Similar to strdup with (must have been verified) os0_t */
    4444os0_t os0dup_int(os0_t s, size_t l) {
    4545        os0_t r;
    46         CHECK_MALLOC_DO( r = calloc(l+1, 1), return NULL );
     46        CHECK_MALLOC_DO( r = malloc(l+1), return NULL );
    4747        memcpy(r, s, l); /* this might be faster than a strcpy or strdup because it can work with 32 or 64b blocks */
     48        r[l] = '\0';
    4849        return r;
    4950}
Note: See TracChangeset for help on using the changeset viewer.