Algorithm to Insert a Node in Doubly Linked List

Algorithm fnDLL_Insert(ptrNodeB, Data)
{
DLLNode *ptrNodeC;
ptrNodeC=(DLLNode*) malloc(sizeof(DLLNode));
ptrNodeC->Data=Data;
ptrNodeC->ptrLeft=ptrNodeB;
ptrNodeC->ptrRight=ptrNodeB->ptrRight;
ptrNodeB->ptrRight->ptrLeft=ptrNodeC;
ptrNodeB->ptrRight=ptrNodeC;
} // End of Algorithm