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