mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47:31 +09:00
update NSPR to 4.24 and keep NSPR Bug 1586070 and win64 patch intact.
This commit is contained in:
parent
dd094ae552
commit
0b9855b841
487 changed files with 42933 additions and 48679 deletions
|
|
@ -13,13 +13,16 @@ PL_strdup(const char *s)
|
|||
char *rv;
|
||||
size_t n;
|
||||
|
||||
if( (const char *)0 == s )
|
||||
if( (const char *)0 == s ) {
|
||||
s = "";
|
||||
}
|
||||
|
||||
n = strlen(s) + 1;
|
||||
|
||||
rv = (char *)malloc(n);
|
||||
if( (char *)0 == rv ) return rv;
|
||||
if( (char *)0 == rv ) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
(void)memcpy(rv, s, n);
|
||||
|
||||
|
|
@ -38,13 +41,16 @@ PL_strndup(const char *s, PRUint32 max)
|
|||
char *rv;
|
||||
size_t l;
|
||||
|
||||
if( (const char *)0 == s )
|
||||
if( (const char *)0 == s ) {
|
||||
s = "";
|
||||
}
|
||||
|
||||
l = PL_strnlen(s, max);
|
||||
|
||||
rv = (char *)malloc(l+1);
|
||||
if( (char *)0 == rv ) return rv;
|
||||
if( (char *)0 == rv ) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
(void)memcpy(rv, s, l);
|
||||
rv[l] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue