@@ -336,41 +336,26 @@ JS::Result<mozilla::Ok> Backend::register_dynamic_backend(JSContext *cx, JS::Han
336
336
backend_config_mask |= BACKEND_CONFIG_HOST_OVERRIDE;
337
337
definition.host_override = hostOverride.value ().c_str ();
338
338
definition.host_override_len = hostOverride.value ().length ();
339
- } else {
340
- definition.host_override = nullptr ;
341
- definition.host_override_len = 0 ;
342
339
}
343
340
if (certificateHostname.has_value ()) {
344
341
backend_config_mask |= BACKEND_CONFIG_CERT_HOSTNAME;
345
342
definition.cert_hostname = certificateHostname.value ().c_str ();
346
343
definition.cert_hostname_len = certificateHostname.value ().length ();
347
- } else {
348
- definition.cert_hostname = nullptr ;
349
- definition.cert_hostname_len = 0 ;
350
344
}
351
345
if (caCertificate.has_value ()) {
352
346
backend_config_mask |= BACKEND_CONFIG_CA_CERT;
353
347
definition.ca_cert = caCertificate.value ().c_str ();
354
348
definition.ca_cert_len = caCertificate.value ().length ();
355
- } else {
356
- definition.ca_cert = nullptr ;
357
- definition.ca_cert_len = 0 ;
358
349
}
359
350
if (ciphers.has_value ()) {
360
351
backend_config_mask |= BACKEND_CONFIG_CIPHERS;
361
352
definition.ciphers = ciphers.value ().c_str ();
362
353
definition.ciphers_len = ciphers.value ().length ();
363
- } else {
364
- definition.ciphers = nullptr ;
365
- definition.ciphers_len = 0 ;
366
354
}
367
355
if (sniHostname.has_value ()) {
368
356
backend_config_mask |= BACKEND_CONFIG_SNI_HOSTNAME;
369
357
definition.sni_hostname = sniHostname.value ().c_str ();
370
358
definition.sni_hostname_len = sniHostname.value ().length ();
371
- } else {
372
- definition.sni_hostname = nullptr ;
373
- definition.sni_hostname_len = 0 ;
374
359
}
375
360
376
361
int result = xqd_req_register_dynamic_backend (name_cstr, name_len, target_cstr, target_len,
0 commit comments