Changeset df3483a in git for Singular/spSpolyLoop.cc


Ignore:
Timestamp:
Apr 30, 1998, 5:27:25 PM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'b324714bf5073469800caef737deba1366fbd81f')
Children:
24189c4982473a71947501ca9125a109ab40e937
Parents:
1d142c32d3b504db8d82f4aa3104fb6643914101
Message:
* small change in structure of spolyloop


git-svn-id: file:///usr/local/Singular/svn/trunk@1568 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/spSpolyLoop.cc

    r1d142c rdf3483a  
    3333{
    3434  poly a = monom,                         // collects the result
    35        b = pNew(),                        // stores a1*monom
     35       b = NULL,                        // stores a1*monom
    3636       c;                                 // used for temporary storage
    3737  number tm   = pGetCoeff(monom),         // coefficient of monom
     
    4242  if (a2==NULL) goto Finish; // we are done if a2 is 0
    4343
     44  b = pNew();
    4445  pCopyAddFast0(b, a1, monom);  // now a2 != NULL -- set up b
    4546
     
    6667    nDelete(&tb);
    6768    pIter(a1);
    68     if (a2 == NULL || a1 == NULL) goto Finish; // are we done ?
     69    if (a1 == NULL || a2 == NULL) goto Finish; // are we done ?
    6970    pCopyAddFast0(b, a1, monom); // No! So, get new b = a1*monom
    7071    goto Top;
     
    8384      a = pNext(a) = b;       // append b to result and advance a1
    8485      pIter(a1);
     86      if (a1 == NULL) // are we done?
     87      {
     88        b = NULL;
     89        goto Finish;
     90      }
    8591      b = pNew();
    86       if (a1 == NULL) goto Finish; // are we done?
    8792      pCopyAddFast0(b, a1, monom); // No! So, update b = a1*monom
    8893      goto Top;
     
    95100     spGMultCopyX(a1, monom, a, tneg, spNoether);
    96101   nDelete(&tneg);
    97    pFree1(b);
     102   if (b != NULL) pFree1(b);
    98103}
    99104
Note: See TracChangeset for help on using the changeset viewer.