Lines Matching defs:strs
106 static void ReleaseStrings(char **strs)
108 if (strs == nullptr) {
112 while (strs[i] != nullptr) {
113 free(strs[i]);
114 strs[i] = nullptr;
117 free(strs);
118 strs = nullptr;
140 char **strs = (char **)calloc(num + 1, sizeof(char *));
141 if (strs == nullptr) {
149 strs[num] = (char *)calloc(strLen, sizeof(char));
150 if (strs[num] == nullptr || strncpy_s(strs[num], strLen, pos, p - pos) != EOK) {
151 ReleaseStrings(strs);
160 strs[num] = (char *)calloc(strLen, sizeof(char));
161 if (strs[num] == nullptr || strncpy_s(strs[num], strLen, pos, strlen(pos)) != EOK) {
162 ReleaseStrings(strs);
166 return strs;
172 char **strs = SplitString(buf, " ");
173 if (strs == nullptr) {
177 while (strs[num] != nullptr) {
185 ParseMacAddress(strs[BINDING_MAC_ADDR_POS], binding->chaddr);
186 binding->ipAddress = ParseIpAddr(strs[BINDING_IP_ADDR_POS]);
187 binding->leaseTime = atol(strs[BINDING_LEASE_TIME_POS]);
188 binding->bindingTime = atol(strs[BINDING_BINDING_TIME_POS]);
189 binding->pendingTime = atol(strs[BINDING_PENDING_TIME_POS]);
197 binding->pendingInterval = atol(strs[BINDING_PENDING_INTERVAL_POS]);
198 binding->bindingMode = atoi(strs[BINDING_BINDING_MODE_POS]);
199 binding->bindingStatus = atoi(strs[BINDING_BINDING_STATUS_POS]);
204 ParseHostName(strs[BINDING_DEVICE_NAME_POS], binding->deviceName);
209 ReleaseStrings(strs);