ChamaraVishwajithRajapaksha/Code-Vulnerability-FineTune huggingface dataset:
TEST_P(Http2CodecImplTest, TrailingHeaders) {
  initialize();

  TestHeaderMapImpl request_headers;
  HttpTestUtility::addDefaultHeaders(request_headers);
  EXPECT_CALL(request_decoder_, decodeHeaders_(_, false));
  request_encoder_->encodeHeaders(request_headers, false);
  EXPECT_CALL(request_decoder_, decodeData(_, false));
  Buffer::OwnedImpl hello("hello");
  request_encoder_->encodeData(hello, false);
  EXPECT_CALL(request_decoder_, decodeTrailers_(_));
  request_encoder_->encodeTrailers(TestHeaderMapImpl{{"trailing", "header"}});

  TestHeaderMapImpl response_headers{{":status", "200"}};
  EXPECT_CALL(response_decoder_, decodeHeaders_(_, false));
  response_encoder_->encodeHeaders(response_headers, false);
  EXPECT_CALL(response_decoder_, decodeData(_, false));
  Buffer::OwnedImpl world("world");
  response_encoder_->encodeData(world, false);
  EXPECT_CALL(response_decoder_, decodeTrailers_(_));
  response_encoder_->encodeTrailers(TestHeaderMapImpl{{"trailing", "header"}});
}
static char* oidc_util_get_chunk_cookie_name(request_rec *r,
		const char *cookieName, int i) {
	return apr_psprintf(r->pool, "%s%s%d", cookieName,
			OIDC_COOKIE_CHUNKS_SEPARATOR, i);
}
g13_is_container (ctrl_t ctrl, const char *filename)
{
  gpg_error_t err;
  estream_t fp = NULL;
  size_t dummy;

  (void)ctrl;

  /* Read just the prefix of the header.  */
  err = read_keyblob_prefix (filename, &fp, &dummy);
  if (!err)
    es_fclose (fp);
  return err;
}
_PUBLIC_ enum ndr_err_code ndr_pull_dns_res_rec(struct ndr_pull *ndr,
						int ndr_flags,
						struct dns_res_rec *r)
{
	uint32_t _flags_save_STRUCT = ndr->flags;
	uint32_t _saved_offset1;
	uint32_t pad, length;

	ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX |
				   LIBNDR_FLAG_NOALIGN);
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->name));
		NDR_CHECK(ndr_pull_dns_qtype(ndr, NDR_SCALARS, &r->rr_type));
		NDR_CHECK(ndr_pull_dns_qclass(ndr, NDR_SCALARS, &r->rr_class));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl));
		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
		_saved_offset1 = ndr->offset;
		if (r->length > 0) {
			NDR_CHECK(ndr_token_store(ndr, &ndr->array_size_list,
						  &r->rdata,
						  r->length));
			NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->rdata,
							    r->rr_type));
			NDR_CHECK(ndr_pull_dns_rdata(ndr, NDR_SCALARS,
						     &r->rdata));
		} else {
			ZERO_STRUCT(r->rdata);
		}
		length = ndr->offset - _saved_offset1;
		if (length > r->length) {
			return ndr_pull_error(ndr, NDR_ERR_LENGTH, "TODO");
		}

		r->unexpected = data_blob_null;
		pad = r->length - length;
		if (pad > 0) {
			NDR_PULL_NEED_BYTES(ndr, pad);
			r->unexpected = data_blob_talloc(ndr->current_mem_ctx,
							 ndr->data +
							 ndr->offset,
							 pad);
			if (r->unexpected.data == NULL) {
				return ndr_pull_error(ndr,
						      NDR_ERR_ALLOC,
						      "Failed to allocate a " \
						      "data blob");
			}
			ndr->offset += pad;
		}


		NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
	}
	if (ndr_flags & NDR_BUFFERS) {
		NDR_CHECK(ndr_pull_dns_rdata(ndr, NDR_BUFFERS, &r->rdata));
	}
	ndr->flags = _flags_save_STRUCT;
	return NDR_ERR_SUCCESS;
}
mit_update_delay(uint32_t *curr, uint32_t value)
{
    if (value && (*curr == 0 || value < *curr)) {
        *curr = value;
    }
}
void CiffComponent::read(const byte* pData,
                             uint32_t    size,
                             uint32_t    start,
                             ByteOrder   byteOrder)
    {
        doRead(pData, size, start, byteOrder);
    }
