Lines Matching refs:pair

44 	struct SPDY_NameValue *pair;  in SPDY_name_value_create()  local
46 if(NULL == (pair = malloc(sizeof(struct SPDY_NameValue)))) in SPDY_name_value_create()
49 memset (pair, 0, sizeof (struct SPDY_NameValue)); in SPDY_name_value_create()
51 return pair; in SPDY_name_value_create()
62 struct SPDY_NameValue *pair; in SPDY_name_value_add() local
102 pair = container; in SPDY_name_value_add()
103 while(NULL != pair) in SPDY_name_value_add()
105 if(0 == strcmp(pair->name, name)) in SPDY_name_value_add()
110 pair = pair->next; in SPDY_name_value_add()
113 if(NULL == pair) in SPDY_name_value_add()
116 if(NULL == (pair = malloc(sizeof(struct SPDY_NameValue)))) in SPDY_name_value_add()
119 memset(pair, 0, sizeof(struct SPDY_NameValue)); in SPDY_name_value_add()
121 if (NULL == (pair->name = strdup (name))) in SPDY_name_value_add()
123 free(pair); in SPDY_name_value_add()
126 if (NULL == (pair->value = malloc(sizeof(char *)))) in SPDY_name_value_add()
128 free(pair->name); in SPDY_name_value_add()
129 free(pair); in SPDY_name_value_add()
134 else */if (NULL == (pair->value[0] = strdup (value))) in SPDY_name_value_add()
136 free(pair->value); in SPDY_name_value_add()
137 free(pair->name); in SPDY_name_value_add()
138 free(pair); in SPDY_name_value_add()
141 pair->num_values = 1; in SPDY_name_value_add()
146 temp->next = pair; in SPDY_name_value_add()
147 pair->prev = temp; in SPDY_name_value_add()
153 for(i=0; i<pair->num_values; ++i) in SPDY_name_value_add()
154 if(0 == strcmp(pair->value[i], value)) in SPDY_name_value_add()
157 if(strlen(pair->value[0]) > 0) in SPDY_name_value_add()
160 if (NULL == (temp_value = malloc((pair->num_values + 1) * sizeof(char *)))) in SPDY_name_value_add()
164 memcpy(temp_value, pair->value, pair->num_values * sizeof(char *)); in SPDY_name_value_add()
165 if (NULL == (temp_value[pair->num_values] = strdup (value))) in SPDY_name_value_add()
170 free(pair->value); in SPDY_name_value_add()
171 pair->value = temp_value; in SPDY_name_value_add()
172 ++pair->num_values; in SPDY_name_value_add()
182 free(pair->value[0]); in SPDY_name_value_add()
183 pair->value[0] = temp_string; in SPDY_name_value_add()