unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
80,145 | 0 | GF_Box *gnra_New()
{
ISOM_DECL_BOX_ALLOC(GF_GenericAudioSampleEntryBox, GF_ISOM_BOX_TYPE_GNRA);
gf_isom_audio_sample_entry_init((GF_AudioSampleEntryBox*) tmp);
return (GF_Box *)tmp;
}
| 12,800 |
148,475 | 0 | void WebContentsImpl::OnDomOperationResponse(RenderFrameHostImpl* source,
const std::string& json_string) {
std::string json = json_string;
NotificationService::current()->Notify(NOTIFICATION_DOM_OPERATION_RESPONSE,
Source<WebCont... | 12,801 |
118,966 | 0 | void WebContentsImpl::NotifySwappedFromRenderManager(RenderViewHost* rvh) {
NotifySwapped(rvh);
if (delegate_)
view_->SetOverscrollControllerEnabled(delegate_->CanOverscrollContent());
view_->RenderViewSwappedIn(render_manager_.current_host());
FrameTreeNode* root = NULL;
RenderViewHostImpl* new_rvh = ... | 12,802 |
59,943 | 0 | static void queue_autoload_drivers(void)
{
schedule_work(&autoload_work);
}
| 12,803 |
18,865 | 0 | static void icmp_unreach(struct sk_buff *skb)
{
const struct iphdr *iph;
struct icmphdr *icmph;
int hash, protocol;
const struct net_protocol *ipprot;
u32 info = 0;
struct net *net;
net = dev_net(skb_dst(skb)->dev);
/*
* Incomplete header ?
* Only checks for the IP header, there should be an
* addition... | 12,804 |
63,905 | 0 | SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags,
const struct itimerspec __user *, utmr,
struct itimerspec __user *, otmr)
{
struct itimerspec new, old;
int ret;
if (copy_from_user(&new, utmr, sizeof(new)))
return -EFAULT;
ret = do_timerfd_settime(ufd, flags, &new, &old);
if (ret)
return ret;
if (o... | 12,805 |
168,187 | 0 | UsbTabHelper::~UsbTabHelper() {}
| 12,806 |
142,483 | 0 | bool ShelfLayoutManager::ShouldChangeVisibilityAfterDrag(
const ui::GestureEvent& gesture_in_screen) {
if (visibility_state() == SHELF_VISIBLE)
return false;
if (gesture_in_screen.type() == ui::ET_GESTURE_SCROLL_END) {
const float kDragHideThreshold = 0.4f;
const gfx::Rect bounds = GetIdealBounds()... | 12,807 |
143,558 | 0 | GLSurfaceEGLSurfaceControl::SurfaceState::SurfaceState(
const SurfaceControl::Surface& parent)
: surface(new SurfaceControl::Surface(parent, kChildSurfaceName)) {}
| 12,808 |
145,152 | 0 | GpuProcessHost* GpuProcessHost::FromID(int host_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (int i = 0; i < GPU_PROCESS_KIND_COUNT; ++i) {
GpuProcessHost* host = g_gpu_process_hosts[i];
if (host && host->host_id_ == host_id && ValidateHost(host))
return host;
}
return nullptr;
}
| 12,809 |
3,974 | 0 | Guint EmbedStream::getStart() {
error(errInternal, -1, "Internal: called getStart() on EmbedStream");
return 0;
}
| 12,810 |
141,647 | 0 | AXTree::~AXTree() {
if (root_)
DestroyNodeAndSubtree(root_, nullptr);
for (auto& entry : table_info_map_)
delete entry.second;
table_info_map_.clear();
}
| 12,811 |
4,160 | 0 | Function::Function(const Function *func) {
m = func->m;
n = func->n;
memcpy(domain, func->domain, funcMaxInputs * 2 * sizeof(double));
memcpy(range, func->range, funcMaxOutputs * 2 * sizeof(double));
hasRange = func->hasRange;
}
| 12,812 |
134,229 | 0 | BrowserRootView::BrowserRootView(BrowserView* browser_view,
views::Widget* widget)
: views::internal::RootView(widget),
browser_view_(browser_view),
forwarding_to_tab_strip_(false) { }
| 12,813 |
47,077 | 0 | static void twofish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
{
twofish_dec_blk(crypto_tfm_ctx(tfm), dst, src);
}
| 12,814 |
184,102 | 1 | UpdateLibrary* CrosLibrary::GetUpdateLibrary() {
return update_lib_.GetDefaultImpl(use_stub_impl_);
}
| 12,815 |
113,655 | 0 | int32_t PPB_URLLoader_Impl::Open(PP_Resource request_id,
scoped_refptr<TrackedCallback> callback) {
if (main_document_loader_)
return PP_ERROR_INPROGRESS;
EnterResourceNoLock<PPB_URLRequestInfo_API> enter_request(request_id, true);
if (enter_request.failed()) {
Log(PP_LOG... | 12,816 |
124,676 | 0 | void RenderBlockFlow::adjustPositionedBlock(RenderBox* child, const MarginInfo& marginInfo)
{
bool isHorizontal = isHorizontalWritingMode();
bool hasStaticBlockPosition = child->style()->hasStaticBlockPosition(isHorizontal);
LayoutUnit logicalTop = logicalHeight();
updateStaticInlinePositionForChild(ch... | 12,817 |
169,856 | 0 | xsltExtStyleShutdownTest(xsltStylesheetPtr style ATTRIBUTE_UNUSED,
const xmlChar * URI, void *data)
{
if (testStyleData == NULL) {
xsltGenericError(xsltGenericErrorContext,
"xsltExtShutdownTest: not initialized\n");
return;
}
if (data != test... | 12,818 |
75,979 | 0 | kernel_rx_buf_size_handler(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
unsigned rx_buf_size;
if (vector_size(strvec) == 2 &&
read_unsigned_strvec(strvec, 1, &rx_buf_size, 0, UINT_MAX, false)) {
vrrp->kernel_rx_buf_size = rx_buf_size;
return;
}
report_config_error(CONFIG_GENERAL_E... | 12,819 |
39,120 | 0 | static int dccp_timeout_nlattr_to_obj(struct nlattr *tb[],
struct net *net, void *data)
{
struct dccp_net *dn = dccp_pernet(net);
unsigned int *timeouts = data;
int i;
/* set default DCCP timeouts. */
for (i=0; i<CT_DCCP_MAX; i++)
timeouts[i] = dn->dccp_timeout[i];
/* there's a 1:1 mapping between a... | 12,820 |
48,317 | 0 | horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
unsigned char *ToLinear8)
{
register unsigned int cr, cg, cb, ca, mask;
register unsigned char t0, t1, t2, t3;
if (n >= stride) {
mask = CODE_MASK;
if (stride == 3) {
op[0] = 0;
t1 = ToLinear8[cb = (wp[2] & mask)];
... | 12,821 |
122,449 | 0 | void HTMLTextAreaElement::setNonDirtyValue(const String& value)
{
setValueCommon(value);
m_isDirty = false;
setNeedsValidityCheck();
}
| 12,822 |
81,947 | 0 | static int cliSelect(void) {
redisReply *reply;
if (config.dbnum == 0) return REDIS_OK;
reply = redisCommand(context,"SELECT %d",config.dbnum);
if (reply != NULL) {
int result = REDIS_OK;
if (reply->type == REDIS_REPLY_ERROR) result = REDIS_ERR;
freeReplyObject(reply);
r... | 12,823 |
135,583 | 0 | void Editor::RemoveFormattingAndStyle() {
DCHECK(GetFrame().GetDocument());
RemoveFormatCommand::Create(*GetFrame().GetDocument())->Apply();
}
| 12,824 |
79,688 | 0 | R_API char *r_bin_java_build_obj_key(RBinJavaObj *bin) {
char *jvcname = NULL;
char *cname = r_bin_java_get_this_class_name (bin);
ut32 class_name_len = cname ? strlen (cname) : strlen ("_unknown_");
jvcname = malloc (class_name_len + 8 + 30);
if (cname) {
snprintf (jvcname, class_name_len + 30, "%d.%s.class", b... | 12,825 |
151,971 | 0 | mojom::FrameNavigationControl* RenderFrameHostImpl::GetNavigationControl() {
if (!navigation_control_)
GetRemoteAssociatedInterfaces()->GetInterface(&navigation_control_);
return navigation_control_.get();
}
| 12,826 |
116,317 | 0 | void QQuickWebViewLegacyPrivate::setZoomFactor(qreal factor)
{
webPageProxy->setPageZoomFactor(factor);
}
| 12,827 |
97,863 | 0 | void RenderView::AcceleratedSurfaceSetTransportDIB(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
TransportDIB::Handle transport_dib) {
Send(new ViewHostMsg_AcceleratedSurfaceSetTransportDIB(
routing_id(), window, width, height, transport_dib));
}
| 12,828 |
81,960 | 0 | static void getKeyFreqs(redisReply *keys, unsigned long long *freqs) {
redisReply *reply;
unsigned int i;
/* Pipeline OBJECT freq commands */
for(i=0;i<keys->elements;i++) {
redisAppendCommand(context, "OBJECT freq %s", keys->element[i]->str);
}
/* Retrieve freqs */
for(i=0;i<keys-... | 12,829 |
41,556 | 0 | void inet6_destroy_sock(struct sock *sk)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct ipv6_txoptions *opt;
/* Release rx options */
skb = xchg(&np->pktoptions, NULL);
if (skb)
kfree_skb(skb);
skb = xchg(&np->rxpmtu, NULL);
if (skb)
kfree_skb(skb);
/* Free flowlabels */
fl6_free_... | 12,830 |
137,926 | 0 | AXObject* AXLayoutObject::computeParentIfExists() const {
if (!m_layoutObject)
return 0;
if (ariaRoleAttribute() == MenuBarRole)
return axObjectCache().get(m_layoutObject->parent());
if (ariaRoleAttribute() == MenuRole) {
AXObject* parent = menuButtonForMenu();
if (parent)
return parent;
... | 12,831 |
15,008 | 0 | ProcQueryColors(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xQueryColorsReq);
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixReadAccess);
if (rc == Success) {
int coun... | 12,832 |
179,679 | 1 | static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len,
int flags)
{
struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct scm_cookie scm;
struct sock *sk = sock->sk;
struct netlink_sock *nlk = nlk_sk(sk);
int noblock = flags&MSG_DONTWAIT;
size_t copied;
struct sk_buff *sk... | 12,833 |
182,398 | 1 | struct symbol_t* MACH0_(get_symbols)(struct MACH0_(obj_t)* bin) {
const char *symstr;
struct symbol_t *symbols;
int from, to, i, j, s, stridx, symbols_size, symbols_count;
SdbHash *hash;
//ut64 text_base = get_text_base (bin);
if (!bin || !bin->symtab || !bin->symstr) {
return NULL;
}
/* parse symbol table */
/* parse... | 12,834 |
115,016 | 0 | void TestingAutomationProvider::SaveTabContents(
Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
int tab_index = 0;
FilePath::StringType filename;
FilePath::StringType parent_directory;
WebContents* web_contents = NULL;
if (!args->GetInteger("tab_index", &tab_index) ||
... | 12,835 |
121,759 | 0 | int UDPSocketLibevent::LeaveGroup(const IPAddressNumber& group_address) const {
DCHECK(CalledOnValidThread());
if (!is_connected())
return ERR_SOCKET_NOT_CONNECTED;
switch (group_address.size()) {
case kIPv4AddressSize: {
if (addr_family_ != AF_INET)
return ERR_ADDRESS_INVALID;
ip_mr... | 12,836 |
187,989 | 1 | static uint32_t readU32(const uint8_t* data, size_t offset) {
return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3];
}
| 12,837 |
108,609 | 0 | BlockingNetworkDelegateWithManualCallback()
: block_on_(0),
state_(NOT_BLOCKED) {
}
| 12,838 |
15,728 | 0 | static void put_unused_buffer(QEMUFile *f, void *pv, size_t size)
{
static const uint8_t buf[1024];
int block_len;
while (size > 0) {
block_len = MIN(sizeof(buf), size);
size -= block_len;
qemu_put_buffer(f, buf, block_len);
}
}
| 12,839 |
79,619 | 0 | void imap_disallow_reopen(struct Context *ctx)
{
struct ImapData *idata = NULL;
if (!ctx || !ctx->data || ctx->magic != MUTT_IMAP)
return;
idata = ctx->data;
if (idata->ctx == ctx)
idata->reopen &= ~IMAP_REOPEN_ALLOW;
}
| 12,840 |
80,901 | 0 | GF_Err txtc_dump(GF_Box *a, FILE * trace)
{
GF_TextConfigBox *ptr = (GF_TextConfigBox*)a;
const char *name = "TextConfigBox";
gf_isom_box_dump_start(a, name, trace);
fprintf(trace, ">\n");
if (ptr->config) fprintf(trace, "<![CDATA[%s]]>", ptr->config);
gf_isom_box_dump_done(name, a, trace);
return GF_OK;
}
| 12,841 |
80,545 | 0 | GF_Box *tmin_New()
{
ISOM_DECL_BOX_ALLOC(GF_TMINBox, GF_ISOM_BOX_TYPE_TMIN);
return (GF_Box *)tmp;
}
| 12,842 |
102,117 | 0 | void SyncManager::SyncInternal::BootstrapEncryption(
const std::string& restored_key_for_bootstrapping) {
ReadTransaction trans(FROM_HERE, GetUserShare());
Cryptographer* cryptographer = trans.GetCryptographer();
cryptographer->Bootstrap(restored_key_for_bootstrapping);
}
| 12,843 |
104,561 | 0 | ExtensionsQuotaServiceTest()
: extension_a_("a"),
extension_b_("b"),
extension_c_("c"),
loop_(),
ui_thread_(BrowserThread::UI, &loop_) {
}
| 12,844 |
188,529 | 1 | static void TearDownTestCase() {
vpx_free(input_ - 1);
input_ = NULL;
vpx_free(output_);
output_ = NULL;
}
| 12,845 |
51,857 | 0 | dissect_dch_radio_interface_parameter_update(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
{
int n;
guint8 value;
/* Show defined flags in these 2 bytes */
for (n=4; n >= 0; n--) {
proto_tree_add_item(tree, hf_fp_radio_interface_parameter_update_flag[n], tvb, offset, 2... | 12,846 |
181,028 | 1 | pimv1_print(netdissect_options *ndo,
register const u_char *bp, register u_int len)
{
register const u_char *ep;
register u_char type;
ep = (const u_char *)ndo->ndo_snapend;
if (bp >= ep)
return;
ND_TCHECK(bp[1]);
type = bp[1];
ND_PRINT((ndo, " %s", tok2str(pimv1_type_str, "[type %u]", type)));
switch (type) {
c... | 12,847 |
46,419 | 0 | int ubifs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
{
struct inode *inode = file->f_mapping->host;
struct ubifs_info *c = inode->i_sb->s_fs_info;
int err;
dbg_gen("syncing inode %lu", inode->i_ino);
if (c->ro_mount)
/*
* For some really strange reasons VFS does not filter out
* 'fs... | 12,848 |
88,929 | 0 | MagickExport ChannelMoments *GetImageChannelMoments(const Image *image,
ExceptionInfo *exception)
{
#define MaxNumberImageMoments 8
ChannelMoments
*channel_moments;
double
M00[CompositeChannels+1],
M01[CompositeChannels+1],
M02[CompositeChannels+1],
M03[CompositeChannels+1],
M10[Composi... | 12,849 |
104,820 | 0 | void ExtensionService::SetIsIncognitoEnabled(
const std::string& extension_id, bool enabled) {
const Extension* extension = GetInstalledExtension(extension_id);
if (extension && extension->location() == Extension::COMPONENT) {
NOTREACHED();
return;
}
bool old_enabled = extension_prefs_->IsIncognito... | 12,850 |
1,322 | 0 | EntityDescriptor* DynamicMetadataProvider::resolve(const Criteria& criteria) const
{
string name;
if (criteria.entityID_ascii) {
name = criteria.entityID_ascii;
}
else if (criteria.entityID_unicode) {
auto_ptr_char temp(criteria.entityID_unicode);
name = temp.get();
}
els... | 12,851 |
165,779 | 0 | CSSPropertyID SVGElement::CssPropertyIdForSVGAttributeName(
const QualifiedName& attr_name) {
if (!attr_name.NamespaceURI().IsNull())
return CSSPropertyInvalid;
static HashMap<StringImpl*, CSSPropertyID>* property_name_to_id_map = nullptr;
if (!property_name_to_id_map) {
property_name_to_id_map = new... | 12,852 |
29,374 | 0 | static int get_device_type(int arg)
{
int ret;
ret = inb(mp_devs[arg].option_reg_addr+MP_OPTR_DIR0);
ret = (ret & 0xf0) >> 4;
switch (ret)
{
case DIR_UART_16C550:
return PORT_16C55X;
case DIR_UART_16C1050:
return PORT... | 12,853 |
146,265 | 0 | PassRefPtr<DrawingBuffer> WebGLRenderingContextBase::CreateDrawingBuffer(
std::unique_ptr<WebGraphicsContext3DProvider> context_provider) {
bool premultiplied_alpha = CreationAttributes().premultipliedAlpha();
bool want_alpha_channel = CreationAttributes().alpha();
bool want_depth_buffer = CreationAttributes(... | 12,854 |
123,267 | 0 | virtual ~WindowObserver() {}
| 12,855 |
11,364 | 0 | fbCombineDisjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 combine)
{
int i;
for (i = 0; i < width; ++i) {
CARD32 s = READ(src + i);
CARD32 d = READ(dest + i);
CARD32 m,n,o,p;
CARD16 Fa, Fb, t, u, v;
CARD8 sa = s >> 24;
CARD8 da = d >> 24;
... | 12,856 |
34,916 | 0 | struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data)
{
struct rpc_task *task;
task = rpc_new_task(task_setup_data);
if (IS_ERR(task))
goto out;
rpc_task_set_client(task, task_setup_data->rpc_client);
rpc_task_set_rpc_message(task, task_setup_data->rpc_message);
if (task->tk_action == N... | 12,857 |
49,771 | 0 | static uint8_t arcmsr_hbaB_abort_allcmd(struct AdapterControlBlock *acb)
{
struct MessageUnit_B *reg = acb->pmuB;
writel(ARCMSR_MESSAGE_ABORT_CMD, reg->drv2iop_doorbell);
if (!arcmsr_hbaB_wait_msgint_ready(acb)) {
printk(KERN_NOTICE
"arcmsr%d: wait 'abort all outstanding command' timeout\n"
, acb->host->hos... | 12,858 |
100,202 | 0 | PluginHelper::~PluginHelper() {
DCHECK(CalledOnValidThread());
}
| 12,859 |
118,148 | 0 | void JavaScriptResultCallback(const ScopedJavaGlobalRef<jobject>& callback,
const base::Value* result) {
JNIEnv* env = base::android::AttachCurrentThread();
std::string json;
base::JSONWriter::Write(result, &json);
ScopedJavaLocalRef<jstring> j_json = ConvertUTF8ToJavaString(env, j... | 12,860 |
2,405 | 0 | void smb1cli_conn_set_encryption(struct smbXcli_conn *conn,
struct smb_trans_enc_state *es)
{
/* Replace the old state, if any. */
if (conn->smb1.trans_enc) {
TALLOC_FREE(conn->smb1.trans_enc);
}
conn->smb1.trans_enc = es;
}
| 12,861 |
123,849 | 0 | void RenderViewImpl::DidFlushPaint() {
pepper_helper_->ViewFlushedPaint();
if (!webview())
return;
WebFrame* main_frame = webview()->mainFrame();
if (!main_frame->provisionalDataSource()) {
WebDataSource* ds = main_frame->dataSource();
DocumentState* document_state = DocumentState::FromDataSource... | 12,862 |
98,679 | 0 | void BuildMouseWheelEvent(const WebInputEvent* event, NPPepperEvent* npevent) {
const WebMouseWheelEvent* mouse_wheel_event =
reinterpret_cast<const WebMouseWheelEvent*>(event);
npevent->u.wheel.modifier = mouse_wheel_event->modifiers;
npevent->u.wheel.deltaX = mouse_wheel_event->deltaX;
npevent->u.wheel.... | 12,863 |
51,317 | 0 | FileFunction(fstat)
/* }}} */
/* {{{ proto bool SplFileObject::ftruncate(int size)
| 12,864 |
119,240 | 0 | PassRefPtr<HTMLCollection> HTMLFormElement::elements()
{
return ensureCachedHTMLCollection(FormControls);
}
| 12,865 |
121,036 | 0 | int HttpStreamParser::DoSendBody(int result) {
request_body_send_buf_->DidConsume(result);
if (request_body_send_buf_->BytesRemaining() > 0) {
return connection_->socket()->Write(
request_body_send_buf_,
request_body_send_buf_->BytesRemaining(),
io_callback_);
}
if (request_->uploa... | 12,866 |
59,919 | 0 | static int uas_wait_for_pending_cmnds(struct uas_dev_info *devinfo)
{
unsigned long start_time;
int r;
start_time = jiffies;
do {
flush_work(&devinfo->work);
r = usb_wait_anchor_empty_timeout(&devinfo->sense_urbs, 5000);
if (r == 0)
return -ETIME;
r = usb_wait_anchor_empty_timeout(&devinfo->data_urbs,... | 12,867 |
101,468 | 0 | bool DirectoryBackingStore::MigrateVersion74To75() {
if (SQLITE_DONE != ExecQuery(load_dbhandle_,
"ALTER TABLE models RENAME TO temp_models")) {
return false;
}
if (!CreateModelsTable())
return false;
sqlite_utils::SQLStatement query;
query.prepare(load_dbhandle_,
"SELECT model_id, l... | 12,868 |
35,291 | 0 | int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq)
{
int rc;
if (rxq < 1 || rxq > dev->num_rx_queues)
return -EINVAL;
if (dev->reg_state == NETREG_REGISTERED) {
ASSERT_RTNL();
rc = net_rx_queue_update_kobjects(dev, dev->real_num_rx_queues,
rxq);
if (rc)
return rc;
}
d... | 12,869 |
12,640 | 0 | chash_start(int type, void *base)
{
if (type == HMAC_MD5)
md5_start((md5 *)base);
else
sha1_start((sha1 *)base);
}
| 12,870 |
94,107 | 0 | static u8 iwlagn_key_sta_id(struct iwl_priv *priv,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{
struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv;
u8 sta_id = IWL_INVALID_STATION;
if (sta)
sta_id = iwl_sta_id(sta);
/*
* The device expects GTKs for station interfaces to be
* inst... | 12,871 |
37,144 | 0 | static void nested_release_page(struct page *page)
{
kvm_release_page_dirty(page);
}
| 12,872 |
168,936 | 0 | void DevToolsAgentHostImpl::NotifyCreated() {
DCHECK(g_devtools_instances.Get().find(id_) ==
g_devtools_instances.Get().end());
g_devtools_instances.Get()[id_] = this;
for (auto& observer : g_devtools_observers.Get())
observer.DevToolsAgentHostCreated(this);
}
| 12,873 |
86,694 | 0 | static void blk_mq_exit_hw_queues(struct request_queue *q,
struct blk_mq_tag_set *set, int nr_queue)
{
struct blk_mq_hw_ctx *hctx;
unsigned int i;
queue_for_each_hw_ctx(q, hctx, i) {
if (i == nr_queue)
break;
blk_mq_exit_hctx(q, set, hctx, i);
}
}
| 12,874 |
8,142 | 0 | void Gfx::opSetFillCMYKColor(Object args[], int numArgs) {
GfxColor color;
int i;
if (textHaveCSPattern && drawText) {
GBool needFill = out->deviceHasTextClip(state);
out->endTextObject(state);
if (needFill) {
doPatternFill(gTrue);
}
out->restoreState(state);
}
state->setFillPattern... | 12,875 |
63,895 | 0 | static inline bool sanity_check_area_boundary(struct f2fs_sb_info *sbi,
struct buffer_head *bh)
{
struct f2fs_super_block *raw_super = (struct f2fs_super_block *)
(bh->b_data + F2FS_SUPER_OFFSET);
struct super_block *sb = sbi->sb;
u32 segment0_blkaddr = le32_to_cpu(raw_super->segment0_blkaddr);
u32 cp_blk... | 12,876 |
138,296 | 0 | unsigned AXTableCell::ariaRowIndex() const {
const AtomicString& rowIndex = getAttribute(aria_rowindexAttr);
if (rowIndex.toInt() >= 1)
return rowIndex.toInt();
AXObject* parent = parentObjectUnignored();
if (!parent || !parent->isTableRow())
return 0;
return toAXTableRow(parent)->ariaRowIndex();
}
| 12,877 |
65,683 | 0 | put_clnt_odstate(struct nfs4_clnt_odstate *co)
{
struct nfs4_file *fp;
if (!co)
return;
fp = co->co_file;
if (atomic_dec_and_lock(&co->co_odcount, &fp->fi_lock)) {
list_del(&co->co_perfile);
spin_unlock(&fp->fi_lock);
nfsd4_return_all_file_layouts(co->co_client, fp);
kmem_cache_free(odstate_slab, co);
... | 12,878 |
42,404 | 0 | static int lock_rdev(struct md_rdev *rdev, dev_t dev, int shared)
{
int err = 0;
struct block_device *bdev;
char b[BDEVNAME_SIZE];
bdev = blkdev_get_by_dev(dev, FMODE_READ|FMODE_WRITE|FMODE_EXCL,
shared ? (struct md_rdev *)lock_rdev : rdev);
if (IS_ERR(bdev)) {
printk(KERN_ERR "md: could not open %s.\n",
... | 12,879 |
4,526 | 0 | PHP_FUNCTION(openssl_encrypt)
{
zend_long options = 0;
char *data, *method, *password, *iv = "";
size_t data_len, method_len, password_len, iv_len = 0, max_iv_len;
const EVP_CIPHER *cipher_type;
EVP_CIPHER_CTX *cipher_ctx;
int i=0, keylen;
size_t outlen;
zend_string *outbuf;
unsigned char *key;
zend_bool free... | 12,880 |
65,156 | 0 | static int sctp_getname(struct socket *sock, struct sockaddr *uaddr,
int *uaddr_len, int peer)
{
int rc;
rc = inet6_getname(sock, uaddr, uaddr_len, peer);
if (rc != 0)
return rc;
*uaddr_len = sctp_v6_addr_to_user(sctp_sk(sock->sk),
(union sctp_addr *)uaddr);
return rc;
}
| 12,881 |
8,288 | 0 | XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes)
{
XRRScreenConfiguration *config;
XExtDisplayInfo *info = XRRFindDisplay(dpy);
XRRScreenSize *sizes;
LockDisplay(dpy);
if ((config = _XRRValidateCache(dpy, info, screen))) {
*nsizes = config->nsizes;
sizes = config->sizes;
UnlockDispl... | 12,882 |
149,021 | 0 | static int btreeInitPage(MemPage *pPage){
assert( pPage->pBt!=0 );
assert( pPage->pBt->db!=0 );
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
assert( pPage->aData == sqlite3PagerGetDat... | 12,883 |
155,242 | 0 | void HTMLFormElement::reset() {
LocalFrame* frame = document().frame();
if (m_isInResetFunction || !frame)
return;
m_isInResetFunction = true;
if (dispatchEvent(Event::createCancelableBubble(EventTypeNames::reset)) !=
DispatchEventResult::NotCanceled) {
m_isInResetFunction = false;
return;
... | 12,884 |
61,104 | 0 | nautilus_file_operations_copy_move (const GList *item_uris,
GArray *relative_item_points,
const char *target_dir,
GdkDragAction copy_action,
... | 12,885 |
87,295 | 0 | static MagickBooleanType TraceRoundRectangle(MVGInfo *mvg_info,
const PointInfo start,const PointInfo end,PointInfo arc)
{
PointInfo
degrees,
point,
segment;
PrimitiveInfo
*primitive_info;
register PrimitiveInfo
*p;
register ssize_t
i;
ssize_t
offset;
offset=mvg_info->offs... | 12,886 |
73,988 | 0 | show_status (int dtr_up)
{
int baud, bits;
enum flowcntrl_e flow;
enum parity_e parity;
term_refresh(tty_fd);
baud = term_get_baudrate(tty_fd, NULL);
flow = term_get_flowcntrl(tty_fd);
parity = term_get_parity(tty_fd);
bits = term_get_databits(tty_fd);
fd_printf(STO, "\r\n");
if ( baud != opts.baud ) {... | 12,887 |
162,308 | 0 | SharedMemoryHandleProvider::Handle::Handle(SharedMemoryHandleProvider* owner)
: owner_(owner) {}
| 12,888 |
115,060 | 0 | void TestingAutomationProvider::WaitForNotificationCount(
Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
int count;
if (!args->GetInteger("count", &count)) {
AutomationJSONReply(this, reply_message)
.SendError("'count' missing or invalid.");
return;
}
new OnN... | 12,889 |
95,758 | 0 | qboolean FS_CheckDirTraversal(const char *checkdir)
{
if(strstr(checkdir, "../") || strstr(checkdir, "..\\"))
return qtrue;
return qfalse;
}
| 12,890 |
181,559 | 1 | void iov_iter_pipe(struct iov_iter *i, int direction,
struct pipe_inode_info *pipe,
size_t count)
{
BUG_ON(direction != ITER_PIPE);
i->type = direction;
i->pipe = pipe;
i->idx = (pipe->curbuf + pipe->nrbufs) & (pipe->buffers - 1);
i->iov_offset = 0;
i->count = count;
}
| 12,891 |
47,480 | 0 | static int ablk_dma_crypt(struct ablkcipher_request *areq)
{
struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq);
struct cryp_ctx *ctx = crypto_ablkcipher_ctx(cipher);
struct cryp_device_data *device_data;
int bytes_written = 0;
int bytes_read = 0;
int ret;
pr_debug(DEV_DBG_NAME " [%s]", __func__... | 12,892 |
5,024 | 0 | ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
int offset_day, long offset_sec, time_t *in_tm)
{
time_t t;
if (in_tm)
t = *in_tm;
else
time(&t);
if (s && !(s->flags & ASN1_STRING_FLAG_MSTRING)) {
if (s->type == V_ASN1_UTCTIME)
return ASN1_UTCT... | 12,893 |
175,956 | 0 | void smp_send_pair_fail(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
p_cb->status = p_data->status;
p_cb->failure = p_data->status;
SMP_TRACE_DEBUG("%s: status=%d failure=%d ", __func__, p_cb->status,
p_cb->failure);
if (p_cb->status <= SMP_MAX_FAIL_RSN_PER_SPEC &&
p_cb->status != SMP_SUCCES... | 12,894 |
51,921 | 0 | get_key_string(decryption_key_t* dk)
{
gchar* output_string = NULL;
if(dk == NULL || dk->key == NULL)
return NULL;
switch(dk->type) {
case AIRPDCAP_KEY_TYPE_WEP:
output_string = g_strdup(dk->key->str);
break;
case AIRPDCAP_KEY_TYPE_WPA_PWD:
if(dk... | 12,895 |
114,266 | 0 | GpuListenerInfo::~GpuListenerInfo() {
}
| 12,896 |
2,735 | 0 | copy_attr_free (struct error_context *ctx, char const *str)
{
}
| 12,897 |
188,212 | 1 | OMX_ERRORTYPE SoftAACEncoder2::internalGetParameter(
OMX_INDEXTYPE index, OMX_PTR params) {
switch (index) {
case OMX_IndexParamAudioPortFormat:
{
OMX_AUDIO_PARAM_PORTFORMATTYPE *formatParams =
(OMX_AUDIO_PARAM_PORTFORMATTYPE *)params;
if (formatParams->nPortInde... | 12,898 |
19,532 | 0 | static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
{
struct primaryVolDesc *pvoldesc;
struct ustr *instr, *outstr;
struct buffer_head *bh;
uint16_t ident;
int ret = 1;
instr = kmalloc(sizeof(struct ustr), GFP_NOFS);
if (!instr)
return 1;
outstr = kmalloc(sizeof(struct ustr), GFP_NOFS);
if... | 12,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.