static int network_init(void) {
  static _Bool have_init = 0;

  /* Check if we were already initialized. If so, just return - there's
   * nothing more to do (for now, that is). */
  if (have_init)
    return (0);
  have_init = 1;

  if (network_config_stats)
    plugin_register_read("network", network_stats_read);

  plugin_register_shutdown("network", network_shutdown);

  send_buffer = malloc(network_config_packet_size);
  if (send_buffer == NULL) {
    ERROR("network plugin: malloc failed.");
    return (-1);
  }
  network_init_buffer();

  /* setup socket(s) and so on */
  if (sending_sockets != NULL) {
    plugin_register_write("network", network_write,
                          /* user_data = */ NULL);
    plugin_register_notification("network", network_notification,
                                 /* user_data = */ NULL);
  }

  /* If no threads need to be started, return here. */
  if ((listen_sockets_num == 0) ||
      ((dispatch_thread_running != 0) && (receive_thread_running != 0)))
    return (0);

  if (dispatch_thread_running == 0) {
    int status;
    status = plugin_thread_create(&dispatch_thread_id, NULL /* no attributes */,
                                  dispatch_thread, NULL /* no argument */);
    if (status != 0) {
      char errbuf[1024];
      ERROR("network: pthread_create failed: %s",
            sstrerror(errno, errbuf, sizeof(errbuf)));
    } else {
      dispatch_thread_running = 1;
    }
  }

  if (receive_thread_running == 0) {
    int status;
    status = plugin_thread_create(&receive_thread_id, NULL /* no attributes */,
                                  receive_thread, NULL /* no argument */);
    if (status != 0) {
      char errbuf[1024];
      ERROR("network: pthread_create failed: %s",
            sstrerror(errno, errbuf, sizeof(errbuf)));
    } else {
      receive_thread_running = 1;
    }
  }

  return (0);
} /* int network_init */
static __poll_t userfaultfd_poll(struct file *file, poll_table *wait)
{
	struct userfaultfd_ctx *ctx = file->private_data;
	__poll_t ret;

	poll_wait(file, &ctx->fd_wqh, wait);

	switch (ctx->state) {
	case UFFD_STATE_WAIT_API:
		return EPOLLERR;
	case UFFD_STATE_RUNNING:
		/*
		 * poll() never guarantees that read won't block.
		 * userfaults can be waken before they're read().
		 */
		if (unlikely(!(file->f_flags & O_NONBLOCK)))
			return EPOLLERR;
		/*
		 * lockless access to see if there are pending faults
		 * __pollwait last action is the add_wait_queue but
		 * the spin_unlock would allow the waitqueue_active to
		 * pass above the actual list_add inside
		 * add_wait_queue critical section. So use a full
		 * memory barrier to serialize the list_add write of
		 * add_wait_queue() with the waitqueue_active read
		 * below.
		 */
		ret = 0;
		smp_mb();
		if (waitqueue_active(&ctx->fault_pending_wqh))
			ret = EPOLLIN;
		else if (waitqueue_active(&ctx->event_wqh))
			ret = EPOLLIN;

		return ret;
	default:
		WARN_ON_ONCE(1);
		return EPOLLERR;
	}
}
static CURLcode smtp_state_auth_ntlm_type2msg_resp(struct connectdata *conn,
                                                   int smtpcode,
                                                   smtpstate instate)
{
  CURLcode result = CURLE_OK;
  struct SessionHandle *data = conn->data;
  char *type3msg = NULL;
  size_t len = 0;

  (void)instate; /* no use for this yet */

  if(smtpcode != 334) {
    failf(data, "Access denied: %d", smtpcode);
    result = CURLE_LOGIN_DENIED;
  }
  else {
    result = Curl_ntlm_decode_type2_message(data, data->state.buffer + 4,
                                            &conn->ntlm);
    if(!result) {
      result = Curl_ntlm_create_type3_message(conn->data, conn->user,
                                              conn->passwd, &conn->ntlm,
                                              &type3msg, &len);
      if(!result) {
        if(type3msg) {
          result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type3msg);

          if(!result)
            state(conn, SMTP_AUTH);
        }
        Curl_safefree(type3msg);
      }
    }
  }

  return result;
}
cr_input_increment_line_num (CRInput * a_this, glong a_increment)
{
        g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);

        PRIVATE (a_this)->line += a_increment;

        return CR_OK;
}
static inline int __set_cpus_allowed_ptr(struct task_struct *p,
					 const struct cpumask *new_mask, bool check)
{
	return set_cpus_allowed_ptr(p, new_mask);
}
ews_store_unset_connection_locked (CamelEwsStore *ews_store)
{
	g_return_if_fail (CAMEL_IS_EWS_STORE (ews_store));

	/* TODO cancel all operations in the connection */
	if (ews_store->priv->connection != NULL) {
		CamelSettings *settings;

		/* FIXME This is somewhat broken, since the CamelSettings
		 *       instance returned here may not be the same instance
		 *       that we connected a signal handler to.  Need to keep
		 *       our own reference to that CamelSettings instance, or
		 *       better yet avoid connecting signal handlers to it in
		 *       the first place. */
		settings = camel_service_ref_settings (CAMEL_SERVICE (ews_store));
		g_signal_handlers_disconnect_by_data (settings, ews_store);
		g_signal_handlers_disconnect_by_func (
			ews_store->priv->connection, camel_ews_store_server_notification_cb, ews_store);

		g_object_unref (settings);

		if (ews_store->priv->listen_notifications) {
			stop_pending_updates (ews_store);

			if (ews_store->priv->subscription_key != 0) {
				e_ews_connection_disable_notifications_sync (
					ews_store->priv->connection,
					ews_store->priv->subscription_key);

				ews_store->priv->subscription_key = 0;
			}

			ews_store->priv->listen_notifications = FALSE;
		}

		e_ews_connection_set_password (ews_store->priv->connection, NULL);
		e_ews_connection_set_disconnected_flag (ews_store->priv->connection, TRUE);
		g_signal_handlers_disconnect_by_func (ews_store->priv->connection,
			G_CALLBACK (camel_ews_store_password_will_expire_cb), ews_store);
		g_object_unref (ews_store->priv->connection);
		ews_store->priv->connection = NULL;
	}
}
ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
			       splice_direct_actor *actor)
{
	struct pipe_inode_info *pipe;
	long ret, bytes;
	umode_t i_mode;
	size_t len;
	int i, flags;

	/*
	 * We require the input being a regular file, as we don't want to
	 * randomly drop data for eg socket -> socket splicing. Use the
	 * piped splicing for that!
	 */
	i_mode = file_inode(in)->i_mode;
	if (unlikely(!S_ISREG(i_mode) && !S_ISBLK(i_mode)))
		return -EINVAL;

	/*
	 * neither in nor out is a pipe, setup an internal pipe attached to
	 * 'out' and transfer the wanted data from 'in' to 'out' through that
	 */
	pipe = current->splice_pipe;
	if (unlikely(!pipe)) {
		pipe = alloc_pipe_info();
		if (!pipe)
			return -ENOMEM;

		/*
		 * We don't have an immediate reader, but we'll read the stuff
		 * out of the pipe right after the splice_to_pipe(). So set
		 * PIPE_READERS appropriately.
		 */
		pipe->readers = 1;

		current->splice_pipe = pipe;
	}

	/*
	 * Do the splice.
	 */
	ret = 0;
	bytes = 0;
	len = sd->total_len;
	flags = sd->flags;

	/*
	 * Don't block on output, we have to drain the direct pipe.
	 */
	sd->flags &= ~SPLICE_F_NONBLOCK;

	while (len) {
		size_t read_len;
		loff_t pos = sd->pos, prev_pos = pos;

		ret = do_splice_to(in, &pos, pipe, len, flags);
		if (unlikely(ret <= 0))
			goto out_release;

		read_len = ret;
		sd->total_len = read_len;

		/*
		 * NOTE: nonblocking mode only applies to the input. We
		 * must not do the output in nonblocking mode as then we
		 * could get stuck data in the internal pipe:
		 */
		ret = actor(pipe, sd);
		if (unlikely(ret <= 0)) {
			sd->pos = prev_pos;
			goto out_release;
		}

		bytes += ret;
		len -= ret;
		sd->pos = pos;

		if (ret < read_len) {
			sd->pos = prev_pos + ret;
			goto out_release;
		}
	}

done:
	pipe->nrbufs = pipe->curbuf = 0;
	file_accessed(in);
	return bytes;

out_release:
	/*
	 * If we did an incomplete transfer we must release
	 * the pipe buffers in question:
	 */
	for (i = 0; i < pipe->buffers; i++) {
		struct pipe_buffer *buf = pipe->bufs + i;

		if (buf->ops) {
			buf->ops->release(pipe, buf);
			buf->ops = NULL;
		}
	}

	if (!bytes)
		bytes = ret;

	goto done;
}
void loadBootsrap(absl::optional<uint32_t> bootstrap_version,
                  envoy::config::bootstrap::v3::Bootstrap& bootstrap,
                  std::function<void(Protobuf::Message&, bool)> load_function) {

  if (!bootstrap_version.has_value()) {
    load_function(bootstrap, true);
  } else if (*bootstrap_version == 3) {
    load_function(bootstrap, false);
  } else if (*bootstrap_version == 2) {
    envoy::config::bootstrap::v2::Bootstrap bootstrap_v2;
    load_function(bootstrap_v2, false);
    Config::VersionConverter::upgrade(bootstrap_v2, bootstrap);
  } else {
    throw EnvoyException(fmt::format("Unknown bootstrap version {}.", *bootstrap_version));
  }
}
Item* Item_ref::build_clone(THD *thd, MEM_ROOT *mem_root)
{
  Item_ref *copy= (Item_ref *) get_copy(thd, mem_root);
  if (!copy)
    return 0;
  copy->ref= 
      (Item**) alloc_root(mem_root, sizeof(Item*));
  if (!copy->ref)
      return 0;
  Item *item_clone= (* ref)->build_clone(thd, mem_root);
  if (!item_clone)
    return 0;
  *copy->ref= item_clone;
  return copy;
}
u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr,
				__be16 sport, __be16 dport)
{
	u64 seq;
	__u32 hash[4];
	struct keydata *keyptr = get_keyptr();

	hash[0] = (__force u32)saddr;
	hash[1] = (__force u32)daddr;
	hash[2] = ((__force u16)sport << 16) + (__force u16)dport;
	hash[3] = keyptr->secret[11];

	seq = half_md4_transform(hash, keyptr->secret);
	seq |= ((u64)keyptr->count) << (32 - HASH_BITS);

	seq += ktime_to_ns(ktime_get_real());
	seq &= (1ull << 48) - 1;

	return seq;
}
static int tw5864_enum_frameintervals(struct file *file, void *priv,
				      struct v4l2_frmivalenum *fintv)
{
	struct tw5864_input *input = video_drvdata(file);
	struct v4l2_fract frameinterval;
	int std_max_fps = input->std == STD_NTSC ? 30 : 25;
	struct v4l2_frmsizeenum fsize = { .index = fintv->index,
		.pixel_format = fintv->pixel_format };
	int ret;

