openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r1707321 - in /openoffice/branches/AOO410: ./ main/ main/sal/osl/unx/profile.c main/sal/osl/w32/profile.cxx
Date Wed, 07 Oct 2015 14:47:48 GMT
Author: pfg
Date: Wed Oct  7 14:47:48 2015
New Revision: 1707321

URL: http://svn.apache.org/viewvc?rev=1707321&view=rev
Log:
MFT r1706649:
malloc + memset (0) --> calloc

Drop useless casts while here.

Discussed with:	security team

Modified:
    openoffice/branches/AOO410/   (props changed)
    openoffice/branches/AOO410/main/   (props changed)
    openoffice/branches/AOO410/main/sal/osl/unx/profile.c
    openoffice/branches/AOO410/main/sal/osl/w32/profile.cxx

Propchange: openoffice/branches/AOO410/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct  7 14:47:48 2015
@@ -2,5 +2,5 @@
 /openoffice/branches/ia2:1417739-1541842
 /openoffice/branches/ooxml-osba:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283
 /openoffice/branches/rejuvenate01:1480411,1534063,1534098,1536312,1549902,1560617
-/openoffice/trunk:1571617,1571619,1571677,1572577,1572587,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1607111,1607793,1607836,1608348,1608359,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611549,1612539,1612801,1621121,1623847,1623849-1623850,1642300-1642302,1647713,1654282,1669457,1669459,1669462-1669463,1669465,1689883,1689959,1690740,1690755,1690854,1694131-1694132,1694701,1702894,1702898,1702986,1702988,1705542-1705543,1705551
+/openoffice/trunk:1571617,1571619,1571677,1572577,1572587,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1607111,1607793,1607836,1608348,1608359,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611549,1612539,1612801,1621121,1623847,1623849-1623850,1642300-1642302,1647713,1654282,1669457,1669459,1669462-1669463,1669465,1689883,1689959,1690740,1690755,1690854,1694131-1694132,1694701,1702894,1702898,1702986,1702988,1705542-1705543,1705551,1706649
 /openoffice/trunk/main:1705369

Propchange: openoffice/branches/AOO410/main/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct  7 14:47:48 2015
@@ -2,4 +2,4 @@
 /openoffice/branches/ia2/main:1417739-1541842
 /openoffice/branches/ooxml-osba/main:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283
 /openoffice/branches/rejuvenate01/main:1480411,1534063,1534098,1536312,1549902,1560617
-/openoffice/trunk/main:1571617,1571677,1572569,1572577,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1603941,1604028,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1606706,1607111,1607793,1607836,1608348,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611470,1611549,1612070-1612071,1612539,1612801,1616457,1616944,1621121,1623847,1623849-1623850,1630814,1633294,1633297,1635806,1642300-1642302,1650314,1654282,1669457,1669459,1669462-1669463,1669465,1677190,1687177,1689883,1689959,1692551,1694132,1694701,1695962,1697807,1700078,1700135,1702894,170289
 8,1702986,1702988,1705193,1705196,1705199,1705276,1705364,1705368-1705369,1705542,1707167,1707169-1707170,1707175
+/openoffice/trunk/main:1571617,1571677,1572569,1572577,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1603941,1604028,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1606706,1607111,1607793,1607836,1608348,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611470,1611549,1612070-1612071,1612539,1612801,1616457,1616944,1621121,1623847,1623849-1623850,1630814,1633294,1633297,1635806,1642300-1642302,1650314,1654282,1669457,1669459,1669462-1669463,1669465,1677190,1687177,1689883,1689959,1692551,1694132,1694701,1695962,1697807,1700078,1700135,1702894,170289
 8,1702986,1702988,1705193,1705196,1705199,1705276,1705364,1705368-1705369,1705542,1706649,1707167,1707169-1707170,1707175

