keys.c (25700db36640b1538ac91f893955a4f1a4167f63) | keys.c (29b36af9981e7f194abe68b0359448846c021cd6) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2012 The FreeBSD Foundation 5 * 6 * This software was developed by Edward Tomasz Napierala under sponsorship 7 * from the FreeBSD Foundation. 8 * --- 149 unchanged lines hidden (view full) --- 158keys_add(struct keys *keys, const char *name, const char *value) 159{ 160 int i; 161 162 log_debugx("key to send: \"%s=%s\"", name, value); 163 164 /* 165 * Note that we don't check for duplicates here, as they are perfectly | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2012 The FreeBSD Foundation 5 * 6 * This software was developed by Edward Tomasz Napierala under sponsorship 7 * from the FreeBSD Foundation. 8 * --- 149 unchanged lines hidden (view full) --- 158keys_add(struct keys *keys, const char *name, const char *value) 159{ 160 int i; 161 162 log_debugx("key to send: \"%s=%s\"", name, value); 163 164 /* 165 * Note that we don't check for duplicates here, as they are perfectly |
166 * fine in responses, e.g. the "TargetName" keys in discovery sesion | 166 * fine in responses, e.g. the "TargetName" keys in discovery session |
167 * response. 168 */ 169 for (i = 0; i < KEYS_MAX; i++) { 170 if (keys->keys_names[i] == NULL) { 171 keys->keys_names[i] = checked_strdup(name); 172 keys->keys_values[i] = checked_strdup(value); 173 return; 174 } --- 17 unchanged lines hidden --- | 167 * response. 168 */ 169 for (i = 0; i < KEYS_MAX; i++) { 170 if (keys->keys_names[i] == NULL) { 171 keys->keys_names[i] = checked_strdup(name); 172 keys->keys_values[i] = checked_strdup(value); 173 return; 174 } --- 17 unchanged lines hidden --- |