functionSource
stringlengths
20
97.4k
CWE-119
bool
2 classes
CWE-120
bool
2 classes
CWE-469
bool
2 classes
CWE-476
bool
2 classes
CWE-other
bool
2 classes
combine
int64
0
1
rk_sort_rule(const struct rk_rule *src) { struct rk_rule* rules; int size = rk_rule_length(src); int i, ret; rules = (struct rk_rule*) malloc(sizeof(struct rk_rule) * (size + 1)); if (!rules) { return NULL; } for (i = 0; i < size; i++) { ret = rk_rule_copy_to (&src[i], &rules[i]); if (ret == ...
false
false
false
false
true
1
cfile_getint(cfile cf,const char *key,int def) { const char *val = cfile_getstring(cf, key, (char *)0); if (!val) return def; if (!isdigit((int) *val) && (*val != '-' || !isdigit((int) val[1]))) return def; return atoi(val); }
false
false
false
false
false
0
matchIdentifier() { Lexer::Token tok = getNext(); if (tok.type == Lexer::Ident) return tok.value; issueError("Expected identifier, got:" + tok.toString(lexer)); return ""; }
false
false
false
false
false
0
copy_attachment_point( AttPoint *dest, AttPoint *src ){ dest->sysUpTime = src->sysUpTime; dest->atmfPortMyIfIdentifier = src->atmfPortMyIfIdentifier; dest->atmfMySystemIdentifier.octs = malloc( src->atmfMySystemIdentifier.octetLen ); dest->atmfMySystemIdentifier.octetLen = src->atmfMySystemIdentifier.octetLen;...
false
false
false
false
false
0
LcpEchoTimeout (arg) caddr_t arg; { if (lcp_echo_timer_running != 0) { lcp_echo_timer_running = 0; LcpEchoCheck ((fsm *) arg); } }
false
false
false
false
false
0
activation_get_activation_uris (ActivateParameters *parameters) { GList *l, *files; NautilusFile *file; LaunchLocation *location; /* link target info might be stale, re-read it */ for (l = parameters->locations; l != NULL; l = l->next) { location = l->data; file = location->file; if (file_was_cancelled (fi...
false
false
false
false
false
0
lookup_dynamic_library() { GModule *mod = g_module_open(NOTIFY_FILE, G_MODULE_BIND_LAZY); #ifndef G_OS_WIN32 // for non Win32 machines try to lookup older versions of libnotify if(!mod) { gchar notify_file_str[] = NOTIFY_FILE; const size_t version_index = G_N_ELEMENTS(NOTIFY_FILE) - 2; for(gchar i = '3'; ((!m...
false
false
false
false
false
0
altera_irscan(struct altera_state *astate, u32 count, u8 *tdi_data, u32 start_index) /* Shifts data into instruction register */ { struct altera_jtag *js = &astate->js; int start_code = 0; u32 alloc_chars = 0; u32 shift_count = js->ir_pre + count + js->ir_post; int status = 0; enum altera_jtag_state s...
false
false
false
false
false
0
main (int argc, char *argv[]){ int i, gpioline, state=1; if (argc != 3) { usage(); exit(1); } gpioline = atoi(argv[1]); if ((gpioline < 0) || (gpioline > (GPIOLINES-1))) { usage(); exit(1); ...
false
false
false
false
true
1
SetAttributeFilter( const char *pszQuery ) { CPLFree( this->pszQuery ); if( pszQuery == NULL || strlen(pszQuery) == 0 ) this->pszQuery = NULL; else this->pszQuery = CPLStrdup( pszQuery ); BuildWhere(); ResetReading(); return OGRERR_NONE; }
false
false
false
false
false
0
glusterd_handle_cli_stop_volume (rpcsvc_request_t *req) { int32_t ret = -1; gf_cli_req cli_req = {{0,}}; char *dup_volname = NULL; dict_t *dict = NULL; glusterd_op_t ...
false
false
false
true
false
1
do_inotify_files (void) { DECLARE_STRINGSBUF (ret); unsigned int i; FILE *fp = NULL; guestfs_int_inotify_event_list *events; char buf[PATH_MAX]; char tempfile[] = "/tmp/inotifyXXXXXX"; int fd; char cmd[64]; NEED_INOTIFY (NULL); fd = mkstemp (tempfile); if (fd == -1) { reply_with_perror ("mks...
false
false
false
false
false
0
start(double secOff, int loops) { if ( ! _soundHandler ) { log_error(_("No sound handler, nothing to start...")); return; } #ifdef USE_SOUND if (externalSound) { if ( ! _mediaParser ) { log_error(_("No MediaParser initialized, can't start an external sound")); ...
false
false
false
false
false
0
get_window_samples(LVAL window, sample_type **samples, long *len) { table_type result = NULL; if (soundp(window)) { sound_type window_sound = getsound(window); xlprot1(window); /* maybe not necessary */ result = sound_to_table(window_sound); xlpop(); *samples = result->sa...
false
false
false
false
false
0
ovl_alloc_entry(unsigned int numlower) { size_t size = offsetof(struct ovl_entry, lowerstack[numlower]); struct ovl_entry *oe = kzalloc(size, GFP_KERNEL); if (oe) oe->numlower = numlower; return oe; }
false
false
false
false
false
0
Initialize(Handle<Object> target) { HandleScope scope; Local<FunctionTemplate> t = FunctionTemplate::New(Channel::New); constructor_template = Persistent<FunctionTemplate>::New(t); constructor_template->InstanceTemplate()->SetInternalFieldCount(1); constructor_template->SetClassName(String::NewSymbol("Channe...
false
false
false
false
false
0
aa_getprocattr(struct aa_label *label, char **string) { struct aa_ns *ns = labels_ns(label); struct aa_ns *current_ns = aa_get_current_ns(); int len; if (!aa_ns_visible(current_ns, ns, true)) { aa_put_ns(current_ns); return -EACCES; } len = aa_label_snxprint(NULL, 0, current_ns, label, FLAG_SHOW_MODE | ...
false
false
false
false
false
0
sdbm_value(DBM *db) { datum val; if G_UNLIKELY(db == NULL) { errno = EINVAL; return nullitem; } sdbm_check(db); /* * Loudly warn if this is called outside of an iteration. */ if G_UNLIKELY(!(db->flags & DBM_ITERATING)) { g_critical("%s() called outside of any key iteration over SDBM \"%s\"", G_ST...
false
false
false
false
false
0
vn_reference_fold_indirect (VEC (vn_reference_op_s, heap) **ops, unsigned int *i_p) { unsigned int i = *i_p; vn_reference_op_t op = VEC_index (vn_reference_op_s, *ops, i); vn_reference_op_t mem_op = VEC_index (vn_reference_op_s, *ops, i - 1); tree addr_base; HOST_WIDE_INT addr_offset; /* The only th...
false
false
false
false
false
0
cli_chkpua(const char *signame, const char *pua_cats, unsigned int options) { char cat[32], *pt; const char *sig; int ret; if(strncmp(signame, "PUA.", 4)) { cli_dbgmsg("Skipping signature %s - no PUA prefix\n", signame); return 1; } sig = signame + 3; if(!(pt = strchr(sig + 1, '.'))) { cli_dbgmsg...
false
false
false
false
false
0
gt_mpsc_access(cpu_gen_t *cpu,struct vdevice *dev, m_uint32_t offset,u_int op_size,u_int op_type, m_uint64_t *data) { struct gt_data *gt_data = dev->priv_data; struct mpsc_channel *channel; u_int chan_id,reg,reg2; if ((offset & 0x000F00) != 0x000A00) ...
false
false
false
false
false
0
printToFile(JNIEnv *env, jstring s, FILE *file) { char *sConverted; int length; int i; const jchar *sAsArray; if (s == NULL) { s = (*env)->NewStringUTF(env, "null"); if (s == NULL) return; } sAsArray = (*env)->GetStringChars(env, s, NULL); length = (*env)->GetStringLength(e...
false
false
false
false
false
0
OnSelectButton(wxCommandEvent &event) { int index = event.GetId() - Dialog_Conflict_SelectButton1; // store command in m_always m_always.m_member_id = m_changes[index].member_id; m_always.m_plugin_name = m_changes[index].plugin_name; m_always.m_last_command = "S"; // build actual command ostringstream oss; os...
false
false
false
false
false
0
xmlNewPatParserContext(const xmlChar *pattern, xmlDictPtr dict, const xmlChar **namespaces) { xmlPatParserContextPtr cur; if (pattern == NULL) return(NULL); cur = (xmlPatParserContextPtr) xmlMalloc(sizeof(xmlPatParserContext)); if (cur == NULL) { ERROR(NULL, NULL...
false
false
false
false
false
0
demo() { if( m_scores && !m_scores -> allScores() && !m_scores -> currentPlayer().noScores() && KMessageBox::warningContinueCancel( this, i18n("Starting the demo will end the current game. Any progress will be lost. Do you want to continue?") ) == KMessageBox::Cancel ) { m_demoAction -> setChecked(...
false
false
false
false
false
0
sdbm_hash(const char *str, int len) { unsigned long n = 0; #ifdef DUFF #define HASHC n = *str++ + 65599 * n if (len > 0) { int loop = (len + 8 - 1) >> 3; switch(len & (8 - 1)) { case 0: do { HASHC; case 7: HASHC; case 6: HASHC; case 5: HASHC; case 4: HASHC; case 3: HASHC; case 2: HASHC; case 1: HAS...
false
false
false
false
false
0
ftpfilemethod(const char *str) { if(!strcmp("singlecwd", str)) return CURLFTPMETHOD_SINGLECWD; if(!strcmp("multicwd", str)) return CURLFTPMETHOD_MULTICWD; DEBUG(1, "unrecognized ftp file method '%s', using default\n", str); return CURLFTPMETHOD_MULTICWD; }
false
false
false
false
false
0
getResignation(float arResign[NUM_ROLLOUT_OUTPUTS], TanBoard anBoard, const cubeinfo * pci, const evalsetup * pesResign) { float arStdDev[NUM_ROLLOUT_OUTPUTS]; rolloutstat arsStatistics[2]; float ar[NUM_OUTPUTS] = { 0.0, 0.0, 0.0, 1.0, 1.0 }; float rPlay; /* Evaluate current position */ if (...
false
false
false
false
false
0
return_all_buffers(struct sur40_state *sur40, enum vb2_buffer_state state) { struct sur40_buffer *buf, *node; spin_lock(&sur40->qlock); list_for_each_entry_safe(buf, node, &sur40->buf_list, list) { vb2_buffer_done(&buf->vb.vb2_buf, state); list_del(&buf->list); } spin_unlock(&sur40->qlock); }
false
false
false
false
false
0
main(int argc, char **argv) { char namebuf[256]; l_int32 i, k, newline, success, display; FILE *fp; PIX *pixs, *pixt, *pixg, *pixd; PIXA *pixac; if (regTestSetup(argc, argv, &fp, &display, &success, NULL)) return 1; pixs = pixRead("feyn-word.tif"); pixt = pixAddBorder(...
false
false
false
false
false
0
circle(f, x, y, radius, fill) _TEXT *f; double x, y, radius; boolean fill; { /* write a circle to file f at (x, y), of given radius and fill it if "fill" is true */ fprintf(f->f, " %*.*f cm %*.*f cm %*.*f cm circle\n", pwid, pdec, x, pwid, pdec, y, pwid, pdec, radius); if (fill) fprintf(f->f, " fill\n"); ...
false
false
false
false
false
0
xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) { struct xilinx_spi *xspi = spi_master_get_devdata(spi->master); int remaining_words; /* the number of words left to transfer */ bool use_irq = false; u16 cr = 0; /* We get here with transmitter inhibited */ xspi->tx_ptr = t->tx_buf; xspi->rx...
false
false
false
false
false
0
create_frame_top(GtkWidget *vbox) { static GtkWidget *ft_vbox; static GtkWidget *ft_image; GkrellmPiximage *im; gint w, h; if (decorated) return; im = _GK.frame_top_piximage; w = _GK.chart_width + _GK.frame_left_width + _GK.frame_right_width; h = (_GK.frame_top_height > 0) ? _GK.frame_top_height : ...
false
false
false
false
false
0
setViewContent(int viewContent) { if (viewContent == CategoriesOnly) d->m_Model->categoriesOnly(); }
false
false
false
false
false
0
from_xml(const std::string &xml) { _depth = 0; delete root; root = 0; XML_Parser parser = XML_ParserCreate("UTF-8"); XML_SetUserData(parser, this); XML_SetDoctypeDeclHandler( parser, Document::Expat::start_doctype_decl_handler, Document::Expat::end_doctype_decl_handler ); XML_SetElementHandler( pars...
false
false
false
false
false
0
mount_init(void **context) { /* Make sure we have the local mount method available */ if (!mount_bind) { if ((mount_bind = open_mount("bind", MODPREFIX))) init_ctr++; } else init_ctr++; seed_random(); return !mount_bind; }
false
false
false
false
false
0
dma_sparse_buffer_insert (DmaSparseBuffer *buffer, DmaSparseBufferNode *node) { /* New node should have been allocated by caller with g_new */ DmaSparseBufferNode *prev; DEBUG_PRINT ("insert block %p %x %x", node, node->lower, node->upper); /* Look for previous node */ prev = dma_sparse_buffer_find (buffer, node-...
false
false
false
false
false
0
TriangleShow(V3d V1,V3d V2,V3d V3,V3d N1,V3d N2,V3d N3) { glBegin(GL_TRIANGLES); if(TypeTexture != GABEDIT_TYPETEXTURE_NONE) glTexCoord2f(V1[0],V1[1]); glNormal3d(N1[0],N1[1],N1[2]); glVertex3d(V1[0],V1[1],V1[2]); if(TypeTexture != GABEDIT_TYPETEXTURE_NONE) glTexCoord2f(V2[0],V2[1]); glNormal3d(N2[0],N2[1],...
false
false
false
false
false
0
_dir_has_subs(const char *path) { DIR *d; struct dirent *de; Eina_Bool result = EINA_FALSE; if (!path) return result; if (!(d = opendir(path))) return result; while ((de = readdir(d))) { char buff[PATH_MAX]; if (de->d_name[0] == '.') continue; snprintf(buff, sizeof(buff)...
false
false
false
false
false
0
parse_core (const char *source, struct var_data *vdt, parsefunc outfn, void *result) { size_t v_size = 0, t_size = 0; const char *p, *q, *e, *v_begin, *v_end, *t_begin, *t_end; struct var_data *v_ptr; if (!source) source = ""; if (!result) { err("authmysql: no memory allocated for result " "whil...
false
false
false
false
false
0
machine_get_smpload(load_type *result, int *numcpus) { char *token; static load_type last_load[MAX_CPUS]; load_type curr_load[MAX_CPUS]; int ncpu = 0; int ret; unsigned long load_iowait, load_irq, load_softirq; reread(load_fd, "get_load"); // Look for lines starting with "cpu0", "cpu1", etc. token = strtok(p...
false
false
false
false
true
1
destroy() { for (void *n=head; n; ) { void *ni = get_next(n); free(n); n = ni; } num_items = 0; head = tail = NULL; }
false
false
false
false
false
0
match_pathspec_depth(const struct pathspec *ps, const char *name, int namelen, int prefix, char *seen) { int i, retval = 0; if (!ps->nr) { if (!ps->recursive || ps->max_depth == -1) return MATCHED_RECURSIVELY; if (within_depth(name, namelen, 0, ps->max_depth)) return MATCHED_EXACTLY; else ret...
false
false
false
false
false
0
printLargeBitmap( StgPtr spBottom, StgPtr payload, StgLargeBitmap* large_bitmap, nat size ) { StgWord bmp; nat i, j; i = 0; for (bmp=0; i < size; bmp++) { StgWord bitmap = large_bitmap->bitmap[bmp]; j = 0; for(; i < size && j < BITS_IN(W_); j++, i++, bitmap >>= 1 ) { debugBelch(" stk[%" FMT_W...
false
false
false
false
false
0
b44_probe(struct pci_device *pci) { struct net_device *netdev; struct b44_private *bp; int rc; /* * Bail out if more than 1GB of physical RAM is installed. * This limitation will be removed later when dma mapping * is merged into mainline. */ if (!phys_ram_within_limit(B44_30BIT_DMA_MASK)) { DBG("Sorry,...
false
false
false
false
false
0
operator()(const char * str, const char * stop) { unsigned size = 0; switch (encoding) { case Other: return stop - str; case UTF8: for (; str != stop; ++str) { if ((*str & 0x80) == 0 || (*str & 0xC0) == 0xC0) ++size; } return size; case UCS2: return (stop - s...
false
false
false
false
false
0
shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd) { struct nvkm_subdev *subdev = &bios->subdev; struct nvbios_image image; int score = 1; if (mthd->func->no_pcir) { image.base = 0; image.type = 0; image.size = mthd->func->size(mthd->data); image.last = 1; } else { if (!shado...
false
false
false
false
false
0
bfa_fcs_fabric_process_flogi(struct bfa_fcs_fabric_s *fabric, struct fchs_s *fchs, u16 len) { struct fc_logi_s *flogi = (struct fc_logi_s *) (fchs + 1); struct bfa_fcs_lport_s *bport = &fabric->bport; bfa_trc(fabric->fcs, fchs->s_id); fabric->stats.flogi_rcvd++; /* * Check port type. It should be 0 = n-port...
false
false
false
false
false
0
ifstat_errors ( struct net_device_stats *stats, const char *prefix ) { unsigned int i; for ( i = 0 ; i < ( sizeof ( stats->errors ) / sizeof ( stats->errors[0] ) ) ; i++ ) { if ( stats->errors[i].count ) printf ( " [%s: %d x \"%s\"]\n", prefix, stats->errors[i].count, strerror ( stats->...
false
false
false
false
false
0
git_repository_is_empty(git_repository *repo) { git_reference *head = NULL, *branch = NULL; int error; if (git_reference_lookup(&head, repo, "HEAD") < 0) return -1; if (git_reference_type(head) != GIT_REF_SYMBOLIC) { git_reference_free(head); return 0; } if (strcmp(git_reference_target(head), "refs/heads...
false
false
false
false
false
0
wcstombs_dbcs( const struct dbcs_table *table, const WCHAR *src, unsigned int srclen, char *dst, unsigned int dstlen ) { const unsigned short * const uni2cp_low = table->uni2cp_low; const unsigned short * const uni2cp_high = table->uni2cp_high; ...
false
false
false
false
false
0
mpw_get_ulong(mpw_ptr op) { unsigned long r; int ex = MPWL_EXCEPTION_NO_EXCEPTION; if G_UNLIKELY (MPW_IS_COMPLEX (op)) { gel_errorout (_("Can't convert complex number into integer")); gel_error_num=GEL_NUMERICAL_MPW_ERROR; return 0; } r = mpwl_get_ulong(op->r,&ex); if G_UNLIKELY (ex == MPWL_EXCEPTION_CONVE...
false
false
false
false
false
0
free_counts_and_tree_and_queue(HUFF_TREE *huff_trees, uint trees, HUFF_COUNTS *huff_counts, uint fields) { register uint i; if (huff_trees) { for (i=0 ; i < trees ; i++) { if (huff_trees[i].element_buffer) my_free(huff_trees[i].element_buffer); if (huff_trees[i].code) my_fre...
false
false
false
false
false
0
gamgi_engine_create_light (void) { gamgi_light *old_light = gamgi->light_end, *light; /******************* * allocate memory * *******************/ light = GAMGI_CAST_LIGHT malloc (sizeof (gamgi_light)); /********************* * update light list * *********************/ gamgi->light_end = light; light->before ...
false
false
false
false
false
0
readString(unsigned char sizeOfChar) { size_t strlen = readInt(); size_t bufferLen = strlen * sizeOfChar; if(strlen == 0) { return tstring(); } if(pos > maxsize) { getLogLog().error(DCMTK_LOG4CPLUS_TEXT("SocketBuffer::readString()- end of buffer reached")); return tstring();...
false
false
false
false
false
0
quote_spamnum(struct Client *source_p, int newval) { if (newval >= 0) { if (newval == 0) { sendto_realops_flags(UMODE_ALL, L_ALL, "%s has disabled ANTI_SPAMBOT", source_p->name); GlobalSetOptions.spam_num = newval; return; } GlobalSetOptions.spam_num = I...
false
false
false
false
false
0
linux_acpi_cb_acpid_del(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__) { ecore_con_server_del(acpid); acpid = NULL; if (acpid_handler_add) ecore_event_handler_del(acpid_handler_add); acpid_handler_add = NULL; if (acpid_handler_del) ...
false
false
false
false
false
0
Observe(MachineInstr *MI, unsigned Count) { if (AntiDepBreak) AntiDepBreak->Observe(MI, Count, EndIndex); }
false
false
false
false
false
0
st_widget_style_changed (StWidget *widget) { StThemeNode *old_theme_node = NULL; widget->priv->is_style_dirty = TRUE; if (widget->priv->theme_node) { old_theme_node = widget->priv->theme_node; widget->priv->theme_node = NULL; } /* update the style only if we are mapped */ if (CLUTTER_ACT...
false
false
false
false
false
0
btbuildCallback(Relation index, HeapTuple htup, Datum *values, bool *isnull, bool tupleIsAlive, void *state) { BTBuildState *buildstate = (BTBuildState *) state; /* * insert the index tuple into the appropriate spool file for subsequent * processing */ if (tupleIsAlive || buildstate->spool...
false
false
false
false
false
0
pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd) { nullpo_retr(-1, sd); nullpo_retr(-1, dstsd); if(sd->status.partner_id > 0 || dstsd->status.partner_id > 0) return -1; sd->status.partner_id = dstsd->status.char_id; dstsd->status.partner_id = sd->status.char_id; return 0; }
false
false
false
false
false
0
_addupCharWidths(void) { UT_sint32 iWidth = 0; if(m_pRenderInfo == NULL) return false; #ifdef DEBUG xxx_UT_DEBUGMSG(("_addupCharWidths() \n")); //printText(); #endif m_pRenderInfo->m_iOffset = 0; m_pRenderInfo->m_iLength = getLength(); m_pRenderInfo->m_pFont = _getFont(); iWidth = getGraphics()->getText...
false
false
false
false
false
0
UploadBitstream(unsigned int itemid, const char* filename) { std::string bitstreamidstring; RestXMLParser* parser = m_WebAPI->GetRestXMLParser(); parser->ClearTags(); parser->AddTag("/rsp/id", bitstreamidstring); std::stringstream url; url << "midas.upload.bitstream?itemid=" << itemid; // We ...
false
false
false
false
false
0
munge_extrainfo_into_routerinfo(const char *ri_body, const signed_descriptor_t *ri, const signed_descriptor_t *ei) { char *out = NULL, *outp; int i; const char *router_sig; const char *ei_body = signed_descriptor_get_body(ei); size_t ri_len = ri-...
false
false
false
false
false
0
speedtch_read_status(struct speedtch_instance_data *instance) { struct usbatm_data *usbatm = instance->usbatm; struct usb_device *usb_dev = usbatm->usb_dev; unsigned char *buf = instance->scratch_buffer; int ret; memset(buf, 0, 16); ret = usb_control_msg(usb_dev, usb_rcvctrlpipe(usb_dev, 0), 0x12, 0xc0...
false
false
false
false
false
0
stacktrace (std::ostream& out, int levels) { void *array[200]; size_t size; char **strings; size_t i; size = backtrace (array, 200); strings = backtrace_symbols (array, size); if (strings) { printf ("Obtained %zd stack frames.\n", size); for (i = 0; i < size && (levels == 0 || i < size_t(leve...
false
false
false
false
false
0
lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type) { LLVMTypeRef elem_type; assert(vec_type); if(!vec_type) return FALSE; if (type.length == 1) return lp_check_elem_type(type, vec_type); if(LLVMGetTypeKind(vec_type) != LLVMVectorTypeKind) return FALSE; if(LLVMGetVector...
false
false
false
false
false
0
dmi_match(enum dmi_field f, const char *str) { const char *info = dmi_get_system_info(f); if (info == NULL || str == NULL) return info == str; return !strcmp(info, str); }
false
false
false
false
false
0
sort_func (GtkTreeModel *model, GtkTreeIter *iter_a, GtkTreeIter *iter_b, gpointer data) { int ret; int recent_a, recent_b; char *name_a, *name_b; gtk_tree_model_get (model, iter_a, COL_NAME, &name_a, COL_RECENT_RANK, &recent_a, ...
false
false
false
false
false
0
fb_notifier_callback(struct notifier_block *self, unsigned long event, void *data) { struct lcd_device *ld; struct fb_event *evdata = data; /* If we aren't interested in this event, skip it immediately ... */ switch (event) { case FB_EVENT_BLANK: case FB_EVENT_MODE_CHANGE: case FB_EVENT_MODE_CHANGE_ALL: c...
false
false
false
false
false
0
byteaGetBit(PG_FUNCTION_ARGS) { bytea *v = PG_GETARG_BYTEA_P(0); int32 n = PG_GETARG_INT32(1); int byteNo, bitNo; int len; int byte; len = VARSIZE(v) - VARHDRSZ; if (n < 0 || n >= len * 8) ereport(ERROR, (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR), errmsg("index %d out of valid range, 0..%...
false
false
false
false
false
0
wrt_A(char *p, ftnlen len) #endif { while(len-- > 0) (*f__putn)(*p++); return(0); }
false
false
false
false
false
0
Transfer(const wxString& cmd, CFtpTransferOpData* oldData) { wxASSERT(oldData); oldData->tranferCommandSent = false; CRawTransferOpData *pData = new CRawTransferOpData; pData->pNextOpData = m_pCurOpData; m_pCurOpData = pData; pData->cmd = cmd; pData->pOldData = oldData; pData->pOldData->transferEndReason = su...
false
false
false
false
false
0
MG_s_restrict(MULTI_GRID_INFO *mg_info, int mg_level) { FUNCNAME("MG_s_restrict"); MG_S_INFO *mg_s_info; int i, first, last, dof1, dof2, dof3; int *dof_parent0, *dof_parent1; S_CHAR *sort_bound; REAL *fg_fct = NULL, *cg_fct = NULL; REAL new_v; TEST_EXIT(...
false
false
false
true
false
1
sci_txfill(struct uart_port *port) { const struct plat_sci_reg *reg; reg = sci_getreg(port, SCTFDR); if (reg->size) return serial_port_in(port, SCTFDR) & ((port->fifosize << 1) - 1); reg = sci_getreg(port, SCFDR); if (reg->size) return serial_port_in(port, SCFDR) >> 8; return !(serial_port_in(port, SCxSR) ...
false
false
false
false
false
0
incircle(REAL *pa, REAL *pb, REAL *pc, REAL *pd) { REAL adx, bdx, cdx, ady, bdy, cdy; REAL bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady; REAL alift, blift, clift; REAL det; REAL permanent, errbound; adx = pa[0] - pd[0]; bdx = pb[0] - pd[0]; cdx = pc[0] - pd[0]; ady = pa[1] - pd[1]; bdy = pb[1] - ...
false
false
false
false
false
0
option_assure_foomatic_param(option_t *opt) { param_t *param; if (opt->foomatic_param) return opt->foomatic_param; param = calloc(1, sizeof(param_t)); strcpy(param->name, "foomatic-param"); param->order = 0; param->type = opt->type; opt->foomatic_param = param; return param; }
false
true
false
false
false
1
cbf_tobase64 (cbf_file *infile, cbf_file *outfile, size_t size) { static char basis_64 [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; int c [3]; int read; while (size > 0) { /* Read up to 3 characters */ c [1] = c [2] = 0; for (read = 0; read < 3 && read < ...
false
true
false
false
true
1
rtl_easy_concurrent_retrytimer_callback(unsigned long data) { struct ieee80211_hw *hw = (struct ieee80211_hw *)data; struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *buddy_priv = rtlpriv->buddy_priv; if (buddy_priv == NULL) return; rtlpriv->cfg->ops->dualmac_easy_concurrent(hw); }
false
false
false
false
false
0
createInstanceImpl( const String& name, const NameValuePairList* params) { size_t maxElements = 20; size_t numberOfChains = 1; bool useTex = true; bool useCol = true; bool dynamic = true; // optional params if (params != 0) { NameVa...
false
false
false
false
false
0
get_join_variables(PlannerInfo *root, List *args, VariableStatData *vardata1, VariableStatData *vardata2) { Node *left, *right; if (list_length(args) != 2) elog(ERROR, "join operator should take two arguments"); left = (Node *) linitial(args); right = (Node *) lsecond(args); examine_variable(r...
false
false
false
false
false
0
InitRegPressure(MachineBasicBlock *BB) { std::fill(RegPressure.begin(), RegPressure.end(), 0); // If the preheader has only a single predecessor and it ends with a // fallthrough or an unconditional branch, then scan its predecessor for live // defs as well. This happens whenever the preheader is created by sp...
false
false
false
false
false
0
_PyIOBase_check_closed(PyObject *self, PyObject *args) { if (iobase_closed(self)) { PyErr_SetString(PyExc_ValueError, "I/O operation on closed file."); return NULL; } if (args == Py_True) return Py_None; else Py_RETURN_NONE; }
false
false
false
false
false
0
fixed_context_menu_handler (GnumericPopupMenuElement const *element, gpointer user_data) { CsvImportTrans* info = user_data; int col = info->fixed_context_col; switch (element->index) { case CONTEXT_STF_IMPORT_MERGE_LEFT: delete_column (info, col - 1, FALSE); ...
false
false
false
false
false
0
bnx2x_8705_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) { u8 link_up = 0; u16 val1, rx_sd; struct bnx2x *bp = params->bp; DP(NETIF_MSG_LINK, "read status 8705\n"); bnx2x_cl45_read(bp, phy, MDIO_WIS_DEVAD, MDIO_WIS_REG_LASI_STATUS, &val1); DP(NETIF_MSG_LI...
false
false
false
false
false
0
open_max (void) { if (openmax == 0) { errno = 0; if ((openmax = sysconf (_SC_OPEN_MAX)) < 0) { if (errno == 0) openmax = OPEN_MAX_GUESS; else wp_sys_warning ("sysconf error for _SC_OPEN_MAX"); } } return (openmax); }
false
false
false
false
false
0
store_class_bindings (VEC(cp_class_binding,gc) *names, VEC(cxx_saved_binding,gc) **old_bindings) { size_t i; cp_class_binding *cb; bool subtime = timevar_cond_start (TV_NAME_LOOKUP); for (i = 0; VEC_iterate(cp_class_binding, names, i, cb); ++i) store_binding (cb->identifier, old_bindings); timeva...
false
false
false
false
false
0
_sql(Request& r, MethodParams& params) { Value* default_code; const String* string=sql_result_string(r, params, default_code); if(!string) { if(default_code) { string=&r.process_to_string(*default_code); } else throw Exception(PARSER_RUNTIME, 0, "produced no result, but no default option specified...
false
false
false
false
false
0
miner_resumed (TrackerMiner *miner) { TrackerMinerFS *fs; fs = TRACKER_MINER_FS (miner); fs->priv->is_paused = FALSE; tracker_file_notifier_start (fs->priv->file_notifier); /* Only set up queue handler if we have items waiting to be * processed. */ if (tracker_miner_fs_has_items_to_process (fs)) { item_...
false
false
false
false
false
0
store32(u8 *Bytes, u32 word) { int i; for (i = 3; i >= 0; i--) {Bytes[i] = (u8)word; word >>= 8; }}
false
false
false
false
false
0
unit_activity_handling_base(struct unit *punit, Base_type_id base) { if (can_unit_do_activity_base(punit, base)) { enum unit_activity old_activity = punit->activity; enum tile_special_type old_target = punit->activity_target; free_unit_orders(punit); set_unit_a...
false
false
false
false
false
0
GuessControlValues(void) { uint64 sysidentifier; struct timeval tv; char *localeptr; /* * Set up a completely default set of pg_control values. */ guessed = true; memset(&ControlFile, 0, sizeof(ControlFile)); ControlFile.pg_control_version = PG_CONTROL_VERSION; ControlFile.catalog_version_no = CATALOG...
false
true
true
false
false
1
isl_map_extend(struct isl_map *base, unsigned nparam, unsigned n_in, unsigned n_out) { int i; base = isl_map_cow(base); if (!base) return NULL; base->dim = isl_space_extend(base->dim, nparam, n_in, n_out); if (!base->dim) goto error; for (i = 0; i < base->n; ++i) { base->p[i] = isl_basic_map_extend_spac...
false
false
false
false
true
1
DtsSetRateChange(HANDLE hDevice , uint32_t rate, uint8_t direction ) { BC_STATUS sts = BC_STS_SUCCESS; DTS_LIB_CONTEXT *Ctx = NULL; DTS_GET_CTX(hDevice,Ctx); //For Rate Change uint32_t mode = 0; uint32_t HostTrickModeEnable = 0; if (Ctx->State == BC_DEC_STATE_CLOSE) { return BC_STS_DEC_NOT_OP...
false
false
false
false
false
0
runproc (unsigned long len, bool add) { unsigned long k; float x, y; float c1, s1; float c2, s2; float dc, ds; float *inp1, *inp2; float *out1, *out2; memcpy (_port [OUT_W], _port [INP_W], len * sizeof (float)); memcpy (_port [OUT_Z], _port [INP_Z], len * sizeof (float)); c1 =...
false
false
false
false
false
0
HexEncode(unsigned char *md_value, int md_len, char** md_hexdigest, int* md_hex_len) { *md_hex_len = (2*(md_len)); *md_hexdigest = new char[*md_hex_len + 1]; for (int i = 0; i < md_len; i++) { snprintf((char *)(*md_hexdigest + (i*2)), 3, "%02x"...
false
false
false
false
false
0
build_method_decl (enum tree_code code, tree ret_type, tree selector, tree add_args, bool ellipsis) { tree method_decl; /* If no type is specified, default to "id". */ ret_type = adjust_type_for_id_default (ret_type); /* Note how a method_decl has a TREE_TYPE which is not the function type of the f...
false
false
false
false
false
0
apply_ops(char * arg) { int ret; struct argop *aop; struct apispptr ptr; struct ptrswanted pw; if (!decode_pname(arg, &pw)) { if (html_out_cparam_file("badcarg", 1, arg)) exit(E_USAGE); html_error(arg); exit(E_SETUP); } if (gspool_ptrfind(gspool_fd, GSPOOL_FLAG_IGNORESEQ, pw.ptrname, pw.host, &...
false
false
false
false
false
0
lessThanVar(const Expr& isolatedMonomial, const Expr& var2) { DebugAssert(!isRational(var2) && !isRational(isolatedMonomial), "TheoryArith3::findMaxVar: isolatedMonomial cannot be rational" + isolatedMonomial.toString()); Expr c, var0, var1; separateMonomial(isolatedMonomial, c, var0);...
false
false
false
false
false
0
read_server_response(spctx_t* ctx) { int r; /* Read response line from the server */ if((r = spio_read_line(ctx, &(ctx->server), SPIO_DISCARD)) == -1) return -1; if(r == 0) { sp_messagex(ctx, LOG_ERR, "server disconnected unexpectedly"); /* Tell the client it w...
false
false
false
false
false
0