	ret = tw5864_enum_framesizes(file, priv, &fsize);
	if (ret)
		return ret;

	if (fintv->width != fsize.discrete.width ||
	    fintv->height != fsize.discrete.height)
		return -EINVAL;

	fintv->type = V4L2_FRMIVAL_TYPE_STEPWISE;

	ret = tw5864_frameinterval_get(input, &frameinterval);
	fintv->stepwise.step = frameinterval;
	fintv->stepwise.min = frameinterval;
	fintv->stepwise.max = frameinterval;
	fintv->stepwise.max.numerator *= std_max_fps;

	return ret;
}
void validateCapacity(uint64_t new_capacity) {
  // If the resizing will cause buffer overflow due to hitting uint32_t::max, an OOM is likely
  // imminent. Fast-fail rather than allow a buffer overflow attack (issue #1421)
  RELEASE_ASSERT(new_capacity <= std::numeric_limits<uint32_t>::max(),
                 "Trying to allocate overly large headers.");
  ASSERT(new_capacity >= MinDynamicCapacity);
}
void hclge_tm_schd_info_update(struct hclge_dev *hdev, u8 num_tc)
{
	u8 bit_map = 0;
	u8 i;

	hdev->tm_info.num_tc = num_tc;

	for (i = 0; i < hdev->tm_info.num_tc; i++)
		bit_map |= BIT(i);

	if (!bit_map) {
		bit_map = 1;
		hdev->tm_info.num_tc = 1;
	}

	hdev->hw_tc_map = bit_map;

	hclge_tm_schd_info_init(hdev);
}
ALWAYS_INLINE void ScalarMulAdd(const float a, const float** inp, float** out) {
  **out += a * **inp;
  ++*inp;
  ++*out;
}
yang_type_free(struct ly_ctx *ctx, struct lys_type *type)
{
    struct yang_type *stype = (struct yang_type *)type->der;
    unsigned int i;

    if (!stype) {
        return ;
    }
    if (type->base == LY_TYPE_DER || type->base == LY_TYPE_UNION) {
        lydict_remove(ctx, stype->name);
        if (stype->base == LY_TYPE_IDENT && (!(stype->flags & LYS_NO_ERASE_IDENTITY))) {
            for (i = 0; i < type->info.ident.count; ++i) {
                free(type->info.ident.ref[i]);
            }
        }
        if (stype->base == LY_TYPE_UNION) {
            for (i = 0; i < type->info.uni.count; ++i) {
                yang_type_free(ctx, &type->info.uni.types[i]);
            }
            free(type->info.uni.types);
            type->base = LY_TYPE_DER;
        } else {
            type->base = stype->base;
        }
        free(stype);
        type->der = NULL;
    }
    lys_type_free(ctx, type, NULL);
    memset(type, 0, sizeof (struct lys_type));
}
static int keep_iface_ctl_put(struct snd_kcontrol *kcontrol,
			      struct snd_ctl_elem_value *ucontrol)
{
	struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
	bool keep_iface = !!ucontrol->value.integer.value[0];

