idx int64 | func string | target int64 |
|---|---|---|
129,679 |
static int ims_pcu_init_bootloader_mode(struct ims_pcu *pcu)
{
int error;
error = ims_pcu_execute_bl_command(pcu, QUERY_DEVICE, NULL, 0,
IMS_PCU_CMD_RESPONSE_TIMEOUT);
if (error) {
dev_err(pcu->dev, "Bootloader does not respond, aborting\n");
return error;
}
pcu->fw_start_addr =
get_unaligned_le32... | 0 |
347,518 | static const char *GetOpenCLCacheDirectory()
{
if (cache_directory == (char *) NULL)
{
if (cache_directory_lock == (SemaphoreInfo *) NULL)
ActivateSemaphoreInfo(&cache_directory_lock);
LockSemaphoreInfo(cache_directory_lock);
if (cache_directory == (char *) NULL)
{
char... | 1 |
9,105 | char* dd_load_text_ext(const struct dump_dir *dd, const char *name, unsigned flags)
{
// if (!dd->locked)
// error_msg_and_die("dump_dir is not opened"); /* bug */
/* Compat with old abrt dumps. Remove in abrt-2.1 */
if (strcmp(name, "release") == 0)
name = FILENAME_OS_RELEASE;
char *ful... | 1 |
91,949 | smb2_async_readv(struct cifs_readdata *rdata)
{
int rc, flags = 0;
char *buf;
struct smb2_sync_hdr *shdr;
struct cifs_io_parms io_parms;
struct smb_rqst rqst = { .rq_iov = rdata->iov,
.rq_nvec = 1 };
struct TCP_Server_Info *server;
unsigned int total_len;
cifs_dbg(FYI, "%s: offset=%llu bytes=%u\n",
__f... | 0 |
227,961 | ttfFont *ttfFont__create(gs_font_dir *dir)
{
gs_memory_t *mem = dir->memory->stable_memory;
ttfFont *ttf;
if (dir->ttm == NULL) {
gx_ttfMemory *m = gs_alloc_struct(mem, gx_ttfMemory, &st_gx_ttfMemory, "ttfFont__create(gx_ttfMemory)");
if (!m)
return 0;
m->super.alloc_st... | 0 |
274,162 | static int create_discard_cmd_control(struct f2fs_sb_info *sbi)
{
dev_t dev = sbi->sb->s_bdev->bd_dev;
struct discard_cmd_control *dcc;
int err = 0, i;
if (SM_I(sbi)->dcc_info) {
dcc = SM_I(sbi)->dcc_info;
goto init_thread;
}
dcc = kzalloc(sizeof(struct discard_cmd_control), GFP_KERNEL);
if (!dcc)
return... | 0 |
168,069 | void smp_decide_association_model(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
uint8_t int_evt = 0;
tSMP_INT_DATA smp_int_data;
SMP_TRACE_DEBUG("%s Association Model = %d", __func__,
p_cb->selected_association_model);
switch (p_cb->selected_association_model) {
case SMP_MODEL_ENCRYPTION_ONLY: /* T... | 0 |
151,947 | const char *gf_m4a_object_type_name(u32 objectType)
{
switch (objectType) {
case 0:
return "MPEG-4 Audio Reserved";
case 1:
return "MPEG-4 Audio AAC Main";
case 2:
return "MPEG-4 Audio AAC LC";
case 3:
return "MPEG-4 Audio AAC SSR";
case 4:
return "MPEG-4 Audio AAC LTP";
case 5:
return "MPEG-4 Audio ... | 0 |
519,984 | void set_first_query_block(Query_cache_block *first_query_block_arg)
{
first_query_block= first_query_block_arg;
} | 0 |
48,134 | static unsigned int hiddev_poll(struct file *file, poll_table *wait)
{
struct hiddev_list *list = file->private_data;
poll_wait(file, &list->hiddev->wait, wait);
if (list->head != list->tail)
return POLLIN | POLLRDNORM;
if (!list->hiddev->exist)
return POLLERR | POLLHUP;
return 0;
} | 0 |
518,610 | virtual void get_image(uchar *buff, uint length, CHARSET_INFO *cs)
{ memcpy(buff,ptr,length); } | 0 |
80,881 | static long region_del(struct resv_map *resv, long f, long t)
{
struct list_head *head = &resv->regions;
struct file_region *rg, *trg;
struct file_region *nrg = NULL;
long del = 0;
retry:
spin_lock(&resv->lock);
list_for_each_entry_safe(rg, trg, head, link) {
/*
* Skip regions before the range to be deleted... | 0 |
494,910 | static unsigned long snd_pcm_get_unmapped_area(struct file *file,
unsigned long addr,
unsigned long len,
unsigned long pgoff,
unsigned long flags)
{
struct snd_pcm_file *pcm_file = file->private_data;
struct snd_pcm_substream *substream = pcm_file->substream;
struct sn... | 0 |
431,062 | static int sisusb_write_memio_byte(struct sisusb_usb_data *sisusb, int type,
u32 addr, u8 data)
{
struct sisusb_packet packet;
packet.header = (1 << (addr & 3)) | (type << 6);
packet.address = addr & ~3;
packet.data = data << ((addr & 3) << 3);
return sisusb_send_packet(sisusb, 10, &packet);
} | 0 |
307,033 | GDataFileSystem::~GDataFileSystem() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
feed_loader_->RemoveObserver(this);
documents_service_->CancelAll();
}
| 0 |
159,757 | CACHE_BITMAP_V2_ORDER* copy_cache_bitmap_v2_order(rdpContext* context,
const CACHE_BITMAP_V2_ORDER* order)
{
CACHE_BITMAP_V2_ORDER* dst = calloc(1, sizeof(CACHE_BITMAP_V2_ORDER));
if (!dst || !order)
goto fail;
*dst = *order;
if (order->bitmapLength > 0)
{
d... | 0 |
32,701 | static void init_cv_nb10_header(SCV_NB10_HEADER* cv_nb10_header) {
memset (cv_nb10_header, 0, sizeof (SCV_NB10_HEADER));
cv_nb10_header->free = (void (*)(struct SCV_NB10_HEADER*))free_cv_nb10_header;
} | 0 |
288,819 | static void dissect_zcl_ota_file_version_field ( tvbuff_t * tvb , proto_tree * tree , guint * offset ) {
static const int * file_version [ ] = {
& hf_zbee_zcl_ota_file_version_appl_release , & hf_zbee_zcl_ota_file_version_appl_build , & hf_zbee_zcl_ota_file_version_stack_release , & hf_zbee_zcl_ota_file_version_stack... | 0 |
446,171 | virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt,
unsigned int flags)
{
char *p;
virSecurityLabelDefPtr seclabel = NULL;
p = virXMLPropStringLimit(ctxt->node, "model",
VIR_SECURITY_MODEL_BUFLEN - 1);
if (!(seclabel = virSecurityLabelDefNew(p... | 0 |
147,443 | static int write_reuc_extension(git_index *index, git_filebuf *file)
{
git_buf reuc_buf = GIT_BUF_INIT;
git_vector *out = &index->reuc;
git_index_reuc_entry *reuc;
struct index_extension extension;
size_t i;
int error = 0;
git_vector_foreach(out, i, reuc) {
if ((error = create_reuc_extension_data(&reuc_buf, r... | 0 |
188,771 | bool is_showing() const {
return static_cast<content::TestRenderWidgetHostView*>(
GetRenderViewHostForTesting()->GetView())->is_showing();
}
| 0 |
244,234 | BufferManager::BufferInfo* GetBufferInfoForTarget(GLenum target) {
DCHECK(target == GL_ARRAY_BUFFER || target == GL_ELEMENT_ARRAY_BUFFER);
BufferManager::BufferInfo* info = target == GL_ARRAY_BUFFER ?
bound_array_buffer_ : bound_element_array_buffer_;
return info;
}
| 0 |
1,646 | static void fmtint ( char * * sbuffer , char * * buffer , size_t * currlen , size_t * maxlen , LLONG value , int base , int min , int max , int flags ) {
int signvalue = 0 ;
const char * prefix = "" ;
unsigned LLONG uvalue ;
char convert [ DECIMAL_SIZE ( value ) + 3 ] ;
int place = 0 ;
int spadlen = 0 ;
int zpad... | 1 |
247,973 | Node::InsertionNotificationRequest HTMLInputElement::InsertedInto(
ContainerNode* insertion_point) {
TextControlElement::InsertedInto(insertion_point);
if (insertion_point->isConnected() && !Form())
AddToRadioButtonGroup();
ResetListAttributeTargetObserver();
LogAddElementIfIsolatedWorldAndInDocument("i... | 0 |
75,512 | qemuProcessHandleAgentEOF(qemuAgentPtr agent,
virDomainObjPtr vm)
{
qemuDomainObjPrivatePtr priv;
VIR_DEBUG("Received EOF from agent on %p '%s'", vm, vm->def->name);
virObjectLock(vm);
priv = vm->privateData;
if (!priv->agent) {
VIR_DEBUG("Agent freed already");... | 0 |
165,709 | void WebContentsImpl::OnDidRunInsecureContent(
const std::string& security_origin, const GURL& target_url) {
LOG(WARNING) << security_origin << " ran insecure content from "
<< target_url.possibly_invalid_spec();
RecordAction(base::UserMetricsAction("SSL.RanInsecureContent"));
if (EndsWith(secu... | 0 |
215,664 | ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
{
struct session_state *state = ssh->state;
int len, r, ms_remain;
fd_set *setp;
char buf[8192];
struct timeval timeout, start, *timeoutp = NULL;
DBG(debug("packet_read()"));
setp = calloc(howmany(state->connection_in + 1,
NFDBITS),... | 0 |
370,306 | xsltInitDocKeyTable(xsltTransformContextPtr ctxt, const xmlChar *name,
const xmlChar *nameURI)
{
xsltStylesheetPtr style;
xsltKeyDefPtr keyd = NULL;
int found = 0;
#ifdef KEY_INIT_DEBUG
fprintf(stderr, "xsltInitDocKeyTable %s\n", name);
#endif
style = ctxt->style;
while (style ... | 0 |
15,031 | static int idr_start ( struct archive_write * a , struct idr * idr , int cnt , int ffmax , int num_size , int null_size , const struct archive_rb_tree_ops * rbt_ops ) {
int r ;
( void ) ffmax ;
r = idr_ensure_poolsize ( a , idr , cnt ) ;
if ( r != ARCHIVE_OK ) return ( r ) ;
__archive_rb_tree_init ( & ( idr -> rbt... | 0 |
187,751 | void FrameLoader::detachFromParent()
{
RefPtr<Frame> protect(m_frame);
closeURL();
stopAllLoaders();
history()->saveScrollPositionAndViewStateToItem(history()->currentItem());
detachChildren();
#if ENABLE(INSPECTOR)
if (Page* page = m_frame->page())
page->inspectorController()->frameDe... | 0 |
454,514 | TEST_F(DateExpressionTest, AcceptsObjectIds) {
auto expCtx = getExpCtx();
for (auto&& expName : dateExpressions) {
BSONObj spec = BSON(expName << "$oid");
auto dateExp = Expression::parseExpression(expCtx, spec, expCtx->variablesParseState);
auto contextDoc = Document{{"oid", OID::gen()}... | 0 |
158,429 | test_custom_timeout (Test *test,
gconstpointer data)
{
cockpit_expect_message ("*session timed out*");
test_custom_fail (test, data);
} | 0 |
446,168 | virDomainVcpuPinDefParseXML(virDomainDefPtr def,
xmlNodePtr node)
{
virDomainVcpuDefPtr vcpu;
unsigned int vcpuid;
g_autofree char *tmp = NULL;
if (!(tmp = virXMLPropString(node, "vcpu"))) {
virReportError(VIR_ERR_XML_ERROR, "%s", _("missing vcpu id in vcpupin"));
... | 0 |
384,749 | static char* get_executable(pid_t pid, int *fd_p)
{
char buf[sizeof("/proc/%lu/exe") + sizeof(long)*3];
sprintf(buf, "/proc/%lu/exe", (long)pid);
if (fd_p)
*fd_p = open(buf, O_RDONLY); /* might fail and return -1, it's ok */
char *executable = malloc_readlink(buf);
if (!executable)
... | 0 |
443,950 | test_connection_missing_server_identity (TestConnection *test,
gconstpointer data)
{
GIOStream *connection;
GError *error = NULL;
test->database = g_tls_file_database_new (tls_test_file_path ("ca-roots.pem"), &error);
g_assert_no_error (error);
g_assert_nonnull (tes... | 0 |
364,059 | uschar *dkim_exim_expand_query(int what) {
if (!dkim_verify_ctx ||
dkim_disable_verify ||
!dkim_cur_sig) return dkim_exim_expand_defaults(what);
switch(what) {
case DKIM_ALGO:
switch(dkim_cur_sig->algo) {
case PDKIM_ALGO_RSA_SHA1:
return US"rsa-sha1";
case PDKIM_ALG... | 0 |
204,701 | static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info);
TRACE_EVENT_SET... | 0 |
118,979 | void purple_transfer_request(struct im_connection *ic, file_transfer_t *ft, char *handle)
{
struct prpl_xfer_data *px = g_new0(struct prpl_xfer_data, 1);
struct purple_data *pd;
char *dir, *basename;
ft->data = px;
px->ft = ft;
px->ft->free = prpl_xfer_free;
dir = g_strdup("/tmp/bitlbee-purple-ft.XXXXXX");
if... | 0 |
180,297 | void get_checksum2(char *buf, int32 len, char *sum)
{
md_context m;
switch (xfersum_type) {
case CSUM_MD5: {
uchar seedbuf[4];
md5_begin(&m);
if (proper_seed_order) {
if (checksum_seed) {
SIVALu(seedbuf, 0, checksum_seed);
md5_update(&m, seedbuf, 4);
}
md5_update(&m, (uchar *)buf, len);
}... | 0 |
371,656 | context_offers_target (GdkDragContext *context,
GdkAtom target)
{
return (g_list_find (gdk_drag_context_list_targets (context), target) != NULL);
} | 0 |
209,353 | UsbCloseDeviceFunction::UsbCloseDeviceFunction() {
}
| 0 |
143,670 | bool kvm_rdpmc(struct kvm_vcpu *vcpu)
{
u32 ecx = kvm_register_read(vcpu, VCPU_REGS_RCX);
u64 data;
int err;
err = kvm_pmu_rdpmc(vcpu, ecx, &data);
if (err)
return err;
kvm_register_write(vcpu, VCPU_REGS_RAX, (u32)data);
kvm_register_write(vcpu, VCPU_REGS_RDX, data >> 32);
return err;
} | 0 |
306,080 | command_key_event (FepClient *client,
FepControlMessage *request,
FepControlMessage *response)
{
FepEventKey event;
int retval;
uint32_t intval;
retval = _fep_control_message_read_uint32_arg (request, 0, &intval);
if (retval < 0)
{
fep_log (FEP_LOG_LEVEL_WARNING, "can't read keyval");
... | 0 |
181,076 | void SyncManager::SyncInternal::OnSyncEngineEvent(
const SyncEngineEvent& event) {
DCHECK(thread_checker_.CalledOnValidThread());
if (event.what_happened == SyncEngineEvent::SYNC_CYCLE_ENDED) {
ModelSafeRoutingInfo enabled_types;
registrar_->GetModelSafeRoutingInfo(&enabled_types);
{
sync_api:... | 0 |
206,783 | bool verifyJavaStringFormat(const StringPiece16& str) {
const char16_t* c = str.begin();
const char16_t* const end = str.end();
size_t argCount = 0;
bool nonpositional = false;
while (c != end) {
if (*c == u'%' && c + 1 < end) {
c++;
if (*c == u'%') {
c++;
continue;
}
... | 0 |
353,661 | rsvg_state_finalize (RsvgState * state)
{
g_free (state->font_family);
g_free (state->lang);
rsvg_paint_server_unref (state->fill);
rsvg_paint_server_unref (state->stroke);
if (state->dash.n_dash != 0)
g_free (state->dash.dash);
if (state->styles) {
g_hash_table_unref (state->s... | 1 |
58,816 | Perl_croak_no_modify(void)
{
Perl_croak_nocontext( "%s", PL_no_modify);
} | 0 |
213,503 | Capturer* ScreenRecorder::capturer() {
DCHECK_EQ(capture_loop_, MessageLoop::current());
DCHECK(capturer_);
return capturer_;
}
| 0 |
501,788 | transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_clause)
{
AttrNumber parent_attno;
Relation relation;
TupleDesc tupleDesc;
TupleConstr *constr;
AclResult aclresult;
char *comment;
ParseCallbackState pcbstate;
setup_parser_errposition_callback(&pcbstate, cxt->pstate,
t... | 0 |
143,884 | void *napi_alloc_frag(unsigned int fragsz)
{
return __napi_alloc_frag(fragsz, GFP_ATOMIC | __GFP_COLD);
} | 0 |
270,324 | explicit BoostedTreesQuantileStreamResourceFlushOp(
OpKernelConstruction* const context)
: OpKernel(context) {
OP_REQUIRES_OK(context,
context->GetAttr(kGenerateQuantiles, &generate_quantiles_));
} | 0 |
41,348 | static bool exec_command_on_flag(RFlagItem *flg, void *u) {
struct exec_command_t *user = (struct exec_command_t *)u;
r_core_block_size (user->core, flg->size);
r_core_seek (user->core, flg->offset, 1);
r_core_cmd0 (user->core, user->cmd);
return true;
} | 0 |
197,276 | static int uhid_write(int fd, const struct uhid_event *ev)
{
ssize_t ret = TEMP_FAILURE_RETRY(write(fd, ev, sizeof(*ev)));
if (ret < 0){
int rtn = -errno;
APPL_TRACE_ERROR("%s: Cannot write to uhid:%s",
__FUNCTION__, strerror(errno));
return rtn;
} else if (ret !=... | 0 |
427,839 | static int wcd9335_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kc, int event)
{
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
int ret = 0;
switch (event) {
case SND_SOC_DAPM_POST_PMU:
/* 5ms sleep is required after PA is enabled as per
* HW require... | 0 |
439,680 | void SplashOutputDev::clearPatternOpacity(GfxState *state) {
splash->clearPatternAlpha();
} | 0 |
108,798 | static void test_bug10214()
{
int len;
char out[8];
myheader("test_bug10214");
DIE_UNLESS(!(mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES));
len= mysql_real_escape_string(mysql, out, "a'b\\c", 5);
DIE_UNLESS(memcmp(out, "a\\'b\\\\c", len) == 0);
mysql_query(mysql, "set sql_mode='NO_BACK... | 0 |
23,466 | int jpc_pi_addpchg ( jpc_pi_t * pi , jpc_pocpchg_t * pchg ) {
return jpc_pchglist_insert ( pi -> pchglist , - 1 , pchg ) ;
} | 0 |
237,817 | bool Document::ChildTypeAllowed(NodeType type) const {
switch (type) {
case kAttributeNode:
case kCdataSectionNode:
case kDocumentFragmentNode:
case kDocumentNode:
case kTextNode:
return false;
case kCommentNode:
case kProcessingInstructionNode:
return true;
case kDocumentT... | 0 |
98,934 | _tiffSizeProc(thandle_t fd)
{
ULARGE_INTEGER m;
m.LowPart=GetFileSize(fd,&m.HighPart);
return(m.QuadPart);
} | 0 |
109,574 | static u32 tcm_loop_sess_get_index(struct se_session *se_sess)
{
return 1;
} | 0 |
461,584 | static int copyTdEntry(const indexEntry entry, rpmtd td, headerGetFlags flags)
{
rpm_count_t count = entry->info.count;
int rc = 1; /* XXX 1 on success. */
/* ALLOC overrides MINMEM */
int allocMem = flags & HEADERGET_ALLOC;
int minMem = allocMem ? 0 : flags & HEADERGET_MINMEM;
int argvArray = ... | 0 |
188,019 | SelectFileDialog* SelectFileDialog::Create(Listener* listener) {
return new SelectFileDialogImpl(listener);
}
| 0 |
17,419 | static void http_connection_test ( int persistent ) {
short port = - 1 ;
struct evhttp_connection * evcon = NULL ;
struct evhttp_request * req = NULL ;
test_ok = 0 ;
fprintf ( stdout , "Testing Request Connection Pipeline %s: " , persistent ? "(persistent)" : "" ) ;
http = http_setup ( & port , NULL ) ;
evcon = ... | 0 |
101,721 | PHP_FUNCTION(exif_tagname)
{
long tag;
char *szTemp;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &tag) == FAILURE) {
return;
}
szTemp = exif_get_tagname(tag, NULL, 0, tag_table_IFD TSRMLS_CC);
if (tag < 0 || !szTemp || !szTemp[0]) {
RETURN_FALSE;
}
RETURN_STRING(szTemp, 1)
} | 0 |
451,352 | void clear() override { HeaderMapImpl::clear(); } | 0 |
236,779 | void PDFiumEngine::Form_EmailTo(FPDF_FORMFILLINFO* param,
FPDF_FILEHANDLER* file_handler,
FPDF_WIDESTRING to,
FPDF_WIDESTRING subject,
FPDF_WIDESTRING cc,
FPDF_... | 0 |
64,164 | void CreateDataAndRunAveragePool(bool padding_same) {
const int batch = UniformRandomInt(1, 2);
const int input_depth = UniformRandomInt(1, 700);
const int output_depth = input_depth;
const int input_width_offset = UniformRandomInt(1, 30);
const int input_height_offset = UniformRandomInt(1, 30);
const int s... | 0 |
112,700 | uint Jsi_TreeSize(Jsi_Tree *treePtr) { return treePtr->numEntries; } | 0 |
234,818 | gfloat webkit_web_view_get_zoom_level(WebKitWebView* webView)
{
g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 1.0f);
Frame* frame = core(webView)->mainFrame();
if (!frame)
return 1.0f;
WebKitWebViewPrivate* priv = webView->priv;
return priv->zoomFullContent ? frame->pageZoomFactor() : ... | 0 |
520,029 | my_var_sp(const LEX_STRING& j, uint o, enum_field_types t, sp_head *s)
: my_var(j, LOCAL_VAR), offset(o), type(t), sp(s) { } | 0 |
152,977 | TRIO_PUBLIC_STRING int trio_equal_max TRIO_ARGS3((first, max, second), TRIO_CONST char* first,
size_t max, TRIO_CONST char* second)
{
assert(first);
assert(second);
if ((first != NULL) && (second != NULL))
{
#if defined(USE_STRNCASECMP)
return (0 == strncasecmp(fi... | 0 |
169,799 | int WebContentsImpl::SendToAllFrames(IPC::Message* message) {
int number_of_messages = 0;
for (RenderFrameHost* rfh : GetAllFrames()) {
if (!rfh->IsRenderFrameLive())
continue;
++number_of_messages;
IPC::Message* message_copy = new IPC::Message(*message);
message_copy->set_routing_id(rfh->Get... | 0 |
294,290 | header_put_byte (SF_PRIVATE *psf, char x)
{ psf->header.ptr [psf->header.indx++] = x ;
} /* header_put_byte */ | 0 |
328,317 | static int do_sigframe_return_v2(CPUARMState *env, target_ulong frame_addr,
struct target_ucontext_v2 *uc)
{
sigset_t host_set;
abi_ulong *regspace;
target_to_host_sigset(&host_set, &uc->tuc_sigmask);
sigprocmask(SIG_SETMASK, &host_set, NULL);
if (restore_... | 0 |
254,702 | int HAL_load(void)
{
int err = 0;
hw_module_t* module;
hw_device_t* device;
bdt_log("Loading HAL lib + extensions");
err = hw_get_module(BT_HARDWARE_MODULE_ID, (hw_module_t const**)&module);
if (err == 0)
{
err = module->methods->open(module, BT_HARDWARE_MODULE_ID, &device);
if (err == 0) {
... | 0 |
40,725 | evutil_open_closeonexec_(const char *pathname, int flags, unsigned mode)
{
int fd;
#ifdef O_CLOEXEC
fd = open(pathname, flags|O_CLOEXEC, (mode_t)mode);
if (fd >= 0 || errno == EINVAL)
return fd;
/* If we got an EINVAL, fall through and try without O_CLOEXEC */
#endif
fd = open(pathname, flags, (mode_t)mode);
i... | 0 |
455,214 | TEST(ExprMatchTest, OptimizingExprAbsorbsAndOfAnd) {
BSONObj exprBson = fromjson("{$expr: {$and: [{$eq: ['$a', 1]}, {$eq: ['$b', 2]}]}}");
boost::intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest());
auto matchExpr =
std::make_unique<ExprMatchExpression>(exprBson.firstElem... | 0 |
346,033 | PyImaging_LibTiffEncoderNew(PyObject* self, PyObject* args)
{
ImagingEncoderObject* encoder;
char* mode;
char* rawmode;
char* compname;
char* filename;
int compression;
int fp;
PyObject *dir;
PyObject *key, *value;
Py_ssize_t pos = 0;
int status;
Py_ssize_t d_size;
... | 1 |
83,798 | static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, ptrdiff_t dststride, AVFrame *ref0, AVFrame *ref1,
int x_off, int y_off, int block_w, int block_h, struct MvField *current_mv, int cidx)
{
HEVCLocalContext *lc = s->HEVClc;
uint8_t *src1 = ref0->data[cidx+1];
uint8_t *sr... | 0 |
241,461 | NotificationView(const DialogNotification& data,
AutofillDialogViewDelegate* delegate)
: data_(data),
delegate_(delegate),
checkbox_(NULL) {
scoped_ptr<views::View> label_view;
if (data.HasCheckbox()) {
scoped_ptr<views::Checkbox> checkbox(
new views::C... | 0 |
200,085 | const CustomButton* CustomButton::AsCustomButton(const views::View* view) {
return AsCustomButton(const_cast<views::View*>(view));
}
| 0 |
516,098 | int llhttp__on_message_complete(llhttp_t* s, const char* p, const char* endp) {
int err;
CALLBACK_MAYBE(s, on_message_complete);
return err;
} | 0 |
246,728 | z2copy(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code = zcopy(i_ctx_p);
if (code >= 0)
return code;
if (!r_has_type(op, t_astruct))
return code;
return z2copy_gstate(i_ctx_p);
}
| 0 |
41,199 | _pause_for_job_completion (uint32_t job_id, char *nodes, int max_time)
{
int sec = 0;
int pause = 1;
bool rc = false;
while ((sec < max_time) || (max_time == 0)) {
rc = _job_still_running (job_id);
if (!rc)
break;
if ((max_time == 0) && (sec > 1)) {
_terminate_all_steps(job_id, true);
}
if (sec > 1... | 0 |
482,554 | static int init_wvx_bitstream (WavpackStream *wps, WavpackMetadata *wpmd)
{
unsigned char *cp = (unsigned char *)wpmd->data;
if (wpmd->byte_length <= 4 || (wpmd->byte_length & 1))
return FALSE;
wps->crc_wvx = *cp++;
wps->crc_wvx |= (uint32_t) *cp++ << 8;
wps->crc_wvx |= (uint32_t) *cp++ <<... | 0 |
82,895 | bool kvm_vcpu_yield_to(struct kvm_vcpu *target)
{
struct pid *pid;
struct task_struct *task = NULL;
rcu_read_lock();
pid = rcu_dereference(target->pid);
if (pid)
task = get_pid_task(target->pid, PIDTYPE_PID);
rcu_read_unlock();
if (!task)
return false;
if (task->flags & PF_VCPU) {
put_task_struct(task);
... | 0 |
459,538 | dissect_kafka_find_coordinator_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version)
{
if (api_version >= 1) {
offset = dissect_kafka_throttle_time(tvb, pinfo, tree, offset);
}
/* error_code */
offset ... | 0 |
409,879 |
static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb)
{
return skb->head + skb->inner_network_header; | 0 |
129,271 | void hrtick_start(struct rq *rq, u64 delay)
{
__hrtimer_start_range_ns(&rq->hrtick_timer, ns_to_ktime(delay), 0,
HRTIMER_MODE_REL_PINNED, 0);
} | 0 |
523,069 | find_thread_callback_arg(longlong id_arg, bool query_id_arg):
thd(0), id(id_arg), query_id(query_id_arg) {} | 0 |
445,281 | TimeSource& ListenerFactoryContextBaseImpl::timeSource() { return api().timeSource(); } | 0 |
197,559 | WebContents* WebContents::CreateWithSessionStorage(
const WebContents::CreateParams& params,
const SessionStorageNamespaceMap& session_storage_namespace_map) {
WebContentsImpl* new_contents = new WebContentsImpl(params.browser_context);
new_contents->SetOpenerForNewContents(FindOpener(params),
... | 0 |
379,809 | PHP_FUNCTION(sqlite_exec)
{
zval *zdb;
struct php_sqlite_db *db;
char *sql;
int sql_len;
char *errtext = NULL;
zval *errmsg = NULL;
zval *object = getThis();
if (object) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &sql, &sql_len, &errmsg)) {
return;
}
DB_FROM_OBJECT(db, o... | 0 |
516,500 | bool Locked_tables_list::restore_lock(THD *thd, TABLE_LIST *dst_table_list,
TABLE *table, MYSQL_LOCK *lock)
{
MYSQL_LOCK *merged_lock;
DBUG_ENTER("restore_lock");
DBUG_ASSERT(!strcmp(dst_table_list->table_name, table->s->table_name.str));
/* Ensure we have the memory to ad... | 0 |
266,166 | EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, uint64 MaxDataSize)
{
binary PossibleId[4];
int PossibleID_Length = 0;
binary PossibleSize[8]; // we don't support size stored in more than 64 bits
uint32 PossibleSizeLength = 0;
uint64 SizeUnknown;
uint64 SizeF... | 0 |
330,096 | int event_notifier_init(EventNotifier *e, int active)
{
#ifdef CONFIG_EVENTFD
int fd = eventfd(!!active, EFD_NONBLOCK | EFD_CLOEXEC);
if (fd < 0)
return -errno;
e->fd = fd;
return 0;
#else
return -ENOSYS;
#endif
}
| 0 |
140,424 | static int ffm_write_write_index(int fd, int64_t pos)
{
uint8_t buf[8];
int i;
for(i=0;i<8;i++)
buf[i] = (pos >> (56 - i * 8)) & 0xff;
if (lseek(fd, 8, SEEK_SET) < 0)
goto bail_eio;
if (write(fd, buf, 8) != 8)
goto bail_eio;
return 8;
bail_eio:
return AVERROR(EIO);... | 0 |
13,717 | void GDataDirectoryService::InitializeRootEntry(const std::string& root_id) {
root_.reset(new GDataDirectory(NULL, this));
root_->set_title(kGDataRootDirectory);
root_->SetBaseNameFromTitle();
root_->set_resource_id(root_id);
AddEntryToResourceMap(root_.get());
}
| 1 |
231,258 | isoent_clone_tree(struct archive_write *a, struct isoent **nroot,
struct isoent *root)
{
struct isoent *np, *xroot, *newent;
np = root;
xroot = NULL;
do {
newent = isoent_clone(np);
if (newent == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory");
return (ARCHIVE_FATAL);
... | 0 |
436,904 | static int fts3TermSelectFinishMerge(Fts3Table *p, TermSelect *pTS){
char *aOut = 0;
int nOut = 0;
int i;
/* Loop through the doclists in the aaOutput[] array. Merge them all
** into a single doclist.
*/
for(i=0; i<SizeofArray(pTS->aaOutput); i++){
if( pTS->aaOutput[i] ){
if( !aOut ){
a... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.