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
SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // optional string error = 1; if (has_error()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->error().data(), this->error().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); ...
false
false
false
false
false
0
addLeadAuxiliaryVarInternal(bool endo, int index) throw (FrozenException) { ostringstream varname; if (endo) varname << "AUX_ENDO_LEAD_"; else varname << "AUX_EXO_LEAD_"; varname << index; int symb_id; try { symb_id = addSymbol(varname.str(), eEndogenous); } catch (AlreadyDeclaredExc...
false
false
false
false
false
0
constants_in_term(Term t, Ilist p) { if (VARIABLE(t)) return p; else if (CONSTANT(t)) { if (ilist_member(p, SYMNUM(t))) return p; else return ilist_prepend(p, SYMNUM(t)); } else { int i; for (i = 0; i < ARITY(t); i++) p = constants_in_term(ARG(t, i), p); return p; } }
false
false
false
false
false
0
cherry_pick_list(struct commit_list *list, struct rev_info *revs) { struct commit_list *p; int left_count = 0, right_count = 0; int left_first; struct patch_ids ids; /* First count the commits on the left and on the right */ for (p = list; p; p = p->next) { struct commit *commit = p->item; unsigned flags = c...
false
false
false
false
false
0
readLine(std::string& line, std::string::size_type n) { static const int eof = std::char_traits<char>::eof(); line.clear(); int ch = _istr.peek(); while (ch != eof && ch != '\r' && ch != '\n') { ch = (char) _istr.get(); if (line.length() < n) line += ch; ch = _istr.peek(); } if (ch != eof) _istr.get(); i...
false
false
false
false
false
0
xml2kb_to_std (const char *text) { int i; for (i = 0; default_bindings[i].desc; ++i) if (!strcmp (text, gettext (default_bindings[i].desc))) return default_bindings[i].desc; return NULL; }
false
false
false
false
false
0
EmitWin64EHHandlerData() { MCStreamer::EmitWin64EHHandlerData(); // Switch sections. Don't call SwitchSection directly, because that will // cause the section switch to be visible in the emitted assembly. // We only do this so the section switch that terminates the handler // data block is visible. MCWin64...
false
false
false
false
false
0
allocate_memory_oob(size_t size, xml_memory_page*& out_page) { const size_t large_allocation_threshold = xml_memory_page_size / 4; xml_memory_page* page = allocate_page(size <= large_allocation_threshold ? xml_memory_page_size : size); out_page = page; if (!page) return 0; if (size <= large_alloc...
false
false
false
false
false
0
private_protocol_factory(Repl_Protocol *rp, int type) { Private_Repl_Protocol *prp = NULL; switch (type) { case PROTOCOL_5_INCREMENTAL: if (NULL == rp->conn) { rp->conn = conn_new(rp->agmt); } if (NULL != rp->conn) { prp = Repl_5_Inc_Protocol_new(rp); } break; case PROTOCOL_5_TOTAL: if...
false
false
false
false
false
0
qh_matchmatch (facetT *facet, int skip, facetT *matchfacet, facetT *newfacet, int newskip, boolT ismatch, boolT *keepfound, boolT *newmatched) { int matchskip; boolT ismatched= False; matchskip= qh_setindex (matchfacet->neighbors, facet); trace2((qh ferr, "qh_matchmatch: duplicated f%d skip %d matches f%...
false
false
false
false
true
1
PyVTKTemplate_Values(PyObject *ob, PyObject *args) { if (PyArg_ParseTuple(args, (char *)":values")) { ob = ((PyVTKTemplate *)ob)->dict; return PyObject_CallMethod(ob, (char *)"values", (char *)"()"); } return NULL; }
false
false
false
false
false
0
slotSnapshot2() { m_dealer->createDump().save( QString( "%1.png" ).arg( m_dealer->gameId() ) ); ++m_dealer_it; if ( m_dealer_it != m_dealer_map.constEnd() ) QTimer::singleShot( 0, this, SLOT(slotSnapshot()) ); }
false
false
false
false
false
0
login_finish(struct iscsi_connection *conn) { struct iscsi_login_rsp *rsp = (struct iscsi_login_rsp *) &conn->rsp.bhs; int ret; uint8_t class, detail; switch (conn->session_type) { case SESSION_NORMAL: /* * Allocate transport resources for this connection. */ ret = conn->tp->ep_login_complete(conn); i...
false
false
false
false
false
0
sting(object *monster) { short sting_chance = 35; char msg[80]; if ((rogue.str_current <= 3) || sustain_strength) { return; } sting_chance += (6 * (6 - get_armor_class(rogue.armor))); if ((rogue.exp + ring_exp) > 8) { sting_chance -= (6 * ((rogue.exp + ring_exp) - 8)); } if (rand_per...
false
false
false
false
false
0
ndmta_mover_apply_pending (struct ndm_session *sess) { struct ndm_tape_agent * ta = &sess->tape_acb; if (!ta->pending_change_after_drain) { /* internal botch */ } ta->mover_state.state = ta->pending_mover_state; ta->mover_state.halt_reason = ta->pending_mover_halt_reason; ta->mover_state.pause_reason = ta->pe...
false
false
false
false
false
0
crtc1SetRegion( CoreLayer *layer, void *driver_data, void *layer_data, void *region_data, CoreLayerRegionConfig *config, CoreLayerRegionConfigFlags upd...
false
false
false
false
false
0
mlx4_cmd_init(struct mlx4_dev *dev) { struct mlx4_priv *priv = mlx4_priv(dev); int flags = 0; if (!priv->cmd.initialized) { mutex_init(&priv->cmd.slave_cmd_mutex); sema_init(&priv->cmd.poll_sem, 1); priv->cmd.use_events = 0; priv->cmd.toggle = 1; priv->cmd.initialized = 1; flags |= MLX4_CMD_CLEANUP_...
false
false
false
false
false
0
CreateGeometryFromWkb( int len, char *bin_string, OSRSpatialReferenceShadow *reference=NULL ) { OGRGeometryH geom = NULL; OGRErr err = OGR_G_CreateFromWkb( (unsigned char *) bin_string, reference, ...
false
false
false
false
false
0
get_hetero_occupied_stasche_acc_table_by_mtg_id(int mtg_id, int acc_no, Boolean is_first) { Hetero_stasche_acc_table *acc_p, *acc = NULL; for (acc_p = acc_stasche_head->acc[acc_no]; acc_p != NULL; acc_p = acc_p->next) { if (acc_p->mtg_num == 1 && acc_p->mtg_id[0] == mtg_id) { ...
false
false
false
false
false
0
TranslateComplex_ (MolComplexS *mol_complexSP, VectorS *shift_vectorSP, ConfigS *configSP, int edit_modeI) { size_t i; AtomS *curr_atomSP; /* Translate all atoms: */ for (i = 0; i < mol_complexSP->atomsN; i++) { /* Pointer to the current atom: */ curr_atomSP = mol_complexSP->atomSP + i; /* If editing atom...
false
false
false
false
false
0
slider_cb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_SCROLLBAR_SPEC *sp = obj->parent->spec; if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; if ( obj->parent->how_return & FL_RETURN_END_CHANGED && obj->returned & FL_RETURN_END ) ...
false
false
false
false
false
0
vga_arb_release(struct inode *inode, struct file *file) { struct vga_arb_private *priv = file->private_data; struct vga_arb_user_card *uc; unsigned long flags; int i; pr_debug("%s\n", __func__); if (priv == NULL) return -ENODEV; spin_lock_irqsave(&vga_user_lock, flags); list_del(&priv->list); for (i = 0; ...
false
false
false
false
false
0
dl_restart() { restart_requested = 0; if(retrans_interface == NULL) { pcap_dump_flush(pdp); pcap_dump_close(pdp); } else { eth_close(eth_retrans); } pcap_close(pd); start_sniffing(); sniff_loop(); }
false
false
false
false
false
0
ai_fire_artillery( Unit *unit, AI_Group *group ) { AI_Eval *eval = ai_create_eval( unit, group, unit->x, unit->y ); if ( ai_evaluate_hex( eval ) && eval->target ) { action_queue_attack( unit, eval->target ); AI_DEBUG( 1, "%s attacks first %s\n", unit->name, eval->target->name ); } fr...
false
false
false
false
false
0
add_bits(CByteArray *data, unsigned long *bit_pos, unsigned long pattern, unsigned int pattern_length) { unsigned long i; for(i=0;i<pattern_length;i++) { data=add_bit(data,bit_pos,(unsigned char)((pattern>>(pattern_length-1-i))&1) ); /* use pattern from upper to lower bit */ } return data; }
false
false
false
false
false
0
temp_file() /* Open a temporary file and return its file descriptor */ { const int max_retries = 50; char *name; int fd, i; i = 0; name = NULL; do { i++; free(name); name = tempnam(NULL, NULL); if (name == NULL) die("Can't find a unique temporary filename"); fd = open(name, O_RDWR | O_...
false
false
false
false
false
0
n_droppable_s(Stack *dest_stack) { int src_top, dest_top, src_count, dest_count, i, src_next; src_count = stack_count_cards(src_stack); dest_count = stack_count_cards(dest_stack); dest_top = stack_get_card(dest_stack, dest_count-1); for (i=0; i<10; i++) { if (dest_stack == maincells[i]) { int n = ...
false
false
false
false
false
0
NK6510_CreateSMSFolder(gn_data *data, struct gn_statemachine *state) { unsigned char req[50] = {FBUS_FRAME_HEADER, 0x10, 0x01, 0x00, 0x01, 0x00, /* length */ 0x00, 0x00 }; int len; dprintf("Creating SMS Folder...\n"); len = char_unicode_encode(req + 10, data->sms_folder->name, strlen(data->sms_fold...
true
true
false
false
false
1
rehash(struct hashtable *h, int s) { int i,gs; struct hashentry *gt; gt=h->tab; gs=h->size; h->tab=CALLOC(s, struct hashentry); h->nent=h->nval; h->size=s; for(i=0;i<gs;i++) { if (gt[i].left && gt[i].left!=DELETED_HASHENTRY) add_hash_value(h, gt[i].left, gt[i].ri...
false
false
false
false
false
0
OnChooseTempDir(wxCommandEvent & e) { wxDirDialog dlog(this, _("Choose a location to place the temporary directory"), gPrefs->Read(wxT("/Directories/TempDir"), wxGetApp().defaultTempDir)); int retval = dlog.ShowModal(); if (retval != w...
false
false
false
false
false
0
isl_basic_map_add_div_constraint(__isl_keep isl_basic_map *bmap, unsigned div, int sign) { unsigned total; unsigned div_pos; if (!bmap) return -1; total = isl_basic_map_total_dim(bmap); div_pos = total - bmap->n_div + div; if (sign < 0) return add_upper_div_constraint(bmap, div_pos, bmap->div[div]); else...
false
false
false
false
false
0
qinv(double p, double c, double v) { const static double p0 = 0.322232421088; const static double q0 = 0.993484626060e-01; const static double p1 = -1.0; const static double q1 = 0.588581570495; const static double p2 = -0.342242088547; const static double q2 = 0.531103462366; const static d...
false
false
false
false
false
0
call_insn_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) { return ((GET_CODE (op) == SYMBOL_REF) && ( (mode == VOIDmode || GET_MODE (op) == mode))) || (s_register_operand (op, mode)); }
false
false
false
false
false
0
cs_CheckOp(struct Channel *chanptr, struct ChanInfo *cptr, char *nick) { struct ChannelUser *tempuser; char modes[MAXLINE + 1]; if (!chanptr || !cptr || !nick) return; /* * If the user is flagged to be denied channel op * privileges, do nothing */ /* If user has NEVEROP flag do nothing too / CoolCold ...
true
true
false
false
false
1
check_valid_type (char **type, JeexTypeCode ** code) { int i, s, mem = 1; gboolean chk = FALSE; const char *supported_type[] = { "char", "int", "double", "float", "long", "unsigned", "short", "signed", NULL }; return_val_if_fail (type, FALSE); *code = (JeexTypeCode *) malloc (mem * sizeof (JeexTyp...
false
true
false
false
true
1
afs_proc_cell_remove(struct afs_cell *cell) { _enter(""); remove_proc_subtree(cell->name, proc_afs); _leave(""); }
false
false
false
false
false
0
mx_fade_effect_get_border (MxFadeEffect *effect, guint *top, guint *right, guint *bottom, guint *left) { MxFadeEffectPrivate *priv; g_return_if_fail (MX_IS_FADE_EFFECT (effect)); ...
false
false
false
false
false
0
search_dlg_block(Block *block) { Block *bpt, *tar; for (bpt = block; bpt != NULL; bpt = bpt->next) { if (bpt->kind == SB) continue; else if (block_has_dlg_tag(bpt) && bpt->dlg_sb_flg) return bpt; else if (block_has_car_tag(bpt) && bpt->dlg_sb_flg) ...
false
false
false
false
false
0
find_upp_y_min_max(int xcPix, int ycTracePix, double int_min, float** mInImaF, float* yMin, float* yMax, int LOC_SAV_BORD_SZ) { int i = 0; int y1 =0; int y2 =0; double int1 =0; doub...
false
false
false
false
false
0
addDropDown( int x1, int y1, int x2, int y2, int ID, const char** entries, int entrynum, int* pos ) { pbutton pb = firstbutton; if ( ID <= 0) displaymessage("tdialogbox: id equal or less then 0", 2); while (pb != NULL) { if (pb->id == ID) displaymessage("tdialogbox: duplicate button i...
false
false
false
false
false
0
find_start(alphix *p, char *ax) { int i, k; char *v; v = ax + strlen(ax) - 1; /* start at last character */ for (i = 0; v >= ax && i < p->nd; v--, i++) { /* working backwards */ for (k = 0; k < p->ds[i].n; k++) { /* Locate */ if (*v == p->ds[i].seq[k]) break; /* Found */ } if (k >= p->ds[i].n) /*...
false
false
false
false
false
0
session_bcast(session *s, const void *buf, size_t len) { if (!s || !buf || !len) return 0; if (s->tcp) return 0; struct sockaddr_in addr4 = {0}; addr4.sin_family = AF_INET; addr4.sin_port = htons(s->port); addr4.sin_addr.s_addr = -1; socklen_t alen = sizeof(struct sockaddr_in); int wlen = sendto(s->fd, (c...
false
false
false
false
false
0
do_add_mount(struct mount *newmnt, struct path *path, int mnt_flags) { struct mountpoint *mp; struct mount *parent; int err; mnt_flags &= ~MNT_INTERNAL_FLAGS; mp = lock_mount(path); if (IS_ERR(mp)) return PTR_ERR(mp); parent = real_mount(path->mnt); err = -EINVAL; if (unlikely(!check_mnt(parent))) { /* ...
false
false
false
false
false
0
imap_parse_list(void) { char *cp; cp = responded_other_text; list_attributes = LIST_NONE; if (*cp == '(') { while (*cp && *cp != ')') { if (*cp == '\\') { if (ascncasecmp(&cp[1], "Noinferiors ", 12) == 0) { list_attributes |= LIST_NOINFERIORS; cp += 12; } else if (ascncasecmp(&cp[1], "...
false
false
false
false
false
0
RemoveRange(void **start, void **end, int N) { ASSERT(N > 0); lock_.Lock(); if (N == Static::sizemap()->num_objects_to_move(size_class_) && used_slots_ > 0) { int slot = --used_slots_; ASSERT(slot >= 0); TCEntry *entry = &tc_slots_[slot]; *start = entry->head; *end = entry->tail; loc...
false
false
false
false
false
0
lua_tostring (lua_State *L, int index) { StkId o = luaA_indexAcceptable(L, index); return (o == NULL || tostring(L, o)) ? NULL : svalue(o); }
false
false
false
false
false
0
setup_device_config(struct tia_eegdev* tdev, const char* url) { struct parsingdata data = {.tdev = tdev}; struct devmodule* dev = &tdev->dev; // Request system information from server if (tia_request(tdev, TIA_METAINFO, &data)) return -1; // setup device capabilities with the digested metainfo data.cap.device...
false
false
false
false
false
0
ublkcpy(BW *bw) { if (markv(1)) { if (square) { long height = markk->line - markb->line + 1; long width = markk->xcol - markb->xcol; int usetabs = ptabrect(markb, height, markk->xcol); B *tmp = pextrect(markb, height, markk->xcol); if (bw->o.overtype) pdelrect(bw->cursor, height, piscol(bw->curso...
false
false
false
false
false
0
cbf_get_axis_setting (cbf_handle handle, unsigned int reserved, const char *axis_id, double *start, double *increment) { cbf_axis_type type; if (reserved != 0) ...
false
false
false
false
false
0
evbuffer_reserve_space(struct evbuffer *buf, ev_ssize_t size, struct evbuffer_iovec *vec, int n_vecs) { struct evbuffer_chain *chain, **chainp; int n = -1; EVBUFFER_LOCK(buf); if (buf->freeze_end) goto done; if (n_vecs < 1) goto done; if (n_vecs == 1) { if ((chain = evbuffer_expand_singlechain(buf, siz...
false
false
false
false
false
0
adjust_instance_count(char *countfile, int inc) { int fd; int proccount = 0; int brw; fd = open(countfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); brw = read(fd, &proccount, sizeof(int)); if ((brw == 0) || (brw == -1)) proccount = 0; proccount += inc; if (proccount < 0) ...
false
false
false
false
false
0
buf_add_mem(struct buffer *buf, const void *data, size_t len) { if (buf->len + len > buf->size && buf_resize(buf, len) == -1) return -1; memcpy(buf->p + buf->len, data, len); buf->len += len; return 0; }
false
true
false
false
false
1
createView (String fileName, Widget parent, Arg args[], int nargs) { Widget result; char widgetName[255]; Arg list[32]; int err, loop, nlist; char msg[256]; /* Read in grid to be viewed */ strcpy(theView.fileName, fileName); theView.grid = CreateGMTGrid(); Trace("Reading grid file..."); ...
false
false
false
false
false
0
is_clause_in_range (MonoExceptionClause *clause, guint32 start, guint32 end) { if (clause->try_offset >= start && clause->try_offset < end) return TRUE; if (HANDLER_START (clause) >= start && HANDLER_START (clause) < end) return TRUE; return FALSE; }
false
false
false
false
false
0
qwak_get_tile_info(int tile_index) { UINT8 code = runaway_video_ram[tile_index]; SET_TILE_INFO(0, ((code & 0x7f) << 1) | ((code & 0x80) >> 7), 0, 0); }
false
false
false
false
false
0
cosh (const cl_N& x) { // Methode: // x reell -> klar // x = a+bi -> (complex (* (cosh a) (cos b)) (* (sinh a) (sin b))) if (realp(x)) { DeclareType(cl_R,x); return cosh(x); } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cos_sin_t trig_b = c...
false
false
false
false
false
0
coalesce_mblocks (bdescr *p) { bdescr *q; q = p->link; if (q != NULL && MBLOCK_ROUND_DOWN(q) == (StgWord8*)MBLOCK_ROUND_DOWN(p) + BLOCKS_TO_MBLOCKS(p->blocks) * MBLOCK_SIZE) { // can coalesce p->blocks = MBLOCK_GROUP_BLOCKS(BLOCKS_TO_MBLOCKS(p->blocks) + ...
false
false
false
false
false
0
DeleteBullet(int Bulletnumber, int ShallWeStartABlast) { Bullet CurBullet = &(AllBullets[Bulletnumber]); // At first we generate the blast at the collision spot of the bullet, // cause later, after the bullet is deleted, it will be hard to know // the correct location ;) // if (ShallWeStartABlast) StartBlast(C...
false
false
false
false
false
0
clocks_analog_frame_real_draw_progress (ClocksAnalogFrame* self, cairo_t* cr, gint center_x, gint center_y, gint radius) { g_return_if_fail (cr != NULL); }
false
false
false
false
false
0
newQueue(unsigned int id) { messageQueue *tmpQueueList; m_lock(&gLock); dc_debug(DC_INFO, "Allocated message queues %d, used %d\n", qMemLen,qListLen ); if(qMemLen == qListLen) { tmpQueueList = (messageQueue *)realloc(queueList, sizeof(messageQueue) * (qMemLen + 1)); if (tmpQueueList == NULL) { m_lock(&gLo...
false
false
false
false
true
1
addToMessage(MapType & m) const { typedef MapType::const_iterator Iter; for (Iter I = m_attributes.begin(); I != m_attributes.end(); I++) { m[I->first] = I->second; } }
false
false
false
false
false
0
acpi_check_handle(acpi_handle handle, const char *method, acpi_handle *ret) { acpi_status status; if (method == NULL) return -ENODEV; if (ret) status = acpi_get_handle(handle, (char *)method, ret); else { acpi_handle dummy; status = acpi_get_handle(handle, (char *)method, &dummy); } ...
false
false
false
false
false
0
GetColumnConstraints(struct Promise *pp) { struct EditColumn c; char *value; c.column_separator = GetConstraint("field_separator",pp,CF_SCALAR); c.select_column = GetIntConstraint("select_field",pp); if (c.select_column != CF_NOINT && GetBooleanConstraint("start_fields_from_zero",pp)) { c.select_column++; ...
false
false
false
false
false
0
lpfc_mbox_get(struct lpfc_hba * phba) { LPFC_MBOXQ_t *mbq = NULL; struct lpfc_sli *psli = &phba->sli; list_remove_head((&psli->mboxq), mbq, LPFC_MBOXQ_t, list); if (mbq) psli->mboxq_cnt--; return mbq; }
false
false
false
false
false
0
write_h_func_c(ARGUMENTS *args, GWEN_XMLNODE *node, GWEN_SYNCIO *sio) { const char *name; const char *typ; const char *styp; styp=get_struct_property(node, "id", 0); if (!styp) { DBG_ERROR(0, "No id in struct"); return -1; } name=GWEN_XMLNode_GetProperty(node, "name", 0); if...
false
false
false
false
false
0
GEOSWKBReader_create_r(GEOSContextHandle_t extHandle) { if ( 0 == extHandle ) { return NULL; } GEOSContextHandleInternal_t *handle = 0; handle = reinterpret_cast<GEOSContextHandleInternal_t*>(extHandle); if ( 0 == handle->initialized ) { return NULL; } using geos::i...
false
false
false
false
false
0
_create_data(E_Config_Dialog *cfd __UNUSED__) { E_Config_Dialog_Data *cfdata; cfdata = E_NEW(E_Config_Dialog_Data, 1); if (!cfdata) return NULL; cfdata->kill_if_close_not_possible = e_config->kill_if_close_not_possible; cfdata->kill_process = e_config->kill_process; cfdata->kill_timer_wait = e_config...
false
false
false
false
false
0
sprintLeft(char*& dest, const char*& src, unsigned width) { while (std::isspace(*src)) ++src; const char* s = src; while (std::isgraph(*src)) *dest++ = *src++; unsigned w = src - s; while (w++ < width) *dest++ = ' '; ++dest; }
false
false
false
false
false
0
virt_efi_query_variable_info_nonblocking(u32 attr, u64 *storage_space, u64 *remaining_space, u64 *max_variable_size) { unsigned long flags; efi_status_t status; if (efi.runtime_version < EFI_2_00_SYSTEM_TABLE_REVISION) return EFI_UNSUPPORTED; if (!spin_trylock_irqsave(&efi_runtime_lock, flags)...
false
false
false
false
false
0
isl_basic_map_fix_pos_si( struct isl_basic_map *bmap, unsigned pos, int value) { int j; bmap = isl_basic_map_cow(bmap); bmap = isl_basic_map_extend_constraints(bmap, 1, 0); j = isl_basic_map_alloc_equality(bmap); if (j < 0) goto error; isl_seq_clr(bmap->eq[j] + 1, isl_basic_map_total_dim(bmap)); isl_int_set_...
false
false
false
false
false
0
nerr_pass_ctxf (const char *func, const char *file, int lineno, NEOERR *err, const char *fmt, ...) { NEOERR *nerr; va_list ap; if (err == STATUS_OK) return err; nerr = _err_alloc(); if (nerr == INTERNAL_ERR) return err; va_start(ap, fmt); vsnprintf (nerr->desc, sizeof(nerr->desc), fmt, ap);...
false
false
false
false
false
0
gagt_get_next_paragraph_line (const gagt_lineref_t line) { gagt_lineref_t next_line; /* Get the next line; return it if the paragraph matches, else NULL. */ next_line = gagt_get_next_page_line (line); if (next_line && next_line->paragraph == line->paragraph) return next_line; else return NULL; }
false
false
false
false
false
0
get_default_motions( const int id ) { std::map< int, std::string >::iterator it = m_map_default_motions.find( id ); if( it != m_map_default_motions.end() ) return ( *it ).second; return std::string(); }
false
false
false
false
false
0
client_connect( GuiWidget *widget, GuiEvent *event ) { #ifdef NETWORK_ENABLED NetAddr newaddr; int attempt = 0; int type; char server[128]; if ( event->type != GUI_CLICKED ) return; /* close the connect window */ gui_widget_hide( dlg_connect ); /* disconnect from current server */ client_disconnect(); ...
true
true
false
false
false
1
xfit_inpscurves(xfit *p, double *out, double *in) { int e; for (e = 0; e < p->di; e++) out[e] = xfit_inpscurve(p, in[e], e); }
false
false
false
false
false
0
add(TextEncoding::Ptr pEncoding, const std::string& name) { manager().add(pEncoding, name); }
false
false
false
false
false
0
ath10k_mac_monitor_vdev_is_allowed(struct ath10k *ar) { int num_ctx; num_ctx = ath10k_mac_num_chanctxs(ar); /* FIXME: Current interface combinations and cfg80211/mac80211 code * shouldn't allow this but make sure to prevent handling the following * case anyway since multi-channel DFS hasn't been tested at all....
false
false
false
false
false
0
readloci() { struct LOC_readloci V; long coupling, autosomal; double mu; int i; fscanf(datafile, "%ld%ld%ld%*[^\n]", &nsystem, &risksys, &autosomal); getc(datafile); if (nsystem > maxlocus) inputerror(0L, nsystem, nsystem); if (nsystem <= 0) inputerror(1L, nsystem, nsystem); risk = (risksys !...
false
true
false
false
true
1
snmp_sess_timeout(void *sessp) { struct session_list *slp = (struct session_list *) sessp; netsnmp_session *sp; struct snmp_internal_session *isp; netsnmp_request_list *rp, *orp = NULL, *freeme = NULL; struct timeval now; snmp_callback callback; void *magic; struct snmp_secm...
false
false
false
false
false
0
save_transaction_number(char * transaction_number) { FILE * fp; char filename[STRING_BLOCK]; char directory[STRING_BLOCK]; database_directory(directory); sprintf((char*)filename,"%s/transaction_numbers",directory); fp = fopen(filename,"a"); if (fp!=0L) { fprintf(fp,"%s\n",transaction_number); f...
false
false
false
false
false
0
process_message( FvwmPacket* packet ) { unsigned long type = packet->type; unsigned long length = packet->size; unsigned long* body = packet->body; switch (type) { case M_ADD_WINDOW: list_configure(body); break; case M_CONFIGURE_WINDOW: list_configure(body); break; case ...
false
false
false
false
false
0
gxps_jpeg_converter_end_page (GXPSConverter *converter) { GXPSImageConverter *image_converter = GXPS_IMAGE_CONVERTER (converter); if (!image_converter->writer) image_converter->writer = gxps_jpeg_writer_new (); GXPS_CONVERTER_CLASS (gxps_jpeg_converter_parent_class)->end_page (...
false
false
false
false
false
0
op1000(UINT16 opcode) { switch ((opcode >> 8) & 15) { case 0: MOVBS4(opcode & 0x0f, Rm); break; case 1: MOVWS4(opcode & 0x0f, Rm); break; case 2: NOP(); break; case 3: NOP(); break; case 4: MOVBL4(Rm, opcode & 0x0f); break; case 5: MOVWL4(Rm, opcode & 0x0f); break; case 6: NOP(...
false
false
false
false
false
0
gsb_utils_edit_calculate_entry ( GtkWidget *entry ) { gchar *string; gchar *pointeur; gsb_real total = null_real; string = my_strdup ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ); if ( string && strlen ( string ) ) pointeur = string + strlen ( string ); else { g_free ( st...
false
false
false
false
false
0
polytouchout_new(t_floatarg channel) { t_polytouchout *x = (t_polytouchout *)pd_new(polytouchout_class); if (channel <= 0) channel = 1; x->x_channel = channel; x->x_pitch = 0; floatinlet_new(&x->x_obj, &x->x_pitch); floatinlet_new(&x->x_obj, &x->x_channel); return (x); }
false
false
false
false
false
0
length(input_ty *this) { struct stat st; if (fstat(fileno(stdin), &st) < 0) return -1; if (!S_ISREG(st.st_mode)) return -1; return st.st_size; }
false
false
false
false
false
0
login_conv(int num_msg, const struct pam_message **msgm, struct pam_response **response, void *appdata_ptr) #endif { int count = 0; int reply_used = 0; struct pam_response *reply; if (num_msg <= 0) { #ifdef DEBUG printf("no message returned from pam module\n"); #endif return (PAM_CONV_ERR...
false
false
false
false
false
0
Prepare(GCTracer* tracer) { // Rather than passing the tracer around we stash it in a static member // variable. tracer_ = tracer; #ifdef DEBUG ASSERT(state_ == IDLE); state_ = PREPARE_GC; #endif ASSERT(!FLAG_always_compact || !FLAG_never_compact); compacting_collection_ = FLAG_always_compact || f...
false
false
false
false
false
0
start_listen() { reset(); switch (type) { case read: socket_select->listen_read(this); break; case write: socket_select->listen_write(this); break; case exception: socket_select->listen_exception(this); break; } }
false
false
false
false
false
0
loadRule(apr_pool_t *pool, const char *confFile) { char line[MAX_LINE]; FILE *file = fopen(confFile, "r"); stat_rec_t *rec = NULL; stat_rec_t *prev = NULL; stat_rec_t *next = NULL; if(file == NULL) { qerror("could not open file for writing '%s': ", confFile, strerror(errno)); exit(1); } while(!...
false
false
false
false
false
0
Reset() { // call parent's class reset BattleGround::Reset(); for (uint8 i = 0; i < BG_TEAMS_COUNT; ++i) { m_TeamScores[i] = 0; m_lastTick[i] = 0; m_honorScoreTicks[i] = 0; m_ReputationScoreTics[i] = 0; } m_IsInformedNearVictory = false; bool isBGWeekend = B...
false
false
false
false
false
0
host_int_get_host_chnl_num(struct host_if_drv *hif_drv, u8 *pu8ChNo) { s32 result = 0; struct host_if_msg msg; if (!hif_drv) { PRINT_ER("driver is null\n"); return -EFAULT; } memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_GET_CHNL; msg.drv = hif_drv; result = wilc_mq_send(&hif_msg_q, ...
false
false
false
false
false
0
alc_fixup_no_shutup(struct hda_codec *codec, const struct hda_fixup *fix, int action) { if (action == HDA_FIXUP_ACT_PROBE) { struct alc_spec *spec = codec->spec; spec->shutup = alc_no_shutup; } }
false
false
false
false
false
0
ujfs_device_is_valid(FILE *device_handle, struct stat *st) { struct stat stat_data; int rc = 0; if (device_handle != NULL) { rc = fstat(fileno(device_handle), &stat_data); if (rc) return -1; st = &stat_data; } else if (st == NULL) { return -1; } /* Do we have a block special device or regular file? ...
false
false
false
false
false
0
_icon_color_set_cb(void *data) { #define INC_COLOR(C, NC) \ do { \ if (abs(i->C - NC) < COLOR_STEP) \ i->C = NC; \ else \ i->C += ((i->C < NC) ? COLOR_STEP : (-COLOR_STEP)); \ } while (0) int n; icon_properties *icons = data; icon_properties *i; for (n = 0; n < N_GEST...
false
false
false
false
false
0
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__DropBox_NotifySelect__00000000(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * control, struct __ecereNameSpace__ecere__com__Instance * row, unsigned int mods) { struct __ecereNameSpace__ecere__gui__controls__D...
false
false
false
false
false
0
Build() { vtkIdType i, j; vtkIdType numCellsInStencil; vtkIdList *cellIds, *ptIds, *stencilIds; vtkPolyData* pdata = vtkPolyData::SafeDownCast(this->DataSet); if (pdata==NULL) { vtkErrorMacro(<< "Input data NULL or not poly data"); } vtkIdType pointId = this->DataSetPointId; this->NPoints =...
false
false
false
false
false
0
make_zoom_window (GucharmapChartable *chartable) { GucharmapChartablePrivate *priv = chartable->priv; GtkWidget *widget = GTK_WIDGET (chartable); GtkWidget *image; /* if there is already a zoom window, do nothing */ if (priv->zoom_window || !priv->zoom_mode_enabled) return; priv->zoom_window = gtk_win...
false
false
false
false
false
0
chi_square_constants (double n, double p, double *c1, double *c2, const char *prompt) { double delta_c1, delta_c2; static double last_n, last_p, last_c1, last_c2; double a11, a12, a21, a22, b1, b2; double det; static const double eps = 1e-10; if (n <= 0 || p <= 0 || p >= 1) { fprintf (stderr, ...
false
false
false
false
false
0
tp3780I_DisableDSP(THINKPAD_BD_DATA * pBDData) { int retval = 0; DSP_3780I_CONFIG_SETTINGS *pSettings = &pBDData->rDspSettings; PRINTK_2(TRACE_TP3780I, "tp3780i::tp3780I_DisableDSP entry pBDData %p\n", pBDData); if (pBDData->bDSPEnabled) { dsp3780I_DisableDSP(&pBDData->rDspSettings); if (pSettings->bInterrupt...
false
false
false
false
false
0