	if (mixer->chip->keep_iface == keep_iface)
		return 0;
	mixer->chip->keep_iface = keep_iface;
	return 1;
}
LogFile() : m_file(NULL), m_bytes_written(0) {
    memset(m_file_name, 0, sizeof(m_file_name));
  }
STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s)
{
    if (!s->server)
        return s->s3.tmp.peer_ca_names;
    return s->client_ca_names != NULL ?  s->client_ca_names
                                      : s->ctx->client_ca_names;
}
ask (char const *format, ...)
{
  static int ttyfd = -2;
  ssize_t r;
  va_list args;

  va_start (args, format);
  vfprintf (stdout, format, args);
  va_end (args);
  fflush (stdout);

  if (ttyfd == -2)
    {
      /* If standard output is not a tty, don't bother opening /dev/tty,
	 since it's unlikely that stdout will be seen by the tty user.
	 The isatty test also works around a bug in GNU Emacs 19.34 under Linux
	 which makes a call-process 'patch' hang when it reads from /dev/tty.
	 POSIX.1-2001 XCU line 26599 requires that we read /dev/tty,
	 though.  */
      ttyfd = (posixly_correct || isatty (STDOUT_FILENO)
	       ? open (TTY_DEVICE, O_RDONLY)
	       : -1);
    }

  if (ttyfd < 0)
    {
      /* No terminal at all -- default it.  */
      printf ("\n");
      buf[0] = '\n';
      buf[1] = '\0';
    }
  else
    {
      size_t s = 0;
      while ((r = read (ttyfd, buf + s, bufsize - 1 - s)) == bufsize - 1 - s
	     && buf[bufsize - 2] != '\n')
	{
	  s = bufsize - 1;
	  bufsize *= 2;
	  buf = realloc (buf, bufsize);
	  if (!buf)
	    xalloc_die ();
	}
      if (r == 0)
	printf ("EOF\n");
      else if (r < 0)
	{
	  error (0, errno, "tty read failed");
	  ignore_value (close (ttyfd));
	  ttyfd = -1;
	  r = 0;
	}
      buf[s + r] = '\0';
    }
}
static void cmd_anal_ucall_ref (RCore *core, ut64 addr) {
	RAnalFunction * fcn = r_anal_get_function_at (core->anal, addr);
	if (fcn) {
		r_cons_printf (" ; %s", fcn->name);
	} else {
		r_cons_printf (" ; 0x%" PFMT64x, addr);
	}
}
static int network_set_interface(const sockent_t *se,
                                 const struct addrinfo *ai) /* {{{ */
{
  DEBUG("network plugin: network_set_interface: interface index = %i;",
        se->interface);

  assert(se->type == SOCKENT_TYPE_CLIENT);

  if (ai->ai_family == AF_INET) {
    struct sockaddr_in *addr = (struct sockaddr_in *)ai->ai_addr;

    if (IN_MULTICAST(ntohl(addr->sin_addr.s_addr))) {
#if HAVE_STRUCT_IP_MREQN_IMR_IFINDEX
      /* If possible, use the "ip_mreqn" structure which has
       * an "interface index" member. Using the interface
       * index is preferred here, because of its similarity
       * to the way IPv6 handles this. Unfortunately, it
       * appears not to be portable. */
      struct ip_mreqn mreq = {.imr_multiaddr.s_addr = addr->sin_addr.s_addr,
                              .imr_address.s_addr = ntohl(INADDR_ANY),
                              .imr_ifindex = se->interface};
#else
      struct ip_mreq mreq = {.imr_multiaddr.s_addr = addr->sin_addr.s_addr,
                             .imr_interface.s_addr = ntohl(INADDR_ANY)};
#endif

      if (setsockopt(se->data.client.fd, IPPROTO_IP, IP_MULTICAST_IF, &mreq,
                     sizeof(mreq)) != 0) {
        char errbuf[1024];
        ERROR("network plugin: setsockopt (ipv4-multicast-if): %s",
              sstrerror(errno, errbuf, sizeof(errbuf)));
        return (-1);
      }

      return (0);
    }
  } else if (ai->ai_family == AF_INET6) {
    struct sockaddr_in6 *addr = (struct sockaddr_in6 *)ai->ai_addr;

    if (IN6_IS_ADDR_MULTICAST(&addr->sin6_addr)) {
      if (setsockopt(se->data.client.fd, IPPROTO_IPV6, IPV6_MULTICAST_IF,
                     &se->interface, sizeof(se->interface)) != 0) {
        char errbuf[1024];
        ERROR("network plugin: setsockopt (ipv6-multicast-if): %s",
              sstrerror(errno, errbuf, sizeof(errbuf)));
        return (-1);
      }

      return (0);
    }
  }

  /* else: Not a multicast interface. */
  if (se->interface != 0) {
#if defined(HAVE_IF_INDEXTONAME) && HAVE_IF_INDEXTONAME &&                     \
    defined(SO_BINDTODEVICE)
    char interface_name[IFNAMSIZ];

    if (if_indextoname(se->interface, interface_name) == NULL)
      return (-1);

    DEBUG("network plugin: Binding socket to interface %s", interface_name);

    if (setsockopt(se->data.client.fd, SOL_SOCKET, SO_BINDTODEVICE,
                   interface_name, sizeof(interface_name)) == -1) {
      char errbuf[1024];
      ERROR("network plugin: setsockopt (bind-if): %s",
            sstrerror(errno, errbuf, sizeof(errbuf)));
      return (-1);
    }
/* #endif HAVE_IF_INDEXTONAME && SO_BINDTODEVICE */

#else
    WARNING("network plugin: Cannot set the interface on a unicast "
            "socket because "
#if !defined(SO_BINDTODEVICE)
            "the \"SO_BINDTODEVICE\" socket option "
#else
            "the \"if_indextoname\" function "
#endif
            "is not available on your system.");
#endif
  }

  return (0);
} /* }}} network_set_interface */
static void dump_info(FILE *dumpfile, int format, char *prefix, char *msg, ...)
  {
  if (format == DUMP_TEXT)
    {
    va_list ap;
    va_start(ap, msg);
    fprintf(dumpfile, "%s ", prefix);
    vfprintf(dumpfile, msg, ap);
    fprintf(dumpfile, "\n");
    va_end(ap);
    }
  }
static inline int ok_jpg_peek_bits(ok_jpg_decoder *decoder, int num_bits) {
    return (int)((decoder->input_buffer_bits >> (decoder->input_buffer_bit_count - num_bits)) &
                 ((1 << num_bits) - 1));
}
int util_log_priority(const char *priority)
{
	char *endptr;
	int prio;

	prio = strtol(priority, &endptr, 10);
	if (endptr[0] == '\0')
		return prio;
	if (strncasecmp(priority, "err", 3) == 0)
		return LOG_ERR;
	if (strcasecmp(priority, "info") == 0)
		return LOG_INFO;
	if (strcasecmp(priority, "debug") == 0)
		return LOG_DEBUG;
	return 0;
}