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
processChatmessageFurtherAfterSecurityChecks(std::string& msg, uint32 lang) { if (lang != LANG_ADDON) { // strip invisible characters for non-addon messages if (sWorld.getConfig(CONFIG_BOOL_CHAT_FAKE_MESSAGE_PREVENTING)) stripLineInvisibleChars(msg); if (sWorld.getConfig(CON...
false
false
false
false
false
0
maybe_assemble_visibility (tree decl) { enum symbol_visibility vis = DECL_VISIBILITY (decl); if (vis != VISIBILITY_DEFAULT) (* targetm.asm_out.visibility) (decl, vis); }
false
false
false
false
false
0
gee_hazard_pointer_set_release_policy (GeeHazardPointerReleasePolicy policy) { gboolean result = FALSE; gint old_policy = 0; gint _tmp0_ = 0; gint _tmp1_ = 0; gint _tmp2_ = 0; GeeHazardPointerReleasePolicy _tmp3_ = 0; gboolean _tmp4_ = FALSE; _tmp0_ = g_atomic_int_get ((volatile gint *) (&gee_hazard_pointer_rel...
false
false
false
false
false
0
khyp_form_pullback(x,xform,yform,wrap) REAL *x; /* original coordinates */ REAL *xform; /* result pullback */ REAL *yform; /* original form input */ WRAPTYPE wrap; /* encoded symmetry group element */ { int i,j; REAL trans[PDIM][PDIM]; REAL jac[PDIM][PDIM]; /* Jacobian matrix */ REAL y[PDIM]; REAL w...
false
false
false
false
true
1
stopPeriodicUpdate() { if(!ourPeriodicUpdateThread) return; ourPeriodicUpdateThread->stopRunning(); delete ourPeriodicUpdateThread; ourPeriodicUpdateThread = 0; }
false
false
false
false
false
0
p_gid_grant_privilege(obj, id) VALUE obj, id; { return rb_setegid_core(NUM2INT(id)); }
false
false
false
false
false
0
test_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { int i; FL_OBJECT *ob; GEOM *p; int resizeable; if ( cur_form == NULL ) return; fl_deactivate_form(fd_control->control); thetestform = cur_form; /* During test, accumulation error might result....
false
false
false
false
false
0
convertToInteger(APSInt &result, roundingMode rounding_mode, bool *isExact) const { unsigned bitWidth = result.getBitWidth(); SmallVector<uint64_t, 4> parts(result.getNumWords()); opStatus status = convertToInteger( parts.data(), bitWidth, result.isSigned(), rounding_mode, isExact); ...
false
false
false
false
false
0
str2time_t (const char *str, time_t *t) { const char *p; struct tm tm, tm2; memset (&tm, 0, sizeof (tm)); memset (&tm2, 0, sizeof (tm2)); while(isspace((unsigned char)*str)) str++; if (str[0] == '+') { str++; *t = parse_time(str, "month"); if (*t < 0) return -1; *t += time(NULL); r...
false
false
false
false
false
0
parse_rgb_value (float *color, CRTerm const **iter) { if (iter && *iter && (*iter)->type == TERM_NUMBER) { switch ((*iter)->content.num->type) { case NUM_GENERIC: *color = CLAMP ((*iter)->content.num->val, 0., 255.) / 255.; *iter = (*iter)->next; return true; case NUM_PERCENTAGE: *co...
false
false
false
false
false
0
hscx_bctrl(struct mISDNchannel *ch, u32 cmd, void *arg) { struct bchannel *bch = container_of(ch, struct bchannel, ch); struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); int ret = -EINVAL; u_long flags; pr_debug("%s: %s cmd:%x %p\n", hx->ip->name, __func__, cmd, arg); switch (cmd) { case CLOSE_CHANNE...
false
false
false
false
false
0
event_sexp_change_soundtrack(char *name) { Assert(name); int i, new_soundtrack = -1; for (i = 0; i < Num_soundtracks; i++) { if ( !stricmp(name, Soundtracks[i].name) ) { new_soundtrack = i; } } // if we are already on this soundtrack then bail if (new_soundtrack == Current_soundtrack_num) { return; }...
false
false
false
false
false
0
typcd_bits(typcd, typ) int typcd; struct type *typ; { int frst_bit; int last_bit; int i; if (typcd == TypEmpty) return; /* Do nothing. */ if (typcd == TypAny) { /* * Set bits corresponding to first-class types. */ #ifdef OptimizeType /* * allocate a full bit ...
false
false
false
false
false
0
archive_read_open_fd(struct archive *a, int fd, size_t block_size) { struct stat st; struct read_fd_data *mine; void *b; archive_clear_error(a); if (fstat(fd, &st) != 0) { archive_set_error(a, errno, "Can't stat fd %d", fd); return (ARCHIVE_FATAL); } mine = (struct read_fd_data *)calloc(1, sizeof(*mine)); ...
false
false
false
false
false
0
AllowAsSource (gcp::Bond *bond) { std::set <gcu::Object *>::iterator i; gcu::Object* obj = bond->GetFirstLink (i); while (obj && obj->GetType () != gcp::MechanismArrowType) obj = bond->GetNextLink (i); if (obj) { if (m_Full) return false; // for homolytic cleavage, the bond must be the source for both arro...
false
false
false
false
false
0
number_sqrt (Number* self) { Number* result = NULL; gboolean _tmp0_ = FALSE; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = number_is_zero (self); if (_tmp0_) { Number* _tmp1_ = NULL; _tmp1_ = _number_ref0 (self); result = _tmp1_; return result; } else { Number* t = NULL; Number* _tmp2_ = NULL; ...
false
false
false
false
false
0
uprv_swapArray16(const UDataSwapper *ds, const void *inData, int32_t length, void *outData, UErrorCode *pErrorCode) { const uint16_t *p; uint16_t *q; int32_t count; uint16_t x; if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) { return 0; } if(ds==NULL...
false
false
false
false
false
0
getCommandString() const { ASCString c; c.format("changediplomaticstate ( %d %d %d %d )", fromPlayer, towardsPlayer, queued, (int)newState ); return c; }
false
false
false
false
false
0
hash_iterator_next (struct hash_iterator *hi) { struct hash_element *ret = NULL; if (hi->elem) { ret = hi->elem; hash_iterator_advance (hi); } else { while (++hi->bucket_index < hi->bucket_index_end) { struct hash_bucket *b; hash_iterator_unlock (hi); b = &hi->hash->buckets...
false
false
false
false
false
0
tas5086_set_deemph(struct snd_soc_codec *codec) { struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); int i, val = 0; if (priv->deemph) { for (i = 0; i < ARRAY_SIZE(tas5086_deemph); i++) { if (tas5086_deemph[i] == priv->rate) { val = i; break; } } } return regmap_update_bits(priv->...
false
false
false
false
false
0
ath10k_dbg_sta_write_delba(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { struct ieee80211_sta *sta = file->private_data; struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv; struct ath10k *ar = arsta->arvif->ar; u32 tid, initiator, reason; int ret; char buf[...
true
true
false
false
false
1
parse_units(char *s) { int x; if (match(s, "miles", 2)) x = SQ_MILES; else if (match(s, "meters", 2)) x = SQ_METERS; else if (match(s, "kilometers", 1)) x = SQ_KILOMETERS; else if (match(s, "acres", 1)) x = ACRES; else if (match(s, "hectares", 1)) x = HECTARES; else if (match(s, "cell_...
false
false
false
false
false
0
diff_context_init( diff_context *ctxt, git_diff_list *diff, git_repository *repo, const git_diff_options *opts, git_diff_file_cb file_cb, git_diff_hunk_cb hunk_cb, git_diff_data_cb data_cb, void *payload) { memset(ctxt, 0, sizeof(diff_context)); if (!repo && diff) repo = diff->repo; if (!opts && diff) ...
false
false
false
false
false
0
mpi_sche_write_send_data_transfer_function_for_nt_elem(fsbe_context *cx, Module_table *module, List *nt_elem_list) { int i; Nt_elem *nt_elem; for( i = 0; i < list_length(nt_elem_list); i++){ nt_elem = (Nt_elem *)list_nth_data(nt_elem_list, i); fsbe_printf(cx, "static void\n"); fsbe_printf(cx, "send_dat...
false
false
false
false
false
0
machine_type_mismatch(char *file, char *e_machine, char *alt, ulong query) { if (machine_type(e_machine) || machine_type(alt)) return FALSE; if (query == KDUMP_LOCAL) /* already printed by NETDUMP_LOCAL */ return TRUE; error(WARNING, "machine type mismatch:\n"); fprintf(fp, " crash utility: %s\n", M...
false
false
false
false
false
0
isContentEditable() const { if (document()->part() && document()->part()->isEditable()) return true; // document()->updateRendering(); if (!renderer()) { if (parentNode()) return parentNode()->isContentEditable(); else return false; } return rendere...
false
false
false
false
false
0
read_creator_block( unsigned char **ptr, unsigned char *end ) { size_t length; if( end - *ptr < 28 ) { fprintf( stderr, "%s: Not enough bytes for creator block\n", progname ); return 1; } printf( "Found a creator block\n" ); length = read_dword( ptr ); printf( " Length: %ld bytes\n", (unsi...
false
false
false
false
false
0
monthName(const QDate &date, MonthNameFormat format) const { if (isValid(date)) { int year, month; getDate(date, &year, &month, 0); return monthName(month, year, format); } return QString(); }
false
false
false
false
false
0
change_sex_callback(struct widget *pSex) { if (Main.event.button.button == SDL_BUTTON_LEFT) { struct NAT *pSetup = (struct NAT *)(pNationDlg->pEndWidgetList->data.ptr); if (pSetup->leader_sex) { copy_chars_to_string16(pSetup->pChange_Sex->string16, _("Female")); } else { copy_chars_to_s...
false
false
false
false
false
0
jbd2_journal_grab_journal_head(struct buffer_head *bh) { struct journal_head *jh = NULL; jbd_lock_bh_journal_head(bh); if (buffer_jbd(bh)) { jh = bh2jh(bh); jh->b_jcount++; } jbd_unlock_bh_journal_head(bh); return jh; }
false
false
false
false
false
0
getXMLElement (xmlNodePtr node, const char *tagName) { if (xmlStrcmp (node->name, BAD_CAST (tagName)) == 0) return (node); node = XML_CHILDREN (node); while (node) { if (xmlStrcmp (node->name, BAD_CAST (tagName)) == 0) { return (node); } node = node->next; } return (node); }
false
false
false
false
false
0
set_up_temp_contact (TempContactData *data, gconstpointer service) { GDataContactsContact *contact; gdata_test_mock_server_start_trace (mock_server, "setup-temp-contact"); /* Create a new temporary contact to use for a single test */ contact = gdata_contacts_contact_new (NULL); gdata_contacts_contact_set_nicknam...
false
false
false
false
false
0
hma_state3( int sc_num, pid_t pid, pid_state *state ) { // The "open" syscall returned // Whether it failed or succeeded, we no longer need the file unlink( state->mem->get_loc_c() ); if( ptlib_success( pid, sc_num ) ) { // Store the fd for our own future use state->context_state[1]=pt...
false
false
false
false
false
0
_gnutls_fbase64_decode (const char *header, const opaque * data, size_t data_size, uint8_t ** result) { int ret; static const char top[] = "-----BEGIN "; static const char bottom[] = "-----END "; uint8_t *rdata; int rdata_size; uint8_t *kdata; int kdata_size; char pem_header[128]...
false
false
false
false
false
0
Save() { if (m_Filename.IsEmpty()) return SaveAs(); ProjectLoader loader(this); if (loader.Save(m_Filename, m_pExtensionsElement)) { wxFileName fname(m_Filename); m_LastModified = fname.GetModificationTime(); NotifyPlugins(cbEVT_PROJECT_SAVE); return true; } ...
false
false
false
false
false
0
accept (ACE_SOCK_Stream &new_stream, ACE_Accept_QoS_Params qos_params, ACE_Addr *remote_addr, ACE_Time_Value *timeout, bool restart, bool reset_new_handle) const { ACE_TRACE ("ACE_SOC...
false
false
false
false
false
0
get_parameter(int param) const { switch(param) { case 1: return static_cast<parameter_t>(pos_rep.size()); break; default: int pointnum = param/2 - 1; if (pointnum >= static_cast<int>(pos_rep.size())) { return 0.0f; } if (param % 2 == 0) return pos_rep[pointnum]; else ...
false
false
false
false
false
0
AddInChIChar( INCHI_IOSTREAM *pInp, SEGM_LINE *Line, const char *pszToken ) { int c = getInChIChar( pInp ); /* while ( c == '\r' ) { c = getInChIChar( pInp ); } */ INCHI_HEAPCHK if ( Line->len + 2 >= Line->len_alloc ) { char *str = (char *) inchi_calloc( Line->len_alloc + SEG...
false
false
false
false
false
0
gst_buffer_list_iterator_add_group (GstBufferListIterator * it) { g_return_if_fail (it != NULL); /* advance iterator to next group start */ while (it->next != NULL && it->next->data != GROUP_START) { it->next = g_list_next (it->next); } /* cheap insert of a group start into the GQueue */ if (it->next ...
false
false
false
false
false
0
igb_get_hw_semaphore_i210(struct e1000_hw *hw) { u32 swsm; s32 timeout = hw->nvm.word_size + 1; s32 i = 0; /* Get the SW semaphore */ while (i < timeout) { swsm = rd32(E1000_SWSM); if (!(swsm & E1000_SWSM_SMBI)) break; udelay(50); i++; } if (i == timeout) { /* In rare circumstances, the SW semaph...
false
false
false
false
false
0
_find_HashNode(HashTable *hash, HashBucket *bucket, const char *name, HashNode **prev) { HashNode *last; /* The previously searched node */ HashNode *node; /* The node that is being searched */ /* * Search the list for a node containing the specified name. */ for(last=NULL, node=bucket->head; ...
false
false
false
false
false
0
evt_baf_rescan_clicked(GtkWidget *wid, gpointer user) { P_CmdSeq *page = user; CmdRow *row; guint32 mask = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(wid), "user")); if(!get_selections(page, NULL, &row)) return; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid))) row->extra.external.baflags[1] |= mask...
false
false
false
false
false
0
pixVShearCenter(PIX *pixd, PIX *pixs, l_float32 radang, l_int32 incolor) { PROCNAME("pixVShearCenter"); if (!pixs) return (PIX *)ERROR_PTR("pixs not defined", procName, pixd); return pixVShear(pixd, pixs, pixGetWidth(pixs) / 2, radang...
false
false
false
false
false
0
menu_findnext_activate_cb(GtkWidget *widget, gpointer data) { if (!currentWorld || !currentWorld->gui || !currentWorld->gui->search_box) { return; } if (!currentWorld->gui->txtmark_search_start) { /* No search started yet. */ menu_find_activate_cb(NULL, NULL); } else { find_next_cb(NULL, curren...
false
false
false
false
false
0
PrintSlotNameReference( void *theEnv, FILE *fp, SLOT_NAME *snp, int imageID, int maxIndices) { if (snp == NULL) fprintf(fp,"NULL"); else fprintf(fp,"&%s%d_%d[%d]", SlotNamePrefix(), imageID, (int) ((snp->bsaveIndex / maxIndices) + 1), ...
false
false
false
false
false
0
generate_flag_file(const char *filename) { int fd; if (g_file_test(ALLOWED_FLAG_FILE, G_FILE_TEST_EXISTS) || g_file_test(RESTRICTED_FLAG_FILE, G_FILE_TEST_EXISTS) || g_file_test(NONE_FLAG_FILE, G_FILE_TEST_EXISTS)) return; fd = open(filename, O_WRONLY | O_CREAT, 0); if (fd >= 0) close(fd); }
false
false
false
false
true
1
DGNUpdateElemCoreExtended( DGNHandle hDGN, DGNElemCore *psElement ) { GByte *rd = psElement->raw_data; int nWords = (psElement->raw_bytes / 2) - 2; if( psElement->raw_data == NULL || psElement->raw_bytes < 36 ) { CPLAssert( FALSE ); return FALSE; } /* ------------------...
false
false
false
false
false
0
hexadecimal_to_ascii(char * wwn, char *wwnstr) { int i,j, nbl; for (i=0,j=0;i<16;i++) { wwnstr[j++] = ((nbl = ((wwn[i]&0xf0) >> 4)) <= 9) ? '0' + nbl : 'a' + (nbl - 10); wwnstr[j++] = ((nbl = (wwn[i]&0x0f)) <= 9) ? '0' + nbl : 'a' + (nbl - 10); } wwnstr[32]=0; }
false
false
false
false
false
0
set_int(longlong i, uint32 max_length_arg) { DBUG_ENTER("Item_param::set_int"); value.integer= (longlong) i; state= INT_VALUE; max_length= max_length_arg; decimals= 0; maybe_null= 0; DBUG_VOID_RETURN; }
false
false
false
false
false
0
read_handler(void *this_ptr, Bit32u address, unsigned io_len) { #if !BX_USE_PIT_SMF bx_pit_c *class_ptr = (bx_pit_c *) this_ptr; return class_ptr->read(address, io_len); } Bit32u bx_pit_c::read(Bit32u address, unsigned io_len) { #else UNUSED(this_ptr); #endif // !BX_USE_PIT_SMF Bit8u value = 0; handle_tim...
false
false
false
false
false
0
RandomSeq(long length, long I, double *freq, a_type A) /* return a randomly generated new sequence of length with residue frequency " freq" */ { long i,c; double r; e_type E; E = EmptySeq(I, length); for(i=1;i<=(long)E->n; i++) { r = (double) Random()/(double) LONG_MAX; /* 0 <= r <= 1 */ for(E->S[i]=0,c=...
false
false
false
false
false
0
get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) { char cpuname[32]; char line[1024]; FILE *f; if (cpu_index == ALL_CPUS) strcpy(cpuname, "cpu"); else sprintf(cpuname, "cpu%u", cpu_index); f = fopen("/proc/stat", "r"); if (!f) return FALSE; while ...
true
true
false
false
true
1
bnx2fc_link_ok(struct fc_lport *lport) { struct fcoe_port *port = lport_priv(lport); struct bnx2fc_interface *interface = port->priv; struct bnx2fc_hba *hba = interface->hba; struct net_device *dev = hba->phys_dev; int rc = 0; if ((dev->flags & IFF_UP) && netif_carrier_ok(dev)) clear_bit(ADAPTER_STATE_LINK_DOW...
false
false
false
false
false
0
set_finput_value( FL_OBJECT * ob, double f, int prec) { char buf[ 64 ]; if ( prec >= 0 ) { if ( fabs( f ) < 1.0e38 && fabs( f ) > 1.0e-38 ) sprintf( buf, "%.*f", prec, f ); else sprintf( buf, "%.*g", prec, f ); } ...
false
false
false
false
false
0
us_rawnet_recv( us_rawnet_context_t *self, uint8_t src_mac[6], uint8_t dest_mac[6], void *payload_buf, ssize_t payload_buf_max_size ) { ssize_t r = -1; ssize_t buf_len; uint8_t buf[2048]; do { buf_len = recv( self->m_fd, buf, sizeof( buf ), 0 ); } while ( buf_len < 0 && ( errno == E...
false
false
false
false
false
0
previewer_show_file_ready_cb (GObject *source, GAsyncResult *res, gpointer user_data) { NautilusPreviewer *self = user_data; GError *error = NULL; g_dbus_connection_call_finish (self->priv->connection, res, &error); i...
false
false
false
false
false
0
X86SelectStore(const Instruction *I) { EVT VT; if (!isTypeLegal(I->getOperand(0)->getType(), VT, /*AllowI1=*/true)) return false; X86AddressMode AM; if (!X86SelectAddress(I->getOperand(1), AM)) return false; return X86FastEmitStore(VT, I->getOperand(0), AM); }
false
false
false
false
false
0
tlist_print(struct tlist *tl) { struct template *q; unsigned int i = 1; FILE *f = get_code_file(); fprintf(f, "const struct asn1_template asn1_%s[] = {\n", tl->name); fprintf(f, "/* 0 */ %s,\n", tl->header); ASN1_TAILQ_FOREACH(q, &tl->template, members) { int last = (ASN1_TAILQ_LAST(&tl->templ...
false
false
false
false
false
0
getPickedPoint(void) { SoRayPickAction * ra = PRIVATE(this)->getPickAction(); if (!PRIVATE(this)->pickvalid || PRIVATE(this)->didpickall) { ra->setPickAll(FALSE); PRIVATE(this)->doPick(ra); } return ra->getPickedPoint(); }
false
false
false
false
false
0
procvraw(des,lf,v) design *des; lfit *lf; INT v; { INT lf_status; int i; double h, coef[1+MXDIM]; des->xev = evpt(lf,v); lf_status = ainitband(des,lf); if (!lf_error) switch(lf->mi[MACRI]) { case AKAT: case ACP: case AMDI: h = aband2(des,lf,des->h); ...
false
false
false
false
false
0
calculateCornerPoint(MapField* a, MapField* b, MapField* diamondPoint) { int x = 0; int y = 0; if((a->getx() == b->getx())) { x = a->getx(); } else { x = diamondPoint->getx(); } if(a->gety() == b->gety()){ y = a->gety(); }else{ y = diamondPoint->gety(); } MapField* c...
false
false
false
false
false
0
resizeXFunc(int id, double dx, double x) { switch(id) { // 1 := fixed, 0 := spring case 0: return x + (dx/2); case 1: return x - dx; case 10: return x + (dx/2); case 11: return x + dx; // 110, 111 nop } return x; }
false
false
false
false
false
0
seek (long offset, int whence, bool nothrow) { int retval=bs->seek(offset,whence,nothrow); bufferpos=0; buffer=GUTF8String::create(0,0,buffer.get_remainder()); return retval; }
false
false
false
false
false
0
set_chainsetup_filename(const string& name) { // -------- DBC_REQUIRE(is_selected() == true); DBC_REQUIRE(name.empty() != true); // -------- selected_chainsetup_repp->set_filename(name); }
false
false
false
false
false
0
ath5k_setup_pcdac_table(struct ath5k_hw *ah) { u8 *pcdac_out = ah->ah_txpower.txp_pd_table; int i; /* * Write TX power values */ for (i = 0; i < (AR5K_EEPROM_POWER_TABLE_SIZE / 2); i++) { ath5k_hw_reg_write(ah, (((pcdac_out[2*i + 0] << 8 | 0xff) & 0xffff) << 0) | (((pcdac_out[2*i + 1] << 8 | 0xff) & 0...
false
false
false
false
false
0
_parse_clipinfo(BITSTREAM *bits, CLPI_CL *cl) { int len, pos; int ii; bs_seek_byte(bits, 40); // ClipInfo len bs_skip(bits, 32); // reserved bs_skip(bits, 16); cl->clip.clip_stream_type = bs_read(bits, 8); cl->clip.application_type = bs_read(bits, 8); // skip reserved 31 bits ...
false
false
false
false
false
0
listscripts(const char **restrict script, const char mode, const ushort lvl) { static list_t * tmp; service_t * serv; ushort level; dir_t * dir; if (!*script) tmp = d_start->next; do { serv = (service_t*)0; if (tmp == d_start) break; prefetch(tmp->next); dir = getdir(tmp); ...
false
false
false
true
false
1
vidioc_enum_fmt_vid_cap(struct file *file, void *priv, struct v4l2_fmtdesc *f) { if (unlikely(f->index >= ARRAY_SIZE(format))) return -EINVAL; strlcpy(f->description, format[f->index].name, sizeof(f->description)); f->pixelformat = format[f->index].fourcc; return 0; }
false
false
false
false
false
0
nm_system_add_vlan_iface (NMConnection *connection, const char *iface, int parent_ifindex) { NMSettingVlan *s_vlan; int ret = -1; struct rtnl_link *new_link = NULL; struct nl_sock *nlh = NULL; guint32 vlan_id = 0; guint32 vlan_flags = 0; guint32 num, i, from, t...
false
false
false
false
false
0
get_sdp_hdr_field(char* buf, char* end, struct hdr_field* hdr) { char* tmp; char *match; if ((*buf)=='\n' || (*buf)=='\r'){ /* double crlf or lflf or crcr */ hdr->type=HDR_EOH_T; return buf; } tmp=parse_hname2(buf, end, hdr); if (hdr->type==HDR_ERROR_T){ LM_ERR("bad header\n"); goto error; } /* el...
true
true
false
false
false
1
GQdestroywidget (Gwidget_t *widget) { switch (WQU->mode) { case G_QWSTRING: XtDestroyWidget (widget->w); break; case G_QWFILE: break; case G_QWCHOICE: XtDestroyWidget (widget->w); break; } return 0; }
false
false
false
false
false
0
q_facet_tension_q(f_info) struct qinfo *f_info; { REAL value = 0.0; int m; REAL det; REAL st,ss,tt; REAL **tang; for ( m = 0 ; m < gauss2D_num ; m++ ) /* integration point number */ { tang = f_info->sides[m]; ss = SDIM_dot(tang[0],tang[0]); st = SDIM_dot(tang[0],tang[1]); tt = SDIM_dot...
false
false
false
false
false
0
__Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gui__dialogs__FileDialog_GetNamesFromRow(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * row, char ** selectedFileName) { struct __ecereNameSpace__ecere__gui__dialogs__FileDialog * __ecerePointer___ecereNameSpace__ecere__gui__d...
false
true
false
true
false
1
mxr_enum_dv_timings(struct file *file, void *fh, struct v4l2_enum_dv_timings *timings) { struct mxr_layer *layer = video_drvdata(file); struct mxr_device *mdev = layer->mdev; int ret; timings->pad = 0; /* lock protects from changing sd_out */ mutex_lock(&mdev->mutex); ret = v4l2_subdev_call(to_outsd(mdev), pa...
false
false
false
false
false
0
check_and_get_const_op(const Operand* op, int* val) { Boolean cnst = FALSE; *val = 0; switch (op->kind) { case KIND_CONST : cnst = TRUE; *val = const_table_int_value(op->tbl.c); break; case KIND_TEMP: case KIND_VAR: case KIND_ARRAY: break; /* Nothing to do. */ ...
false
false
false
false
false
0
brcmf_fws_deq(struct brcmf_fws_info *fws, int fifo) { struct brcmf_fws_mac_descriptor *table; struct brcmf_fws_mac_descriptor *entry; struct sk_buff *p; int num_nodes; int node_pos; int prec_out; int pmsk; int i; table = (struct brcmf_fws_mac_descriptor *)&fws->desc; num_nodes = sizeof(fws->desc) / sizeof(st...
false
false
false
false
false
0
readahead_get_line_skip(PyFileObject *f, int skip, int bufsize) { PyStringObject* s; char *bufptr; char *buf; Py_ssize_t len; if (f->f_buf == NULL) if (readahead(f, bufsize) < 0) return NULL; len = f->f_bufend - f->f_bufptr; if (len == 0) return (PyStringObject ...
false
false
false
false
true
1
EnvCreateMultifield( void *theEnv, unsigned long size) { struct multifield *theSegment; unsigned long newSize; if (size <= 0) newSize = 1; else newSize = size; theSegment = get_var_struct2(theEnv,multifield,(long) sizeof(struct field) * (newSize - 1L)); theSegment->multifieldLength = size; ...
false
false
false
false
false
0
pp_add_iterator(song_iterator_t *it, GTimeVal start_time) { song_iterator_t *old = play_it; SIMSG_SEND(it, SIMSG_SET_PLAYMASK(seq->playmask)); SIMSG_SEND(it, SIMSG_SET_RHYTHM(seq->play_rhythm)); if (play_it == NULL) seq->allstop(seq); play_it = sfx_iterator_combine(play_it, it); seq->set_volume(seq, volume)...
false
false
false
false
false
0
scrollback_goto_line(int linenum) { TEXT_BUFFER_VIEW_REC *view; view = WINDOW_GUI(active_win)->view; if (view->buffer->lines_count == 0) return; textbuffer_view_scroll_line(view, view->buffer->first_line); gui_window_scroll(active_win, linenum); }
false
false
false
false
false
0
BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path) { vtkProp3D *prop3D; vtkCollectionSimpleIterator pit; for ( this->Parts->InitTraversal(pit); (prop3D = this->Parts->GetNextProp3D(pit)); ) { path->AddNode(prop3D,prop3D->GetMatrix()); // dive into the hierarchy prop3D->BuildPath...
false
false
false
false
false
0
setError(unsigned code, const char *format, ...) { // only the first error is being returned if (_error_message == "") { char buffer[8192]; va_list ap; va_start(ap, format); vsnprintf(buffer, sizeof(buffer) - 1, format, ap); logger(LG_INFO, "error: %s", buffer); ...
false
false
false
false
false
0
debug_get_field_bitsize (void *handle ATTRIBUTE_UNUSED, debug_field field) { if (field == NULL || field->static_member) return (bfd_vma) -1; return field->u.f.bitsize; }
false
false
false
false
false
0
load_discount_type_cells (GncEntryLedger *ledger) { RecnCell *cell; if (!ledger) return; cell = (RecnCell *) gnc_table_layout_get_cell (ledger->table->layout, ENTRY_DISTYPE_CELL); if (!cell) return; gnc_recn_cell_set_valid_flags (cell, "12", '2'); gnc_recn_cell_set_flag_order (cel...
false
false
false
false
false
0
newValueField() { Uint8 *value = NULL; Uint32 lengthField = getLengthField(); /* check for odd length (in case of a protocol error) */ if (lengthField & 1) { if (lengthField == DCM_UndefinedLength) { /* Print an error message when private attribute states to have an odd l...
false
false
false
false
false
0
GetFieldHandles() { static FieldHandle<ContentStore>::ListT fhv; if( fhv.size() ) return fhv; #undef CONTAINER_OBJECT_NAME #define CONTAINER_OBJECT_NAME fhv #undef RECORD_CLASS_NAME #define RECORD_CLASS_NAME ContentStore FHP(RecType, _("Record Type Code")); FHP(RecordId, _("Unique Record ID")); FHD(Filename...
false
false
false
false
false
0
may_open(struct path *path, int acc_mode, int flag) { struct dentry *dentry = path->dentry; struct inode *inode = dentry->d_inode; int error; /* O_PATH? */ if (!acc_mode) return 0; if (!inode) return -ENOENT; switch (inode->i_mode & S_IFMT) { case S_IFLNK: return -ELOOP; case S_IFDIR: if (acc_mode &...
false
false
false
false
false
0
fs_metadata_get_bool(fs_metadata *m, const char *prop, int def) { for (int e=0; e < m->length; e++) { if (!strcmp(m->entries[e].key, prop)) { return !strcmp(m->entries[e].val, "true"); } } return def; }
false
false
false
false
false
0
process_data(struct ieee80211_frame *wh, int len) { unsigned char *p = (unsigned char*) (wh + 1); struct llc* llc; int wep = wh->i_fc[1] & IEEE80211_FC1_WEP; int eapol = 0; struct client *c; int stype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; int orig = len; un...
false
false
false
false
false
0
expand_args_extended( char *input, char *argument_string, char *output) { int rc; int lower; int upper; int i; size_t len; rc = __eae_parse_range(input, &lower, &upper); if (rc == -1) { return -1; } /* Skip to the start of the requested argument range */ if (lower > 0) { argument_string = SkipNTokens(...
false
false
false
false
false
0
init_paths() { FILE * fp; char * p; int len; /* determine the CVSROOT. precedence: * 1) command line * 2) working directory (if present) * 3) environment variable CVSROOT */ if (!root_path[0]) { if (!(fp = fopen("CVS/Root", "r"))) { const char * e; debug(DEBUG_S...
false
false
false
false
false
0
multiplexer_onReadFromTransport (Multiplexer* self, FsoFrameworkTransport* transport) { struct gsm0710_context* _tmp0_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (transport != NULL); _tmp0_ = self->priv->ctx; gsm0710_ready_read (_tmp0_); }
false
false
false
false
false
0
containsSafePHI(BasicBlock *Block, bool isOuterLoopExitBlock) { for (auto I = Block->begin(); isa<PHINode>(I); ++I) { PHINode *PHI = cast<PHINode>(I); // Reduction lcssa phi will have only 1 incoming block that from loop latch. if (PHI->getNumIncomingValues() > 1) return false; Instruction *Ins ...
false
false
false
false
false
0
lam_tr_wrapstart(int func) { if (func == lam_getfunc() && ! lam_tr_incff()) { lam_tr_sub(func, MPI_Wtime(), TRDTSYSTEM); return(1); } else { return(0); } }
false
false
false
false
false
0
nfcmrvl_fw_dnld_init(struct nfcmrvl_private *priv) { char name[32]; INIT_WORK(&priv->fw_dnld.rx_work, fw_dnld_rx_work); snprintf(name, sizeof(name), "%s_nfcmrvl_fw_dnld_rx_wq", dev_name(&priv->ndev->nfc_dev->dev)); priv->fw_dnld.rx_wq = create_singlethread_workqueue(name); if (!priv->fw_dnld.rx_wq) return -E...
true
true
false
false
false
1
prep_clients_for_new_fb(void) { rfbClientIteratorPtr iter; rfbClientPtr cl; if (!use_threads || !screen) { return; } iter = rfbGetClientIterator(screen); while ((cl = rfbClientIteratorNext(iter)) != NULL) { if (!cl->newFBSizePending) { rfbLog("** set_new_fb_size_pending client: %p\n", cl); cl->newFBS...
false
false
false
false
false
0
get_cached_sdp_session(const bdaddr_t *src, const bdaddr_t *dst) { GSList *l; for (l = cached_sdp_sessions; l != NULL; l = l->next) { struct cached_sdp_session *c = l->data; sdp_session_t *session; if (bacmp(&c->src, src) || bacmp(&c->dst, dst)) continue; g_source_remove(c->timer); session = c->sessi...
false
false
false
false
false
0
fvwmlib_free_colors(Display *dpy, Pixel *pixels, int n, Bool no_limit) { int i; /* We don't ever free black - dirty hack to allow freeing colours at * all */ /* olicha: ???? */ for (i = 0; i < n; i++) { if (pixels[i] != 0) { PictureFreeColors( dpy, Pcmap, pixels + i, 1, 0, no_limit); } } return;...
false
false
false
false
false
0
unlock_mutex(db_mutex_t mtx) { int ret; BDBOP2(ResourceManager::instance()->global_unlock(mtx), ret, ResourceManager:: instance()->get_mutex_env()->mutex_free(mtx)); return 0; }
false
false
false
false
false
0