Modified: openoffice/branches/AOO410/main/sal/osl/unx/profile.c
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/sal/osl/unx/profile.c?rev=1707321&r1=1707320&r2=1707321&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/sal/osl/unx/profile.c (original)
+++ openoffice/branches/AOO410/main/sal/osl/unx/profile.c Wed Oct  7 14:47:48 2015
@@ -1526,8 +1526,7 @@ static sal_Char* addLine(osl_TProfileImp
         if (pProfile->m_Lines == NULL)
         {
             pProfile->m_MaxLines = LINES_INI;
-            pProfile->m_Lines = (sal_Char **)malloc(pProfile->m_MaxLines * sizeof(sal_Char
*));
-			memset(pProfile->m_Lines,0,pProfile->m_MaxLines * sizeof(sal_Char *));
+            pProfile->m_Lines = calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
         }
         else
         {
@@ -1568,8 +1567,7 @@ static sal_Char* insertLine(osl_TProfile
         if (pProfile->m_Lines == NULL)
         {
             pProfile->m_MaxLines = LINES_INI;
-            pProfile->m_Lines = (sal_Char **)malloc(pProfile->m_MaxLines * sizeof(sal_Char
*));
-			memset(pProfile->m_Lines,0,pProfile->m_MaxLines * sizeof(sal_Char *));
+            pProfile->m_Lines = calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
         }
         else
         {
@@ -1743,8 +1741,7 @@ static sal_Bool addSection(osl_TProfileI
         if (pProfile->m_Sections == NULL)
         {
             pProfile->m_MaxSections = SECTIONS_INI;
-            pProfile->m_Sections = (osl_TProfileSection *)malloc(pProfile->m_MaxSections
* sizeof(osl_TProfileSection));
-			memset(pProfile->m_Sections,0,pProfile->m_MaxSections * sizeof(osl_TProfileSection));
+            pProfile->m_Sections = calloc(pProfile->m_MaxSections, sizeof(osl_TProfileSection));
         }
         else
         {

Modified: openoffice/branches/AOO410/main/sal/osl/w32/profile.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/sal/osl/w32/profile.cxx?rev=1707321&r1=1707320&r2=1707321&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/sal/osl/w32/profile.cxx (original)
+++ openoffice/branches/AOO410/main/sal/osl/w32/profile.cxx Wed Oct  7 14:47:48 2015
@@ -1584,8 +1584,7 @@ static const sal_Char* addLine(osl_TProf
 		if (pProfile->m_Lines == NULL)
 		{
 			pProfile->m_MaxLines = LINES_INI;
-			pProfile->m_Lines = (sal_Char **)malloc(pProfile->m_MaxLines * sizeof(sal_Char *));
-			memset(pProfile->m_Lines,0,pProfile->m_MaxLines * sizeof(sal_Char *));
+			pProfile->m_Lines = calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
 		}
 		else
 		{
@@ -1626,8 +1625,7 @@ static const sal_Char* insertLine(osl_TP
 		if (pProfile->m_Lines == NULL)
 		{
 			pProfile->m_MaxLines = LINES_INI;
-			pProfile->m_Lines = (sal_Char **)malloc(pProfile->m_MaxLines * sizeof(sal_Char *));
-			memset(pProfile->m_Lines,0,pProfile->m_MaxLines * sizeof(sal_Char *));
+			pProfile->m_Lines = calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
 		}
 		else
 		{
@@ -1801,8 +1799,7 @@ static sal_Bool addSection(osl_TProfileI
 		if (pProfile->m_Sections == NULL)
 		{
 			pProfile->m_MaxSections = SECTIONS_INI;
-			pProfile->m_Sections = (osl_TProfileSection *)malloc(pProfile->m_MaxSections * sizeof(osl_TProfileSection));
-			memset(pProfile->m_Sections,0,pProfile->m_MaxSections * sizeof(osl_TProfileSection));
+			pProfile->m_Sections = calloc(pProfile->m_MaxSections, sizeof(osl_TProfileSection));
 		}
 		else
 		{



Mime
View raw message