Well first off, lose the second indirection and your code will become a lot cleaner.
Code:
void foo( struct sNode **sList, struct dNode **dList )
{
struct sNode sPtr = *sList;
struct dNode dPtr = *dList;
/* Much better already... */
}
Wait wait wait wait... Do you already have the second list built? (ie: allocated) If so this is something you can do in your sleep:
Code:
void foo( struct sNode **sList, struct dNode **dList )
{
struct sNode sPtr = *sList;
struct dNode dPtr = *dList;
/* Much better already... */
for( ; sPtr; sPtr = sPtr->next, dPtr = dPtr->next )
{
dPtr->data1 = sPtr->data1;
dPtr->data2 = sPtr->data2;
...
dPtr->dataN = sPtr->dataN;
}
}
That's all folks!
If you don't have it allocated, then you do the exact same thing, except you allocate a node in there for dPtr, and link it to the double linked list you're building.
Otherwise you need to explain what it is you're trying to do.
Quzah.