Bug 792581 - part 11: Replace LL_MUL macro with multiplication operator. r=ehsan
authorAndrew Quartey <andrew.quartey@gmail.com>
Fri, 05 Oct 2012 01:05:28 -0400
changeset 109327 05cd1044c8c7a3b710a7a61e74872dfb606fbe27
parent 109326 4c3f56cede8326179c22d22e7f4e5d11d3b80889
child 109328 ee43ffdf7dde90ba1a84f2786ef5837c9a4669f2
push idunknown
push userunknown
push dateunknown
reviewersehsan
bugs792581
milestone18.0a1
Bug 792581 - part 11: Replace LL_MUL macro with multiplication operator. r=ehsan
content/base/src/nsDocument.cpp
netwerk/cache/nsCache.cpp
netwerk/protocol/about/nsAboutCache.cpp
netwerk/protocol/about/nsAboutCacheEntry.cpp
netwerk/streamconv/converters/ParseFTPList.cpp
rdf/datasource/src/nsFileSystemDataSource.cpp
security/manager/ssl/src/nsCRLManager.cpp
tools/trace-malloc/spacetrace.c
tools/trace-malloc/tmfrags.c
tools/trace-malloc/tmstats.c
xpcom/ds/nsCRT.cpp
xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -6863,17 +6863,17 @@ nsDocument::RetrieveRelevantHeaders(nsIC
       fileChannel->GetFile(getter_AddRefs(file));
       if (file) {
         PRTime msecs;
         rv = file->GetLastModifiedTime(&msecs);
 
         if (NS_SUCCEEDED(rv)) {
           int64_t intermediateValue;
           LL_I2L(intermediateValue, PR_USEC_PER_MSEC);
-          LL_MUL(modDate, msecs, intermediateValue);
+          modDate = msecs * intermediateValue;
         }
       }
     } else {
       nsAutoCString contentDisp;
       rv = aChannel->GetContentDispositionHeader(contentDisp);
       if (NS_SUCCEEDED(rv)) {
         SetHeaderData(nsGkAtoms::headerContentDisposition,
                       NS_ConvertASCIItoUTF16(contentDisp));
--- a/netwerk/cache/nsCache.cpp
+++ b/netwerk/cache/nsCache.cpp
@@ -58,17 +58,17 @@ SecondsFromPRTime(PRTime prTime)
 PRTime
 PRTimeFromSeconds(uint32_t seconds)
 {
   int64_t microSecondsPerSecond, intermediateResult;
   PRTime  prTime;
 
   LL_I2L(microSecondsPerSecond, PR_USEC_PER_SEC);
   LL_UI2L(intermediateResult, seconds);
-  LL_MUL(prTime, intermediateResult, microSecondsPerSecond);
+  prTime = intermediateResult * microSecondsPerSecond;
   return prTime;
 }
 
 
 nsresult
 ClientIDFromCacheKey(const nsACString&  key, char ** result)
 {
     nsresult  rv = NS_OK;
--- a/netwerk/protocol/about/nsAboutCache.cpp
+++ b/netwerk/protocol/about/nsAboutCache.cpp
@@ -18,17 +18,17 @@
 
 #include "nsICacheService.h"
 
 static PRTime SecondsToPRTime(uint32_t t_sec)
 {
     PRTime t_usec, usec_per_sec;
     LL_I2L(t_usec, t_sec);
     LL_I2L(usec_per_sec, PR_USEC_PER_SEC);
-    LL_MUL(t_usec, t_usec, usec_per_sec);
+    t_usec *= usec_per_sec;
     return t_usec;
 }
 static void PrintTimeString(char *buf, uint32_t bufsize, uint32_t t_sec)
 {
     PRExplodedTime et;
     PRTime t_usec = SecondsToPRTime(t_sec);
     PR_ExplodeTime(t_usec, PR_LocalTimeParameters, &et);
     PR_FormatTime(buf, bufsize, "%Y-%m-%d %H:%M:%S", &et);
--- a/netwerk/protocol/about/nsAboutCacheEntry.cpp
+++ b/netwerk/protocol/about/nsAboutCacheEntry.cpp
@@ -175,17 +175,17 @@ nsAboutCacheEntry::OpenCacheEntry(nsIURI
 // helper methods
 //-----------------------------------------------------------------------------
 
 static PRTime SecondsToPRTime(uint32_t t_sec)
 {
     PRTime t_usec, usec_per_sec;
     LL_I2L(t_usec, t_sec);
     LL_I2L(usec_per_sec, PR_USEC_PER_SEC);
-    LL_MUL(t_usec, t_usec, usec_per_sec);
+    t_usec *= usec_per_sec;
     return t_usec;
 }
 static void PrintTimeString(char *buf, uint32_t bufsize, uint32_t t_sec)
 {
     PRExplodedTime et;
     PRTime t_usec = SecondsToPRTime(t_sec);
     PR_ExplodeTime(t_usec, PR_LocalTimeParameters, &et);
     PR_FormatTime(buf, bufsize, "%Y-%m-%d %H:%M:%S", &et);
--- a/netwerk/streamconv/converters/ParseFTPList.cpp
+++ b/netwerk/streamconv/converters/ParseFTPList.cpp
@@ -127,17 +127,17 @@ int ParseFTPList(const char *line, struc
             {
               while (pos < linelen && isdigit(line[pos]))
                 pos++;
               if (pos < linelen && line[pos] == ',')
               {
                 PRTime t;
                 PRTime seconds;
                 PR_sscanf(p+1, "%llu", &seconds);
-                LL_MUL(t, seconds, PR_USEC_PER_SEC);
+                t = seconds * PR_USEC_PER_SEC;
                 PR_ExplodeTime(t, PR_LocalTimeParameters, &(result->fe_time) );
               }
             }
           }
           else if (*p == 's')
           {
             if (isdigit(line[pos]))
             {
@@ -484,17 +484,17 @@ int ParseFTPList(const char *line, struc
                * than not showing the size at all.
                * A block is always 512 bytes on OpenVMS, compute size.
                * So its rounded up to the next block, so what, its better
                * than not showing the size at all.
               */
               uint64_t fsz, factor;
               LL_UI2L(fsz, strtoul(tokens[1], (char **)0, 10));
               LL_UI2L(factor, 512);
-              LL_MUL(fsz, fsz, factor);
+              fsz *= factor;
               PR_snprintf(result->fe_size, sizeof(result->fe_size), 
                           "%lld", fsz);
             } 
 
           } /* if (result->fe_type != 'd') */
 
           p = tokens[2] + 2;
           if (*p == '-')
--- a/rdf/datasource/src/nsFileSystemDataSource.cpp
+++ b/rdf/datasource/src/nsFileSystemDataSource.cpp
@@ -1135,17 +1135,17 @@ FileSystemDataSource::GetLastMod(nsIRDFR
 
     PRTime lastModDate;
     if (NS_FAILED(rv = aFile->GetLastModifiedTime(&lastModDate)))
         return(rv);
 
     // convert from milliseconds to seconds
     PRTime      temp64, thousand;
     LL_I2L(thousand, PR_MSEC_PER_SEC);
-    LL_MUL(temp64, lastModDate, thousand);
+    temp64 = lastModDate * thousand;
 
     mRDFService->GetDateLiteral(temp64, aResult);
 
     return(NS_OK);
 }
 
 
 
--- a/security/manager/ssl/src/nsCRLManager.cpp
+++ b/security/manager/ssl/src/nsCRLManager.cpp
@@ -391,19 +391,19 @@ nsCRLManager::ComputeNextAutoUpdateTime(
   int64_t diff = 0;
   int64_t secsInDay = 86400UL;
   int64_t temp;
   int64_t cycleCnt = 0;
   int64_t secsInDayCnt;
   double tmpData;
   
   LL_L2F(tmpData,secsInDay);
-  LL_MUL(tmpData,dayCnt,tmpData);
+  tmpData = dayCnt * tmpData;
   LL_F2L(secsInDayCnt,tmpData);
-  LL_MUL(microsecInDayCnt, secsInDayCnt, PR_USEC_PER_SEC);
+  microsecInDayCnt = secsInDayCnt * PR_USEC_PER_SEC;
     
   PRTime lastUpdate;
   PRTime nextUpdate;
   
   nsresult rv;
 
   rv = info->GetLastUpdate(&lastUpdate);
   if (NS_FAILED(rv))
@@ -416,17 +416,17 @@ nsCRLManager::ComputeNextAutoUpdateTime(
   switch (autoUpdateType) {
   case TYPE_AUTOUPDATE_FREQ_BASED:
     diff = now - lastUpdate;                    //diff is the no of micro sec between now and last update
     LL_DIV(cycleCnt, diff, microsecInDayCnt);   //temp is the number of full cycles from lst update
     LL_MOD(temp, diff, microsecInDayCnt);
     if(temp != 0) {
       ++cycleCnt;            //no of complete cycles till next autoupdate instant
     }
-    LL_MUL(temp,cycleCnt,microsecInDayCnt);    //micro secs from last update
+    temp = cycleCnt * microsecInDayCnt;    //micro secs from last update
     tempTime = lastUpdate + temp;
     break;  
   case TYPE_AUTOUPDATE_TIME_BASED:
     tempTime = nextUpdate - microsecInDayCnt;
     break;
   default:
     return NS_ERROR_NOT_IMPLEMENTED;
   }
--- a/tools/trace-malloc/spacetrace.c
+++ b/tools/trace-malloc/spacetrace.c
@@ -112,17 +112,17 @@ uint32_t
 ticks2xsec(tmreader * aReader, uint32_t aTicks, uint32_t aResolution)
 {
     uint32_t retval = 0;
     uint64_t bigone;
     uint64_t tmp64;
 
     LL_UI2L(bigone, aResolution);
     LL_UI2L(tmp64, aTicks);
-    LL_MUL(bigone, bigone, tmp64);
+    bigone *= tmp64;
     LL_UI2L(tmp64, aReader->ticksPerSec);
     LL_DIV(bigone, bigone, tmp64);
     LL_L2UI(retval, bigone);
     return retval;
 }
 
 #define ticks2msec(reader, ticks) ticks2xsec((reader), (ticks), 1000)
 #define ticks2usec(reader, ticks) ticks2xsec((reader), (ticks), 1000000)
@@ -142,17 +142,17 @@ initOptions(int aArgCount, char **aArgAr
     /*
      **  Set the initial global default options.
      */
 #define ST_CMD_OPTION_BOOL(option_name, option_genre, option_help) globals.mCommandLineOptions.m##option_name = PR_FALSE;
 #define ST_CMD_OPTION_STRING(option_name, option_genre, default_value, option_help) PR_snprintf(globals.mCommandLineOptions.m##option_name, sizeof(globals.mCommandLineOptions.m##option_name), "%s", default_value);
 #define ST_CMD_OPTION_STRING_ARRAY(option_name, option_genre, array_size, option_help) { int loop; for(loop = 0; loop < array_size; loop++) { globals.mCommandLineOptions.m##option_name[loop][0] = '\0'; } }
 #define ST_CMD_OPTION_STRING_PTR_ARRAY(option_name, option_genre, option_help) globals.mCommandLineOptions.m##option_name = NULL; globals.mCommandLineOptions.m##option_name##Count = 0;
 #define ST_CMD_OPTION_UINT32(option_name, option_genre, default_value, multiplier, option_help) globals.mCommandLineOptions.m##option_name = default_value * multiplier;
-#define ST_CMD_OPTION_UINT64(option_name, option_genre, default_value, multiplier, option_help) { uint64_t def64 = default_value; uint64_t mul64 = multiplier; LL_MUL(globals.mCommandLineOptions.m##option_name##64, def64, mul64); }
+#define ST_CMD_OPTION_UINT64(option_name, option_genre, default_value, multiplier, option_help) { uint64_t def64 = default_value; uint64_t mul64 = multiplier; globals.mCommandLineOptions.m##option_name##64 = def64 * mul64; }
 
 #include "stoptions.h"
 
     /*
      ** Go through all arguments.
      ** Two dashes lead off an option.
      ** Any single dash leads off help, unless it is a lone dash (stdin).
      ** Anything else will be attempted as a file to be processed.
@@ -662,17 +662,17 @@ recalculateAllocationCost(STOptions * in
         uint32_t size = byteSize(inOptions, aAllocation);
         uint64_t weight64 = LL_INIT(0, 0);
         uint32_t heapCost = aAllocation->mHeapRuntimeCost;
         uint64_t timeval64 = LL_INIT(0, 0);
         uint64_t size64 = LL_INIT(0, 0);
 
         LL_UI2L(timeval64, timeval);
         LL_UI2L(size64, size);
-        LL_MUL(weight64, timeval64, size64);
+        weight64 = timeval64 * size64;
 
         /*
          ** First, update this run.
          */
         aRun->mStats[inContext->mIndex].mCompositeCount++;
         aRun->mStats[inContext->mIndex].mHeapRuntimeCost += heapCost;
         aRun->mStats[inContext->mIndex].mSize += size;
         aRun->mStats[inContext->mIndex].mTimeval64 += timeval64;
@@ -956,17 +956,17 @@ harvestRun(const STRun * aInRun, STRun *
                     continue;
                 }
 
                 /*
                  ** Check weight restrictions.
                  */
                 LL_UI2L(bytesize64, bytesize);
                 LL_UI2L(lifetime64, lifetime);
-                LL_MUL(weight64, bytesize64, lifetime64);
+                weight64 = bytesize64 * lifetime64;
                 if (weight64 < aOptions->mWeightMin64 ||
                     weight64 > aOptions->mWeightMax64) {
                     continue;
                 }
 
                 /*
                  ** Possibly restrict the callsite by text.
                  ** Do this last, as it is a heavier check.
@@ -1094,21 +1094,21 @@ compareAllocations(const void *aAlloc1, 
                     uint64_t bytesize164 = LL_INIT(0, 0);
                     uint64_t bytesize264 = LL_INIT(0, 0);
                     uint64_t timeval164 = LL_INIT(0, 0);
                     uint64_t timeval264 = LL_INIT(0, 0);
 
                     LL_UI2L(bytesize164, byteSize(inOptions, alloc1));
                     LL_UI2L(timeval164,
                             (alloc1->mMaxTimeval - alloc1->mMinTimeval));
-                    LL_MUL(weight164, bytesize164, timeval164);
+                    weight164 = bytesize164 * timeval164;
                     LL_UI2L(bytesize264, byteSize(inOptions, alloc2));
                     LL_UI2L(timeval264,
                             (alloc2->mMaxTimeval - alloc2->mMinTimeval));
-                    LL_MUL(weight264, bytesize264, timeval264);
+                    weight264 = bytesize264 * timeval264;
 
                     if (weight164 < weight264) {
                         retval = __LINE__;
                     }
                     else if (weight164 > weight264) {
                         retval = -__LINE__;
                     }
                 }
@@ -2613,17 +2613,17 @@ getDataPRUint32(const FormData * aGetDat
 int
 getDataPRUint64(const FormData * aGetData, const char *aCheckFor, int inIndex,
                 uint64_t * aStoreResult64, uint64_t aConversion64)
 {
     int retval = 0;
     uint64_t value64 = LL_INIT(0, 0);
 
     retval = getDataPRUint32Base(aGetData, aCheckFor, inIndex, &value64, 64);
-    LL_MUL(*aStoreResult64, value64, aConversion64);
+    *aStoreResult64 = value64 * aConversion64;
 
     return retval;
 }
 
 /*
 ** getDataString
 **
 ** Pull out the string data, if specified.
@@ -2719,17 +2719,17 @@ displayTopAllocations(STRequest * inRequ
                     uint32_t heapCost = current->mHeapRuntimeCost;
                     uint64_t weight64 = LL_INIT(0, 0);
                     uint64_t size64 = LL_INIT(0, 0);
                     uint64_t lifespan64 = LL_INIT(0, 0);
                     char buffer[32];
 
                     LL_UI2L(size64, size);
                     LL_UI2L(lifespan64, lifespan);
-                    LL_MUL(weight64, size64, lifespan64);
+                    weight64 = size64 * lifespan64;
 
                     PR_fprintf(inRequest->mFD, "<tr>\n");
 
                     /*
                      ** Rank.
                      */
                     PR_fprintf(inRequest->mFD, "<td align=right>%u</td>\n",
                                loop + 1);
@@ -2843,17 +2843,17 @@ displayMemoryLeaks(STRequest * inRequest
                     uint32_t heapCost = current->mHeapRuntimeCost;
                     uint64_t weight64 = LL_INIT(0, 0);
                     uint64_t size64 = LL_INIT(0, 0);
                     uint64_t lifespan64 = LL_INIT(0, 0);
                     char buffer[32];
 
                     LL_UI2L(size64, size);
                     LL_UI2L(lifespan64, lifespan);
-                    LL_MUL(weight64, size64, lifespan64);
+                    weight64 = size64 * lifespan64;
 
                     /*
                      ** One more shown.
                      */
                     displayed++;
 
                     PR_fprintf(inRequest->mFD, "<tr>\n");
 
@@ -3102,17 +3102,17 @@ displayAllocationDetails(STRequest * inR
         uint64_t weight64 = LL_INIT(0, 0);
         uint64_t bytesize64 = LL_INIT(0, 0);
         uint64_t timeval64 = LL_INIT(0, 0);
         uint32_t cacheval = 0;
         int displayRes = 0;
 
         LL_UI2L(bytesize64, bytesize);
         LL_UI2L(timeval64, timeval);
-        LL_MUL(weight64, bytesize64, timeval64);
+        weight64 = bytesize64 * timeval64;
 
         PR_fprintf(inRequest->mFD, "<p>Allocation %u Details:</p>\n",
                    aAllocation->mRunIndex);
 
         PR_fprintf(inRequest->mFD, "<div id=\"allocation-details\"><table class=\"data summary\">\n");
         PR_fprintf(inRequest->mFD,
                    "<tr><td align=left>Final Size:</td><td align=right>%u</td></tr>\n",
                    bytesize);
@@ -3870,17 +3870,17 @@ graphFootprint(STRequest * inRequest, ST
 
                         /*
                          ** Need to do this math in 64 bits.
                          */
                         LL_I2L(ydata64, YData[traverse]);
                         LL_I2L(spacey64, STGD_SPACE_Y);
                         LL_I2L(mem64, (maxMemory - minMemory));
 
-                        LL_MUL(in64, ydata64, spacey64);
+                        in64 = ydata64 * spacey64;
                         LL_DIV(in64, in64, mem64);
                         LL_L2I(in32, in64);
 
                         x2 = x1;
                         y2 = y1 - in32;
 
                         gdImageLine(graph, x1, y1, x2, y2, red);
                     }
@@ -4086,17 +4086,17 @@ graphTimeval(STRequest * inRequest, STRu
 
                         /*
                          ** Need to do this math in 64 bits.
                          */
                         LL_I2L(ydata64, YData[traverse]);
                         LL_I2L(spacey64, STGD_SPACE_Y);
                         LL_I2L(mem64, (maxMemory - minMemory));
 
-                        LL_MUL(in64, ydata64, spacey64);
+                        in64 = ydata64 * spacey64;
                         LL_DIV(in64, in64, mem64);
                         LL_L2I(in32, in64);
 
                         x2 = x1;
                         y2 = y1 - in32;
 
                         gdImageLine(graph, x1, y1, x2, y2, red);
                     }
@@ -4304,17 +4304,17 @@ graphLifespan(STRequest * inRequest, STR
 
                         /*
                          ** Need to do this math in 64 bits.
                          */
                         LL_I2L(ydata64, YData[traverse]);
                         LL_I2L(spacey64, STGD_SPACE_Y);
                         LL_I2L(mem64, (maxMemory - minMemory));
 
-                        LL_MUL(in64, ydata64, spacey64);
+                        in64 = ydata64 * spacey64;
                         LL_DIV(in64, in64, mem64);
                         LL_L2I(in32, in64);
 
                         x2 = x1;
                         y2 = y1 - in32;
 
                         gdImageLine(graph, x1, y1, x2, y2, red);
                     }
@@ -4423,17 +4423,17 @@ graphWeight(STRequest * inRequest, STRun
                         uint64_t weight64 = LL_INIT(0, 0);
 
                         LL_UI2L(size64,
                                 byteSize(&inRequest->mOptions,
                                          aRun->mAllocations[loop]));
                         LL_UI2L(lifespan64,
                                 (aRun->mAllocations[loop]->mMaxTimeval -
                                  aRun->mAllocations[loop]->mMinTimeval));
-                        LL_MUL(weight64, size64, lifespan64);
+                        weight64 = size64 * lifespan64;
 
                         YData64[traverse] += weight64;
                     }
                 }
             }
 
             /*
              ** Did we cache this?
@@ -4504,17 +4504,17 @@ graphWeight(STRequest * inRequest, STRun
                     cached =
                         ((globals.mMaxTimeval -
                           globals.mMinTimeval) * percents[traverse]) / 100;
                     PR_snprintf(timevals[traverse], 32, ST_TIMEVAL_FORMAT,
                                 ST_TIMEVAL_PRINTABLE(cached));
 
                     LL_UI2L(percent64, percents[traverse]);
                     result64 = maxWeight64 - minWeight64;
-                    LL_MUL(result64, result64, percent64);
+                    result64 *= percent64;
                     LL_DIV(result64, result64, hundred64);
                     PR_snprintf(bytes[traverse], 32, "%llu", result64);
                 }
 
                 red = gdImageColorAllocate(graph, 255, 0, 0);
                 legendColors[0] = red;
 
                 drawGraph(graph, -1, "Allocation Weights", "Seconds",
@@ -4536,17 +4536,17 @@ graphWeight(STRequest * inRequest, STRun
                         y1 = STGD_HEIGHT - STGD_MARGIN;
 
                         /*
                          ** Need to do this math in 64 bits.
                          */
                         LL_I2L(spacey64, STGD_SPACE_Y);
                         weight64 = maxWeight64 - minWeight64;
 
-                        LL_MUL(in64, YData64[traverse], spacey64);
+                        in64 = YData64[traverse] * spacey64;
                         LL_DIV(in64, in64, weight64);
                         LL_L2I(in32, in64);
 
                         x2 = x1;
                         y2 = y1 - in32;
 
                         gdImageLine(graph, x1, y1, x2, y2, red);
                     }
--- a/tools/trace-malloc/tmfrags.c
+++ b/tools/trace-malloc/tmfrags.c
@@ -417,17 +417,17 @@ uint32_t ticks2xsec(tmreader* aReader, u
 */
 {
     uint32_t retval = 0;
     uint64_t bigone;
     uint64_t tmp64;
 
     LL_UI2L(bigone, aResolution);
     LL_UI2L(tmp64, aTicks);
-    LL_MUL(bigone, bigone, tmp64);
+    bigone *= tmp64;
     LL_UI2L(tmp64, aReader->ticksPerSec);
     LL_DIV(bigone, bigone, tmp64);
     LL_L2UI(retval, bigone);
     return retval;
 }
 
 
 void cleanOptions(Options* inOptions)
--- a/tools/trace-malloc/tmstats.c
+++ b/tools/trace-malloc/tmstats.c
@@ -415,17 +415,17 @@ void addVariance(VarianceState* inVarian
 {
     uint64_t squared;
     uint64_t bigValue;
     
     LL_UI2L(bigValue, inValue);
 
     inVariance->mSum += bigValue;
 
-    LL_MUL(squared, bigValue, bigValue);
+    squared = bigValue * bigValue;
     inVariance->mSquaredSum, inVariance->mSquaredSum += squared;
 
     inVariance->mCount++;
 }
 
 
 double getAverage(VarianceState* inVariance)
 /*
@@ -533,17 +533,17 @@ uint32_t ticks2xsec(tmreader* aReader, u
 */
 {
     uint32_t retval = 0;
     uint64_t bigone;
     uint64_t tmp64;
 
     LL_UI2L(bigone, aResolution);
     LL_UI2L(tmp64, aTicks);
-    LL_MUL(bigone, bigone, tmp64);
+    bigone *= tmp64;
     LL_UI2L(tmp64, aReader->ticksPerSec);
     LL_DIV(bigone, bigone, tmp64);
     LL_L2UI(retval, bigone);
 
     return retval;
 }
 #define ticks2msec(reader, ticks) ticks2xsec((reader), (ticks), 1000)
 
--- a/xpcom/ds/nsCRT.cpp
+++ b/xpcom/ds/nsCRT.cpp
@@ -172,17 +172,17 @@ PRUnichar* nsCRT::strndup(const PRUnicha
 int64_t nsCRT::atoll(const char *str)
 {
     if (!str)
         return LL_Zero();
 
     int64_t ll = LL_Zero(), digitll = LL_Zero();
 
     while (*str && *str >= '0' && *str <= '9') {
-        LL_MUL(ll, ll, 10);
+        ll *= 10;
         LL_UI2L(digitll, (*str - '0'));
         ll += digitll;
         str++;
     }
 
     return ll;
 }
 
--- a/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
+++ b/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
@@ -165,17 +165,17 @@ InvokeTestTarget::AddTwoLLs(int64_t p1, 
 {
     *retval = p1 + p2;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 InvokeTestTarget::MultTwoLLs(int64_t p1, int64_t p2, int64_t* retval)
 {
-    LL_MUL(*retval, p1, p2);
+    *retval = p1 * p2;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 InvokeTestTarget::AddManyInts(int32_t p1, int32_t p2, int32_t p3, int32_t p4,
                               int32_t p5, int32_t p6, int32_t p7, int32_t p8,
                               int32_t p9, int32_t p10, int32_t* retval)
 {