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
phyper (double x, double NR, double NB, double n, int lower_tail, int log_p) { /* Sample of n balls from NR red and NB black ones; x are red */ double d, pd; #ifdef IEEE_754 if(ISNAN(x) || ISNAN(NR) || ISNAN(NB) || ISNAN(n)) return x + NR + NB + n; #endif x = floor (x + 1e-7); NR = R_D_...
false
false
false
false
false
0
err_pop_exc() { /* * if there's anything on the stack, remove it and replace it with * the previous item on the stack */ if (G_err->cur_exc_ != 0) { /* * since we're removing this element, its space can now be * re-used for the next exception all...
false
false
false
false
false
0
processFuncDecl(ExecState *exec) { // See whether we just need to fill in the symbol table, // or actually fiddle with objects. int flags = Internal | DontDelete; switch (exec->codeType()) { case FunctionCode: // Inside a function, just need symbol info exec->currentBody()->addFunDecl(ident, fla...
false
false
false
false
false
0
doReplace(int32_t start, int32_t length, const UChar *srcChars, int32_t srcStart, int32_t srcLength) { if(!isWritable()) { return *this; } if(srcChars == 0) { srcStart = srcLength = 0; } else if(srcLength < 0) { // get the srcLength if necessary ...
false
false
false
false
false
0
lt_trie_node_new(char index_) { lt_trie_node_t *retval = lt_mem_alloc_object(sizeof (lt_trie_node_t)); if (retval) { retval->index_ = index_ + 1; } return retval; }
false
false
false
false
false
0
string_hash(ScmObj key) { if (!SCM_STRINGP(key)) { Scm_Error("sparse string hashtable got non-string key:", key); } return Scm_HashString(SCM_STRING(key), 0); }
false
false
false
false
false
0
gf_isom_load_next_hint_sample(GF_ISOFile *the_file, u32 trackNumber, GF_TrackBox *trak, GF_HintSampleEntryBox *entry) { GF_BitStream *bs; u32 descIdx; GF_ISOSample *samp; if (!entry->cur_sample) return GF_BAD_PARAM; if (entry->cur_sample>trak->Media->information->sampleTable->SampleSize->sampleCount) return GF_EO...
false
false
false
false
false
0
getRelocationType(unsigned MachineRelTy) const { switch (MachineRelTy) { case ARM::reloc_arm_absolute: case ARM::reloc_arm_relative: case ARM::reloc_arm_cp_entry: case ARM::reloc_arm_vfp_cp_entry: case ARM::reloc_arm_machine_cp_entry: case ARM::reloc_arm_jt_base: case ARM::reloc_arm_pic_jt: assert(0...
false
false
false
false
false
0
ATController(AlterTableStmt *parsetree, Relation rel, List *cmds, bool recurse, LOCKMODE lockmode) { List *wqueue = NIL; ListCell *lcmd; /* Phase 1: preliminary examination of commands, create work queue */ foreach(lcmd, cmds) { AlterTableCmd *cmd = (AlterTableCmd *) lfirst(lcmd); ATPrepCmd(&wqueue,...
false
false
false
false
false
0
twsp_strip(long int linenum, char *line, LT_INS_S **ins, void *local) { char *p, *ws = NULL; for(p = line; *p; p++){ /* don't strip trailing space on signature line */ if(*line == '-' && *(line+1) == '-' && *(line+2) == ' ' && !*(line+3)) break; if(isspace((unsigned char) *p)){ if...
false
false
false
false
false
0
m_define(li_object *args, li_object *env) { li_object *var; li_object *val; var = li_car(args); if (li_is_pair(var)) { val = li_cdr(args); while (li_is_pair(var)) { if (li_is_symbol(li_car(var))) val = li_lambda(li_car(var), li_cdr(var), val, env); ...
false
false
false
false
false
0
alias_get_name (tree decl) { const char *res = NULL; char *temp; int num_printed = 0; if (!dump_file) return "NULL"; if (TREE_CODE (decl) == SSA_NAME) { res = get_name (decl); if (res) num_printed = asprintf (&temp, "%s_%u", res, SSA_NAME_VERSION (decl)); else num_printed = aspri...
false
false
false
false
false
0
virtfn_remove(struct pci_dev *dev, int id, int reset) { char buf[VIRTFN_ID_LEN]; struct pci_dev *virtfn; struct pci_sriov *iov = dev->sriov; virtfn = pci_get_domain_bus_and_slot(pci_domain_nr(dev->bus), pci_iov_virtfn_bus(dev, id), pci_iov_virtfn_devfn(dev, id)); if (!virtfn) return; if (r...
true
true
false
false
false
1
CL_FixCvarCheats (void) { static int numcheatvars = 0; int i; cheatvar_t *var; if ( !strcmp(cl.configstrings[CS_MAXCLIENTS], "1") || !cl.configstrings[CS_MAXCLIENTS][0] || cl.attractloop ) return; // single player or demo playback can cheat // find all the cvars if we haven't done it yet if...
false
false
false
false
false
0
x87_fldcw( struct x86_function *p, struct x86_reg arg ) { DUMP_R( arg ); assert(arg.file == file_REG32); assert(arg.mod != mod_REG); emit_1ub(p, 0xd9); emit_modrm_noreg(p, 5, arg); }
false
false
false
false
false
0
zpool_create_pool(const char *type, const char *name, gfp_t gfp, const struct zpool_ops *ops) { struct zpool_driver *driver; struct zpool *zpool; pr_debug("creating pool type %s\n", type); driver = zpool_get_driver(type); if (!driver) { request_module("zpool-%s", type); driver = zpool_get_driver(type); }...
false
false
false
false
false
0
gx_toggle_image_set_base_name(GxToggleImage *toggle_image, const char *base_name) { g_free(toggle_image->base_name); toggle_image->base_name = g_strdup(base_name ? base_name : ""); gtk_widget_queue_resize(GTK_WIDGET(toggle_image)); g_object_notify(G_OBJECT(toggle_image), "base-name"); }
false
false
false
false
false
0
PrintDirectly(XAP_Frame * pFrame, const char * szFilename, const char * szPrinter) { m_pFrame = pFrame; setupPrint(); if(szFilename) { gtk_print_operation_set_export_filename(m_pPO, szFilename); gtk_print_operation_run (m_pPO,GTK_PRINT_OPERATION_ACTION_EXPORT, NULL,NULL); } else { GtkPrintSe...
false
false
false
false
false
0
alloc_kmem_pages(gfp_t gfp_mask, unsigned int order) { struct page *page; page = alloc_pages(gfp_mask, order); if (page && memcg_kmem_charge(page, gfp_mask, order) != 0) { __free_pages(page, order); page = NULL; } return page; }
false
false
false
false
false
0
ls_pattern(struct command *cmd, const char *path) { char *q = NULL; int r; if (path[strlen(path)-1] == SEP) r = xasprintf(&q, "%s*", path); else r = xasprintf(&q, "%s/*", path); ERR_NOMEM(r < 0, cmd->aug); error: return q; }
false
false
false
false
false
0
UpdateDistributions(char *timekey,struct Averages *av) { int position,day,i; char filename[CF_BUFSIZE]; FILE *fp; /* Take an interval of 4 standard deviations from -2 to +2, divided into CF_GRAINS parts. Centre each measurement on CF_GRAINS/2 and scale each measurement by the std-deviation for the current time. ...
true
true
false
false
true
1
trim(){ if(str!=EMPTY){ register FXint s=0; register FXint e=length(); while(0<e && Ascii::isSpace(str[e-1])) e--; while(s<e && Ascii::isSpace(str[s])) s++; memmove(str,&str[s],e-s); length(e-s); } return *this; }
false
false
false
false
false
0
P_Keysym_To_String (Object k) { register char *s; s = XKeysymToString ((KeySym)Get_Long (k)); return s ? Make_String (s, strlen (s)) : False; }
false
false
false
false
false
0
_nl_get_walt_digit (unsigned int number, struct __locale_data *current) { const wchar_t *result = NULL; struct lc_time_data *data; if (number >= 100 || CURRENT_WSTR (_NL_WALT_DIGITS)[0] == L'\0') return NULL; __libc_rwlock_wrlock (__libc_setlocale_lock); if (current->private.time == NULL) { c...
false
false
false
false
true
1
of_match_device(const struct of_device_id *matches, const struct device *dev) { if ((!matches) || (!dev->of_node)) return NULL; return of_match_node(matches, dev->of_node); }
false
false
false
false
false
0
fa_ftruncate(off_t length) { RETRYLOOP { STARTHEADER(CMD_FTRUNCATE,sizeof(length)); if(!swrite(*file_access_,&length,sizeof(length))) ABORTALL; int res = 0; ENDHEADER(CMD_FTRUNCATE,0); return (res == 0); } errno_ = -1; return false; }
false
false
false
false
false
0
gst_dtmf_src_post_message (GstRTPDTMFSrc * dtmfsrc, const gchar * message_name, GstRTPDTMFSrcEvent * event) { GstStructure *s = NULL; switch (event->event_type) { case RTP_DTMF_EVENT_TYPE_START: s = gst_structure_new (message_name, "type", G_TYPE_INT, 1, "method", G_TYPE_INT, 1, ...
false
false
false
false
false
0
anthy_dic_util_init(void) { if (gIsInit) { return ; } if (anthy_init_dic() == -1) { return ; } anthy_dic_set_personality("default"); gIsInit = 1; dic_util_encoding = ANTHY_EUC_JP_ENCODING; /**/ word_iterator.key_buf[0] = 0; word_iterator.in_tt = 1; }
false
false
false
false
false
0
image_16BGR555_to_24BGR(int width, unsigned char *dest, unsigned char *source) { int i; WORD w; unsigned char value; for (i=0; i<width; i++) { w = (WORD)(source[0] + (source[1] << 8)); value = (unsigned char)(w & 0x1f); /* blue */ *dest++ = (unsigned char)((value << 3) + (value >> 2)); value = ...
false
false
false
false
false
0
extract_variables (NODE_T * p) { NODE_T *q = p; while (q != NO_NODE) { if (whether (q, DECLARER, IDENTIFIER, STOP)) { BOOL_T siga = A68_TRUE; do { FORWARD (q); if (whether (q, IDENTIFIER, STOP)) { if (whether (q, IDENTIFIER, EQUALS_SYMBOL, STOP)) { /* Handle common error in...
false
false
false
false
false
0
mtnic_CONFIG_RX_RING(struct mtnic_port *priv, u8 port, u16 ring_ind, struct mtnic_ring *ring) { struct mtnic_if_config_rx_ring_in_mbox *config_rx_ring = priv->mtnic->cmd.buf; memset(config_rx_ring, 0, sizeof *config_rx_ring); config_rx_ring->ring = ring_ind; MTNIC_BC_PUT(config_rx_ring->stride_size, fls(UNIT...
false
false
false
false
false
0
arm_output_load_gr (rtx *operands) { rtx reg; rtx offset; rtx wcgr; rtx sum; if (GET_CODE (operands [1]) != MEM || GET_CODE (sum = XEXP (operands [1], 0)) != PLUS || GET_CODE (reg = XEXP (sum, 0)) != REG || GET_CODE (offset = XEXP (sum, 1)) != CONST_INT || ((INTVAL (offset) < 1024) &&...
false
false
false
false
false
0
detectSchemaProblem( sqlite3 *db, /* Database connection */ const char *zMessage, /* English language error message */ const char *zSql, /* SQL statement to run */ GenfkeyCb *pCb ){ sqlite3_stmt *pStmt; int rc; rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); if( rc...
false
false
false
false
false
0
buffer_init() { buffer_close(); bufsize = 1024; buffer = (char *)malloc(bufsize); if(!buffer) return status(-1); bufused = bufpos = 0; return _status; }
false
false
false
false
false
0
gnc_kvp_bag_remove_frame (KvpFrame *root, const char *path, KvpFrame *fr) { KvpValue *arr; KvpValueType valtype; GList *node, *listhead; arr = kvp_frame_get_value (root, path); valtype = kvp_value_get_type (arr); if (KVP_TYPE_FRAME == valtype) { if (fr == kvp_value_get_frame (arr)) ...
false
false
false
false
false
0
drawSmasher(SDL_Rect * pos, LiveMonster * live, SDL_Surface * surface, SDL_Surface * img) { int y = 0; SDL_Rect p, q; Position position; int first_image, first, second; int skip; first_image = live->monster->image_index[0]; first = (first_image == img_smash || first_image == img_smash2 ? img_...
false
false
false
false
false
0
create_espeak_key(const char *key_name, void *user_data) { ENTER("create_espeak_key"); int a_error=1; t_espeak_command* a_command = (t_espeak_command*)malloc(sizeof(t_espeak_command)); if (!key_name || !a_command) { goto key_error; } a_command->type = ET_KEY; a_command->state = CS_UNDEFINED;...
false
false
false
false
false
0
get_alloc_profile(struct btrfs_root *root, u64 orig_flags) { unsigned seq; u64 flags; do { flags = orig_flags; seq = read_seqbegin(&root->fs_info->profiles_lock); if (flags & BTRFS_BLOCK_GROUP_DATA) flags |= root->fs_info->avail_data_alloc_bits; else if (flags & BTRFS_BLOCK_GROUP_SYSTEM) flags |= roo...
false
false
false
false
false
0
bodySelectionHits() { if ( selectionHits == 0 ) { return; } int picked_body_id = NO_INDEX; int picked_lr_id = NO_INDEX; GLuint tot_min_z = 0xffffffff; GLuint tot_max_z = 0; int record_start = 0; for (int i = 0; i < selectionHits; i++) { int nof_names = selectionBuffer[record_start]; if...
false
false
false
false
false
0
iDemoteCpxReal(int count, const imcfloat* src_map, float *dst_map, int cpx2real) { float (*CpxCnv)(const imcfloat& cpx) = NULL; switch(cpx2real) { case IM_CPX_REAL: CpxCnv = cpxreal; break; case IM_CPX_IMAG: CpxCnv = cpximag; break; case IM_CPX_MAG: CpxCnv = cpxmag; break; case IM_CPX_PHASE: CpxCnv =...
false
false
false
true
false
1
ASB100_PWM_TO_REG(int pwm) { pwm = clamp_val(pwm, 0, 255); return (u8)(pwm / 16); }
false
false
false
false
false
0
ssh_timestamp_difference(struct ssh_timestamp *old, struct ssh_timestamp *new){ long seconds, usecs, msecs; seconds = new->seconds - old->seconds; usecs = new->useconds - old->useconds; if (usecs < 0){ seconds--; usecs += 1000000; } msecs = seconds * 1000 + usecs/1000; return msecs; }
false
false
false
false
false
0
next_focus() { InputHandlerImpl& i = *impl_; if (i.focus_handler_ != nil) { i.focus_handler_->focus_out(); } GlyphIndex n = i.children_.count(); GlyphIndex f = i.focus_item_ + 1; if (f >= n) { if (i.parent_ != nil) { i.parent_->next_focus(); return; } else if (n == 0) { return;...
false
false
false
false
false
0
GetFileMasks(unsigned int group) const { if (group >= m_Groups.GetCount()) return wxEmptyString; const FileGroups* fg = m_Groups[group]; // Clean-up file masks that appear twice or more return GetStringFromArray( MakeUniqueArray(fg->fileMasks, false) ); }
false
false
false
false
false
0
parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *feature) { return !parse_char (pp, end, '=') || parse_uint (pp, end, &feature->value); }
false
false
false
false
false
0
json_generator_to_data (JsonGenerator *generator, gsize *length) { JsonNode *root; gchar *retval = NULL; g_return_val_if_fail (JSON_IS_GENERATOR (generator), NULL); root = generator->priv->root; if (!root) { if (length) *length = 0; return NULL; }...
false
false
false
false
false
0
b64decode(UC c, UC *input, size_t size, luaL_Buffer *buffer) { /* ignore invalid characters */ if (b64unbase[c] > 64) return size; input[size++] = c; /* decode atom */ if (size == 4) { UC decoded[3]; int valid, value = 0; value = b64unbase[input[0]]; value <<= 6; ...
false
false
false
false
false
0
ao_enclose_words_init (gchar *config_file_name, GeanyKeyGroup *key_group) { GKeyFile *config = g_key_file_new(); gchar key_name[] = "Enclose_x"; gint i; config_file = g_strdup (config_file_name); g_key_file_load_from_file (config, config_file, G_KEY_FILE_NONE, NULL); for (i = 0; i < 8; i++) { key_name [8] = ...
false
false
false
false
false
0
FixUpUnconditionalBr(MachineFunction &MF, ImmBranch &Br) { MachineInstr *MI = Br.MI; MachineBasicBlock *MBB = MI->getParent(); if (!isThumb1) llvm_unreachable("FixUpUnconditionalBr is Thumb1 only!"); // Use BL to implement far jump. Br.MaxDisp = (1 << 21) * 2; MI->setDesc(TII->get(ARM::tBfar)); BBSiz...
false
false
false
false
false
0
fb_pixbuf_make_press_image(GdkPixbuf *front) { GdkPixbuf *press, *tmp; int w, h; ENTER; w = gdk_pixbuf_get_width(front) - 2 * PRESS_GAP; h = gdk_pixbuf_get_height(front) - 2 * PRESS_GAP; press = gdk_pixbuf_copy(front); tmp = gdk_pixbuf_scale_simple(front, w, h, GDK_INTERP_HYPER); if (pr...
false
false
false
false
false
0
L10() {register object *base=vs_base; register object *sup=base+VM10; VC10 vs_check; {register object V29; object V30; V29=(base[0]); V30=(base[1]); vs_top=sup; goto TTL; TTL:; if(!((CMPcar((V29)))==(((object)VV[17])))){ goto T95;} base[2]= (V29); vs_top=(vs_base=base+2)+1; return; goto T95; T95:; if(!((...
false
false
false
false
false
0
free_action(ACTION_S **action) { if(action && *action){ if((*action)->from) mail_free_address(&(*action)->from); if((*action)->replyto) mail_free_address(&(*action)->replyto); if((*action)->fcc) fs_give((void **)&(*action)->fcc); if((*action)->litsig) fs_give((void **)&(*action)->litsig); if((*acti...
false
false
false
false
false
0
execute_word_of_recall(object *op) { object *wor = op; while (op != NULL && op->type != PLAYER) op = op->env; if (op != NULL && op->map) { if ((get_map_flags(op->map, NULL, op->x, op->y, NULL, NULL)&P_NO_CLERIC) && (!QUERY_FLAG(op, FLAG_WIZCAST))) draw_ext_info(NDI_UNIQUE, 0, o...
false
false
false
false
false
0
gui_set_message_pane_options( MessagePane *pane, List *ids, List *descs ) { unsigned i; pane->options_count = (unsigned)ids->count; pane->options = calloc(pane->options_count, sizeof(MessagePane_Option)); list_reset(ids); list_reset(descs); for (i = 0; i < pane->options_count; i++) { Mes...
false
false
false
false
false
0
ecs_file_isdir(const char *name) { int retval = 0; #if defined(HAVE_SYS_STAT_H) struct stat s; if (stat(name, &s) != 0) { if (errno != ENOENT) ecs_error(__FILE__, __LINE__, errno, _("Error querying information for directory:\n%s."), name) ; } else { if (S_ISDI...
false
false
false
false
false
0
totalChunkArenaSize() { ChunkArenaPtr arena; int i, size = 0; for(i = 0; i < numArenas; i++) { arena = &(chunkArenas[i]); if(arena->chunks) size += (CHUNK_SIZE * ARENA_CHUNKS); } return size; }
false
false
false
false
false
0
reset(){ while (clip_scale_stack){ pop_clip_scale(); } get_area_size(&clip_rect); AW_matrix::reset(); privat_reset(); }
false
false
false
false
false
0
populate_maildir_list(struct path_list *list, const char *path) { DIR *dir; struct dirent *dent; if ((dir = opendir(path)) == NULL) { error("cannot opendir %s (%s)", path, strerror(errno)); return -1; } while ((dent = readdir(dir)) != NULL) { if (dent->d_name[0] == '.') continue; path_list_insert(dent...
false
false
false
false
false
0
add_pid_filter(struct firedtv *fdtv, u8 *operand) { int i, n, pos = 1; for (i = 0, n = 0; i < 16; i++) { if (test_bit(i, &fdtv->channel_active)) { operand[pos++] = 0x13; /* flowfunction relay */ operand[pos++] = 0x80; /* dsd_sel_spec_valid_flags -> PID */ operand[pos++] = (fdtv->channel_pid[i] >> 8) & 0x1...
false
false
false
false
false
0
delayJob(Job& job, FaxRequest& req, const Status& r, time_t tts) { job.state = FaxRequest::state_sleeping; req.tts = tts; time_t delay = tts - Sys::now(); // adjust kill time so job isn't removed before it runs job.stopKillTimer(); req.killtime += delay; job.startKillTimer(req.killtime); ...
false
false
false
false
false
0
ubifs_orphan_end_commit(struct ubifs_info *c) { int err; if (c->cmt_orphans != 0) { err = commit_orphans(c); if (err) return err; } erase_deleted(c); err = dbg_check_orphans(c); return err; }
false
false
false
false
false
0
pgstat_count_truncate(Relation rel) { PgStat_TableStatus *pgstat_info = rel->pgstat_info; if (pgstat_info != NULL) { /* We have to log the effect at the proper transactional level */ int nest_level = GetCurrentTransactionNestLevel(); if (pgstat_info->trans == NULL || pgstat_info->trans->nest_level != ne...
false
false
false
false
false
0
loadCovRad (double **values, int *len) { *values = new double[MAX_ELT]; GcuAtomicRadius r; r.type = GCU_COVALENT; r.charge = 0; r.scale = NULL; r.cn = -1; r.spin = GCU_N_A_SPIN; for (int i = 1; i <= MAX_ELT; i++) { r.Z = i; gcu::Element *elt = gcu::Element::GetElement (i); (*values)[i - 1] = (elt && elt->...
false
false
false
false
false
0
free_result() { DBUG_ENTER("ha_federated::free_result"); if (stored_result && !position_called) { mysql_free_result(stored_result); stored_result= 0; if (results.elements > 0) results.elements--; } DBUG_VOID_RETURN; }
false
false
false
false
false
0
GetLinkInformation(const char* config, cmTarget *head) { cmTarget *headTarget = head ? head : this; // Lookup any existing information for this configuration. TargetConfigPair key(headTarget, cmSystemTools::UpperCase(config?config:"")); cmTargetLinkInformationMap::iterator ...
false
false
false
false
false
0
register_entries_gisman2(char *pkg_short_name, char *gisbase) { char file[MAXSTR]; FILE *f_gisman2; char str[MAXSTR]; /* check if entries-gisman2 exists and is readable */ sprintf(file, "../entries-gisman2"); f_gisman2 = fopen(file, "r"); if (f_gisman2 == NULL) { if (errno == ENOENT) { ...
true
true
false
false
true
1
setup_ring(struct xenbus_device *dev, struct tpm_private *priv) { struct xenbus_transaction xbt; const char *message = NULL; int rv; grant_ref_t gref; priv->shr = (void *)__get_free_page(GFP_KERNEL|__GFP_ZERO); if (!priv->shr) { xenbus_dev_fatal(dev, -ENOMEM, "allocating shared ring"); return -ENOMEM; } r...
false
false
false
false
false
0
setUserCalendarModel(UserCalendarModel *model) { Q_ASSERT(model); if (!model) return; if (m_UserCalendarModel==model) return; m_UserCalendarModel = model; ui->editor->setUserCalendarModel(m_UserCalendarModel); ui->agendaNamesCombo->setModel(m_UserCalendarModel); ui->agendaNam...
false
false
false
false
false
0
pluginPageQuestionAsked(const QString& mimetype) const { // parentPart() should be const! KHTMLPart* parent = const_cast<KHTMLPart *>(this)->parentPart(); if ( parent ) return parent->pluginPageQuestionAsked(mimetype); return d->m_pluginPageQuestionAsked.contains(mimetype); }
false
false
false
false
false
0
ii_index(Token *args) /* INDEX(str1,str2) */ #else /* K&R style */ ii_index(args) /* INDEX(str1,str2) */ Token *args; #endif /* HAVE_STDC */ { Token *t1,*t2; t1=args->next_token; t2=t1->next_token; if(t2 == NULL || t1->TOK_type != type_STRING || t2->TOK_type != type_STRING || !is_true(LIT_CONS...
false
false
false
false
false
0
zsetbbox(i_ctx_t *i_ctx_p) { os_ptr op = osp; double box[4]; int code = num_params(op, 4, box); if (code < 0) return code; if ((code = gs_setbbox(igs, box[0], box[1], box[2], box[3])) < 0) return code; pop(4); return 0; }
false
false
false
false
false
0
affic_lstcon(liste) LST_PSEUDO_CON liste; { LST_PSEUDO_CON fin_liste; while (liste != NULL) { if (liste->coeur_plot == COEUR_CON) printf("COEUR *** "); else printf("PLOT ***"); printf("Con %20s face %d xabs %5ld yabs %5ld largeur %3ld layer %d root %10s\n", liste->nom_con, liste->face, liste->co...
false
false
false
false
true
1
mg_destroy_server(struct mg_server **server) { if (server != NULL && *server != NULL) { struct mg_server *s = *server; int i; ns_mgr_free(&s->ns_mgr); for (i = 0; i < (int) ARRAY_SIZE(s->config_options); i++) { NS_FREE(s->config_options[i]); // It is OK to free(NULL) } NS_FREE(s); ...
false
false
false
false
false
0
scheduledCacheUpdate() { if (useCache()) { QHashIterator<QString, QPixmap> it(pixmapsToCache); while (it.hasNext()) { it.next(); pixmapCache->insertPixmap(idsToCache[it.key()], it.value()); } } pixmapsToCache.clear(); keysToCache.clear(); idsToCache.c...
false
false
false
false
false
0
add(const UChar *s, int length) { if (!length) { UString::Rep::empty.hash(); return &UString::Rep::empty; } UCharBuffer buf = {s, static_cast<unsigned int>(length)}; return *identifierTable().add<UCharBuffer, UCharBufferTranslator>(buf).first; }
false
false
false
false
false
0
mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r) { mp_err res; mp_int qp; mp_digit rem; int pow; ARGCHK(a != NULL, MP_BADARG); if(d == 0) return MP_RANGE; /* Shortcut for powers of two ... */ if((pow = s_mp_ispow2d(d)) >= 0) { mp_digit mask; mask = ((mp_digit)1 << ...
false
false
false
false
true
1
ixgbe_configure_msix(struct ixgbe_adapter *adapter) { struct ixgbe_q_vector *q_vector; int v_idx; u32 mask; /* Populate MSIX to EITR Select */ if (adapter->num_vfs > 32) { u32 eitrsel = (1 << (adapter->num_vfs - 32)) - 1; IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITRSEL, eitrsel); } /* * Populate the IVAR tab...
false
false
false
false
false
0
eci_impl_set_last_values(struct eci_parser* parser) { DBC_CHECK(parser != 0); DBC_CHECK(parser->state_rep == ECI_STATE_COMMON_LF_3); switch(parser->last_type_repp[0]) { case 's': eci_string_add(&parser->last_s_repp, 0, parser->buffer_rep.d, parser->buffer_current_rep); break; case 'S': ...
false
false
false
false
true
1
tps65218_regulator_probe(struct platform_device *pdev) { struct tps65218 *tps = dev_get_drvdata(pdev->dev.parent); struct regulator_init_data *init_data; const struct tps_info *template; struct regulator_dev *rdev; const struct of_device_id *match; struct regulator_config config = { }; int id; match = of_match...
false
false
false
false
false
0
setParameterData(Model* model, ecif_parameterType param_type, Tcl_Interp* interp, const char* array_name) { // Read parameter ids int size = 0; int* ids = NULL; readVariable(interp, array_name, "ids", size, ids); // Mark parameter for update, so that non-set parameters /...
false
false
false
false
false
0
eet_data_put_short(Eet_Dictionary *ed __UNUSED__, const void *src, int *size_ret) { short *s, *d; d = (short *)malloc(sizeof(short)); if (!d) return NULL; s = (short *)src; *d = *s; CONV16(*d); *size_ret = sizeof(short); return d; }
false
false
false
false
false
0
generate_monster_inv(object *gen) { int i; int nx, ny; object *op, *head = NULL; const char *code; int qty = 0; /* Code below assumes the generator is on a map, as it tries * to place the monster on the map. So if the generator * isn't on a map, complain and exit. */ if (gen...
false
false
false
false
false
0
collectionLocation() const { Collections::CollectionLocation *location = CollectionManager::instance()->primaryCollection()->location(); QStringList result = location->actualLocation(); delete location; return result; }
false
false
false
false
false
0
delete_colormap_hook(int dummy, void *colormap_x, void *callback_x) { Gif_Colormap *gfcm = (Gif_Colormap *)colormap_x; Gif_XContext *gfx = (Gif_XContext *)callback_x; Gif_XColormap *gfxc; (void) dummy; for (gfxc = gfx->xcolormap; gfxc; gfxc = gfxc->next) if (gfxc->colormap == gfcm) { delete_xcolorma...
false
false
false
false
false
0
ReleaseThreadCtx(void *ptr) { WARN("%p current for thread being destroyed\n", ptr); ALCcontext_DecRef(ptr); }
false
false
false
false
false
0
qm_muls16(s16 op1, s16 op2) { s32 result; if (op1 == (s16) 0x8000 && op2 == (s16) 0x8000) result = 0x7fffffff; else result = ((s32) (op1) * (s32) (op2)); return (s16) (result >> 15); }
false
false
false
false
false
0
kbd_map_print(FILE *fp, struct kbd_map *map, int complete) { int i; for (i = 0; i < map->size; i++) { if (!complete && KEY_RESERVED == map->map[i].keycode) continue; kbd_key_print(fp,map->map[i].scancode,map->map[i].keycode); } }
false
false
false
false
false
0
tpkt_write_header(STREAM* s, int length) { stream_write_uint8(s, 3); /* version */ stream_write_uint8(s, 0); /* reserved */ stream_write_uint16_be(s, length); /* length */ }
false
false
false
false
false
0
get_pols_iter(void *data, osa_policy_ent_t entry) { char *name; if ((name = strdup(entry->name)) == NULL) return; get_either_iter(data, name); }
false
false
false
false
false
0
nickrec_isnick(nickrec **list, nickrec **last, char *nick) { nickrec *n, *lastchecked = NULL; for(n=*list; n!=NULL; n=n->next) { if(isequal(n->nick,nick)) { /* found it. do a movetofront. */ nickrec_movetofront(list,last,lastchecked,n); return 1; } lastchecked = n; } return 0; }
false
false
false
false
false
0
ink_comboboxentry_action_set_entry_width( Ink_ComboBoxEntry_Action* action, gint entry_width ) { action->entry_width = entry_width; // Widget may not have been created.... if( action->entry ) { gtk_entry_set_width_chars( GTK_ENTRY(action->entry), entry_width ); } }
false
false
false
false
false
0
pointInHitableShape(boost::int32_t x, boost::int32_t y) const { if (isDynamicMask() && !mouseEnabled()) return false; const DisplayObject* mask = getMask(); if (mask && !mask->pointInShape(x, y)) return false; HitableShapeContainerFinder finder(x, y); _displayList.visitBackward(finder...
false
false
false
false
false
0
readPgfHeaderSize(BasicIo& iIo) { DataBuf buffer(4); long bufRead = iIo.read(buffer.pData_, buffer.size_); if (iIo.error()) throw Error(14); if (bufRead != buffer.size_) throw Error(20); uint32_t headerSize = 0; memcpy (&headerSize, buffer.pData_, 4); // TODO : ...
false
false
false
false
false
0
strip_comments(char *string) { int state = 0; /* * 0 - not in comment * 1 - in c-style comment * 2 - in c++-style comment * 3 - in string * 4 - after reading / not in comments * 5 - after reading * in c-style ...
false
false
false
false
false
0
RegisterMagickSignalHandler(int signal_number) { SignalHandler *handler; handler=SetMagickSignalHandler(signal_number,MagickSignalHandler); if (handler == SIG_ERR) return(handler); if (handler != SIG_DFL) handler=SetMagickSignalHandler(signal_number,handler); else (void) LogMagickEvent(Config...
false
false
false
false
false
0
cellRepresentation2String( CSF_CR cellRepresentation) { std::string result = "CR_UNDEFINED"; switch(cellRepresentation) { // CSF version 2. ---------------------------------------------------------- case CR_UINT1: { result = "CR_UINT1"; break; } case CR_INT4: { result = ...
false
false
false
false
false
0
php_output_context_init(php_output_context *context, int op TSRMLS_DC) { if (!context) { context = emalloc(sizeof(php_output_context)); } memset(context, 0, sizeof(php_output_context)); TSRMLS_SET_CTX(context->tsrm_ls); context->op = op; return context; }
false
false
false
false
false
0
go_doc_set_uri (GODoc *doc, char const *uri) { char *new_uri; g_return_val_if_fail (doc != NULL, FALSE); if (go_str_compare (uri, doc->uri) == 0) return TRUE; new_uri = g_strdup (uri); g_free (doc->uri); doc->uri = new_uri; /* FIXME FIXME FIXME should we allow signal to return FALSE and disable the assignme...
false
false
false
false
false
0
sigchild(int sig) { const int olderrno = errno; pid_t pid; (void) sig; # ifdef HAVE_WAITPID while ((pid = waitpid((pid_t) -1, NULL, WNOHANG)) > (pid_t) 0) { if (nb_children > 0U) { nb_children--; } # ifdef FTPWHO ftpwho_unlinksbfile(pid); # endif iptrac...
false
false
false
false
false
0
xmms_plugin_scan_directory (const gchar *dir) { GDir *d; const char *name; gchar *path; gchar *temp; gchar *pattern; GModule *module; gpointer sym; temp = get_module_ext (dir); XMMS_DBG ("Scanning directory for plugins (%s)", temp); pattern = g_path_get_basename (temp); g_free (temp); d = g_dir_open (d...
false
false
false
false
false
0