initialize returned values pointers
| 87 | |
| 88 | // initialize returned values pointers |
| 89 | static void _process_yield |
| 90 | ( |
| 91 | SinglePairCtx *ctx, |
| 92 | const char **yield |
| 93 | ) { |
| 94 | ctx->yield_path = NULL; |
| 95 | ctx->yield_path_weight = NULL; |
| 96 | ctx->yield_path_cost = NULL; |
| 97 | |
| 98 | int idx = 0; |
| 99 | for(uint i = 0; i < array_len(yield); i++) { |
| 100 | if(strcasecmp("path", yield[i]) == 0) { |
| 101 | ctx->yield_path = ctx->output + idx; |
| 102 | idx++; |
| 103 | continue; |
| 104 | } |
| 105 | |
| 106 | if(strcasecmp("pathWeight", yield[i]) == 0) { |
| 107 | ctx->yield_path_weight = ctx->output + idx; |
| 108 | idx++; |
| 109 | continue; |
| 110 | } |
| 111 | |
| 112 | if(strcasecmp("pathCost", yield[i]) == 0) { |
| 113 | ctx->yield_path_cost = ctx->output + idx; |
| 114 | idx++; |
| 115 | continue; |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | // make sure context level array have 'cap' available entries. |
| 121 | static void _SinglePairCtx_EnsureLevelArrayCap |
no test coverage detected