| 605 | } |
| 606 | |
| 607 | txResult* fxNewResult(char* path, char* message) |
| 608 | { |
| 609 | int pathLength = mxStringLength(path); |
| 610 | txResult* result = NULL; |
| 611 | if (message) { |
| 612 | int messageLength = mxStringLength(message); |
| 613 | result = c_malloc(sizeof(txResult) + pathLength + 1 + messageLength); |
| 614 | if (!result) { |
| 615 | c_exit(1); |
| 616 | } |
| 617 | result->next = NULL; |
| 618 | result->parent = NULL; |
| 619 | result->first = NULL; |
| 620 | result->file.flag = -1; |
| 621 | result->file.count = 0; |
| 622 | result->file.offset = pathLength + 1; |
| 623 | c_memcpy(result->path, path, pathLength + 1); |
| 624 | c_memcpy(result->path + pathLength + 1, message, messageLength + 1); |
| 625 | } |
| 626 | else { |
| 627 | result = c_malloc(sizeof(txResult) + pathLength); |
| 628 | if (!result) { |
| 629 | c_exit(1); |
| 630 | } |
| 631 | result->next = NULL; |
| 632 | result->parent = NULL; |
| 633 | result->first = NULL; |
| 634 | result->folder.testCount = 0; |
| 635 | result->folder.successCount = 0; |
| 636 | result->folder.pendingCount = 0; |
| 637 | c_memcpy(result->path, path, pathLength + 1); |
| 638 | } |
| 639 | return result; |
| 640 | } |
| 641 | |
| 642 | void fxPopResult(txPool* pool) |
| 643 | { |
no outgoing calls
no test coverage detected