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
uwb_rc_neh_match(struct uwb_rc_neh *neh, const struct uwb_rceb *rceb) { return neh->evt_type == rceb->bEventType && neh->evt == rceb->wEvent && neh->context == rceb->bEventContext; }
false
false
false
false
false
0
Resize(const vtkIdType sz) { vtkPriorityQueue::Item *newArray; vtkIdType newSize; if (sz >= this->Size) { newSize = this->Size + sz; } else { newSize = sz; } if (newSize <= 0) { newSize = 1; } newArray = new vtkPriorityQueue::Item[newSize]; if (this->Array) { ...
false
false
false
false
false
0
ddf_GetNumberType(const char *line) { ddf_NumberType nt; if (strncmp(line, "integer", 7)==0) { nt = ddf_Integer; } else if (strncmp(line, "rational", 8)==0) { nt = ddf_Rational; } else if (strncmp(line, "real", 4)==0) { nt = ddf_Real; } else { nt=ddf_Unknown; } return nt; }
false
false
false
false
false
0
brasero_iso9660_get_susp (BraseroIsoCtx *ctx, BraseroIsoDirRec *record, guint *susp_len) { gchar *susp_block; gint start; gint len; start = sizeof (BraseroIsoDirRec) + record->id_size; /* padding byte when id_size is an even number */ if (start & 1) start ++; if (ctx->susp_skip) start += ctx->sus...
false
false
false
true
false
1
verify(chunk_t chunk) { container_t *container; pkcs7_t *pkcs7; enumerator_t *enumerator; certificate_t *cert; auth_cfg_t *auth; chunk_t data; time_t t; bool verified = FALSE; container = lib->creds->create(lib->creds, CRED_CONTAINER, CONTAINER_PKCS7, BUILD_BLOB_ASN1_DER, chunk, BUILD_END); if (!c...
false
false
false
false
false
0
load_config_from_buf(const gchar *buf, gsize size, gboolean startup) { GMarkupParseContext *context; gboolean ret = TRUE; GQParserData *parser_data; parser_data = g_new0(GQParserData, 1); parser_data->startup = startup; options_parse_func_push(parser_data, options_parse_toplevel, NULL, NULL); context = g_ma...
false
false
false
false
false
0
acot(const RCP<const Basic> &arg) { if (eq(arg, zero)) return div(pi, i2); else if (eq(arg, one)) return div(pi, mul(i2, i2)); else if (eq(arg, minus_one)) return mul(i3, div(pi, mul(i2, i2))); RCP<const Basic> index; bool b = inverse_lookup(inverse_tct, arg, outArg(index)); if (b) { if...
false
false
false
false
false
0
trim_zeros_after_decimal( char* src ) { char * end = src + strlen( src ) - 1; while( end != src ) { if( *end == '0' ) *end = 0; else if( *end == '.' ) { *end = 0; break; } else break; end--; } }
false
false
false
false
false
0
getMaxCalleeSavedReg(const std::vector<CalleeSavedInfo> &CSI, const TargetRegisterInfo &TRI) { assert(Hexagon::R1 > 0 && "Assume physical registers are encoded as positive integers"); if (CSI.empty()) return 0; unsigned Max = getMax32BitSubRegister(CSI[0].ge...
false
false
false
false
false
0
clk_mux_get_parent(struct clk_hw *hw) { struct clk_mux *mux = to_clk_mux(hw); int num_parents = clk_hw_get_num_parents(hw); u32 val; /* * FIXME need a mux-specific flag to determine if val is bitwise or numeric * e.g. sys_clkin_ck's clksel field is 3 bits wide, but ranges from 0x1 * to 0x7 (index starts at o...
false
false
false
false
false
0
videomode_from_timings(const struct display_timings *disp, struct videomode *vm, unsigned int index) { struct display_timing *dt; dt = display_timings_get(disp, index); if (!dt) return -EINVAL; videomode_from_timing(dt, vm); return 0; }
false
false
false
false
false
0
multi_join_create_game() { // maybe warn the player about possible crappy server conditions if(!multi_join_maybe_warn()){ return; } // make sure to flag ourself as being the master Net_player->flags |= (NETINFO_FLAG_AM_MASTER | NETINFO_FLAG_GAME_HOST); Net_player->state = NETPLAYER_STATE_HOST_SETUP; // if w...
false
false
false
false
false
0
getUL(DcmDataset *obj, DcmTagKey t, Uint32 *ul) { DcmElement *elem; DcmStack stack; OFCondition ec = EC_Normal; ec = obj->search(t, stack); elem = (DcmElement*)stack.top(); if (ec == EC_Normal && elem != NULL) { ec = elem->getUint32(*ul, 0); } return (ec == EC_Normal)?(EC_Norma...
false
false
false
false
false
0
is_associated_namespace (tree current, tree scope) { vec<tree, va_gc> *seen = make_tree_vector (); vec<tree, va_gc> *todo = make_tree_vector (); tree t; bool ret; while (1) { if (scope == current) { ret = true; break; } vec_safe_push (seen, scope); for (t = DECL_NAMESPACE_ASSOCI...
false
false
false
false
false
0
qlcnic_83xx_config_hw_lro(struct qlcnic_adapter *adapter, int mode) { int err; u32 temp, arg1; struct qlcnic_cmd_args cmd; int lro_bit_mask; lro_bit_mask = (mode ? (BIT_0 | BIT_1 | BIT_2 | BIT_3) : 0); if (adapter->recv_ctx->state == QLCNIC_HOST_CTX_STATE_FREED) return 0; err = qlcnic_alloc_mbx_args(&cmd, a...
false
false
false
false
false
0
OTF_File_size( OTF_File* file ) { struct stat st; if ( NULL != file->iofsl ) { return OTF_File_iofsl_size( file ); } if ( NULL != file->externalbuffer ) { OTF_Error( "ERROR in function %s, file: %s, line: %i:\n " "not yet supported in 'external buffer' mode.\n", __FUNCTION__, __FILE__, __LINE__ ); ...
false
false
false
false
false
0
dsgw_change( char *s, dsgwsubst *changes ) { auto dsgwsubst *ch; if ( changes == NULL ) return s; for ( ch = changes; ch; ch = ch->dsgwsubst_next ) { if ( strstr( s, ch->dsgwsubst_from ) ) { break; } } if ( ch != NULL ) { auto char *cs = dsgw_ch_strdup( s ); for ( ch = changes; ch; ch = ch-...
false
true
false
false
false
1
remove_field(const Glib::ustring& parent_table_name, const Glib::ustring& table_name, const Glib::ustring& field_name) { //Look at each item: LayoutGroup::type_list_items::iterator iterItem = m_list_items.begin(); while(iterItem != m_list_items.end()) { sharedptr<LayoutItem> item = *iterItem; sharedptr<...
false
false
false
false
false
0
formatNumeric( UDate date, // Time since epoch 1:30:00 would be 5400000 const DateFormat &dateFmt, // h:mm, m:ss, or h:mm:ss UDateFormatField smallestField, // seconds in 5:37:23.5 const Formattable &smallestAmount, // 23.5 for 5:37:23.5 UnicodeString &appendTo, UErrorCod...
false
false
false
false
false
0
printRequiredAttributeMessage(const DcmTagKey &key, const OFFilename &filename, const OFBool emptyMsg) { OFString str; if (!filename.isEmpty()) { str = " in file: "; str += OFSTRING_GU...
false
false
false
false
false
0
rad_continuation2vp(const RADIUS_PACKET *packet, const RADIUS_PACKET *original, const char *secret, int attribute, int length, /* CANNOT be zero */ uint8_t *data, size_t packet_length, int flag, DICT_ATTR *da) { size_t tlv_length, left; uint8_t *ptr; uint8_t *tl...
false
false
false
true
true
1
example_4() { static const char* xml = "<information>" " <attributeApproach v='2' />" " <textApproach>" " <v>2</v>" " </textApproach>" "</information>"; XMLDocument doc; doc.Parse( xml ); int v0 = 0; int v1 = 0; XMLElement* attributeApproachElement = doc.FirstChildElement()->FirstC...
false
false
false
false
false
0
vacuum_heap(VRelStats *vacrelstats, Relation onerel, VacPageList vacuum_pages) { Buffer buf; VacPage *vacpage; BlockNumber relblocks; int nblocks; int i; nblocks = vacuum_pages->num_pages; nblocks -= vacuum_pages->empty_end_pages; /* nothing to do with them */ for (i = 0, vacpage = vacuum_pages->paged...
false
false
false
false
false
0
usbdev_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) { struct usb_dev_state *ps = file->private_data; struct usb_device *dev = ps->dev; ssize_t ret = 0; unsigned len; loff_t pos; int i; pos = *ppos; usb_lock_device(dev); if (!connected(ps)) { ret = -ENODEV; goto err; } else...
false
false
false
false
false
0
sftp_recvdata(char *buf, int len) { outptr = (unsigned char *) buf; outlen = len; /* * See if the pending-input block contains some of what we * need. */ if (pendlen > 0) { unsigned pendused = pendlen; if (pendused > outlen) pendused = outlen; memcpy(outptr, pending, pendused); ...
false
true
false
false
false
1
egg_list_box_reseparate (EggListBox *list_box) { EggListBoxPrivate *priv = list_box->priv; GSequenceIter *iter; g_return_if_fail (list_box != NULL); for (iter = g_sequence_get_begin_iter (priv->children); !g_sequence_iter_is_end (iter); iter = g_sequence_iter_next (iter)) egg_list_box_update...
false
false
false
false
false
0
test_comment_query_async_progress_closure (QueryCommentsData *query_data, gconstpointer service) { GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure); gdata_test_mock_server_start_trace (mock_server, "comment-query-async-progress-closure"); data->main_loop = g_main_loop_new (NULL, TRUE); ...
false
false
false
false
false
0
RAND_write_file(const char *file) { unsigned char buf[BUFSIZE]; int i,ret=0,rand_err=0; FILE *out = NULL; int n; #ifndef OPENSSL_NO_POSIX_IO struct stat sb; i=stat(file,&sb); if (i != -1) { #if defined(S_ISBLK) && defined(S_ISCHR) if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) { /* this file is a de...
true
true
false
false
true
1
highlight_get_color(int highlight, bool is_background) { size_t idx=0; rgb_color_t result; if (highlight < 0) return rgb_color_t::normal(); if (highlight > (1<<VAR_COUNT)) return rgb_color_t::normal(); for (size_t i=0; i<VAR_COUNT; i++) { if (highlight & (1<<i)) ...
false
false
false
false
false
0
parse_cat_blob(void) { const char *p; struct object_entry *oe = oe; unsigned char sha1[20]; /* cat-blob SP <object> LF */ p = command_buf.buf + strlen("cat-blob "); if (*p == ':') { char *x; oe = find_mark(strtoumax(p + 1, &x, 10)); if (x == p + 1) die("Invalid mark: %s", command_buf.buf); if (!oe) ...
true
true
false
false
true
1
sinfo_new_fit_params( int n_params ) { FitParams ** new_params =NULL; FitParams * temp_params =NULL; float * temp_fit_mem =NULL; float * temp_derv_mem=NULL; int i ; if ( n_params <= 0 ) { sinfo_msg_error (" wrong number of lines to fit\n") ; return NULL ; } if...
false
false
false
false
false
0
ReadMeshInformation() { // Define input file stream and attach it to input file OpenFile(); // Read and analyze the first line in the file SizeValueType numberOfCellPoints = 0; this->m_NumberOfPoints = 0; this->m_NumberOfCells = 0; this->m_NumberOfPointPixels = 0; std::string line; std::string in...
false
false
false
false
false
0
upClicked() { if (fields->currentItem()) { int index = fields->invisibleRootItem()->indexOfChild(fields->currentItem()); if (index == 0) return; // its at the top already // movin on up! QWidget *button = fields->itemWidget(fields->currentItem(),2); QWidget *check = fields->...
false
false
false
false
false
0
TryReconnect() { if(!Open(m_hostname)) return false; EnableStatusInterface(m_statusinterface); ChannelFilter(m_ftachannels, m_nativelang, m_caids); SetUpdateChannels(m_updatechannels); SupportChannelScan(); m_connectionLost = false; OnReconnect(); return true; }
false
false
false
false
false
0
mainwindow_progressindicator_hook(gpointer source, gpointer userdata) { ProgressData *data = (ProgressData *) source; MainWindow *mainwin = (MainWindow *) userdata; switch (data->cmd) { case PROGRESS_COMMAND_START: case PROGRESS_COMMAND_STOP: gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(mainwin->progressb...
false
false
false
false
false
0
do_cmd_walk_test(int y, int x) { /* Allow attack on visible monsters if unafraid */ if ((cave_m_idx[y][x] > 0) && (mon_list[cave_m_idx[y][x]].ml)) { /* Handle player fear */ if(p_ptr->state.afraid) { /* Extract monster name (or "it") */ char m_name[80]; monster_type *m_ptr; m_ptr = &mon_list[cave_...
false
false
false
false
false
0
append(const NvjLogSeverity& l, const std::string& message, const std::string& details) { if (file!=NULL) (*file) << message << endl; }
false
false
false
false
false
0
alloc_use (void) { struct use_optype_d *ret; if (gimple_ssa_operands (cfun)->free_uses) { ret = gimple_ssa_operands (cfun)->free_uses; gimple_ssa_operands (cfun)->free_uses = gimple_ssa_operands (cfun)->free_uses->next; } else ret = (struct use_optype_d *) ssa_operand_alloc (siz...
false
false
false
false
false
0
_nrrdDDBCN_d(double *f, const double *x, size_t len, const double *parm) { double S; double t, B, C; size_t i; S = parm[0]; B = parm[1]; C = parm[2]; for (i=0; i<len; i++) { t = x[i]; t = AIR_ABS(t)/S; f[i] = _DDBCCUBIC(t, B, C)/(S*S*S); } }
false
false
false
false
false
0
visit_enter(ir_expression *ir) { if (this->shader_stage == MESA_SHADER_FRAGMENT && ir->operation == ir_unop_dFdy) { gl_fragment_program *fprog = (gl_fragment_program *) prog; fprog->UsesDFdy = true; } return visit_continue; }
false
false
false
false
false
0
find_smc_chip_model(struct smc_chip_model *chips, int version_id) { int i; for (i = 0; chips[i].name != NULL; i++) { if (chips[i].version_id == version_id) return &chips[i]; } return NULL; }
false
false
false
false
false
0
bio_disable(bio_source_t *bio) { bio_check(bio); g_assert(bio->io_tag); g_assert(bio->io_callback); /* "passive" sources not concerned */ g_assert(0 == (bio->flags & BIO_F_PASSIVE)); inputevt_remove(&bio->io_tag); }
false
false
false
false
false
0
_equalArrayRef(ArrayRef *a, ArrayRef *b) { COMPARE_SCALAR_FIELD(refarraytype); COMPARE_SCALAR_FIELD(refelemtype); COMPARE_SCALAR_FIELD(reftypmod); COMPARE_SCALAR_FIELD(refcollid); COMPARE_NODE_FIELD(refupperindexpr); COMPARE_NODE_FIELD(reflowerindexpr); COMPARE_NODE_FIELD(refexpr); COMPARE_NODE_FIELD(refassgnex...
false
false
false
false
false
0
push_false() { if (!top) return 0; if (!top->value) top = new n(top,0,1); return !top->value; }
false
false
false
false
false
0
CloseWaveFile2() /******************/ { unsigned int pos; if((f_wave == NULL) || (f_wave == stdout)) return; fflush(f_wave); pos = ftell(f_wave); fseek(f_wave,4,SEEK_SET); Write4Bytes(f_wave,pos - 8); fseek(f_wave,40,SEEK_SET); Write4Bytes(f_wave,pos - 44); fclose(f_wave); f_wave = NUL...
false
false
false
false
false
0
parse_field_count (char const *string, size_t *val, char const *msgid) { char *suffix; uintmax_t n; switch (xstrtoumax (string, &suffix, 10, &n, "")) { case LONGINT_OK: case LONGINT_INVALID_SUFFIX_CHAR: *val = n; if (*val == n) break; /* Fall through. */ case LONGINT_OV...
false
false
false
false
false
0
core_get_turbo_pstate(void) { u64 value; int nont, ret; rdmsrl(MSR_NHM_TURBO_RATIO_LIMIT, value); nont = core_get_max_pstate(); ret = (value) & 255; if (ret <= nont) ret = nont; return ret; }
false
false
false
false
false
0
parse_skipped_msg( const string & msg, string & first_dir, string & second_dir ) { string::size_type pos = parse_skipped_msg_aux(msg, 0, first_dir); if (pos == string::npos) return; parse_skipped_msg_aux(msg, pos, second_dir); }
false
false
false
false
false
0
GetAttributeLocation(const char *attributeName) { vtkGLSLShaderProgram* glslProgram = vtkGLSLShaderProgram::SafeDownCast(this->ShaderProgram); if (glslProgram && glslProgram->GetProgram()) { GLSL_SHADER_DEVICE_ADAPTER( "GetAttributeLocation Program " << glslProgram->GetProgram()); return vtkg...
false
false
false
false
false
0
writeHeaders(void *ptr, size_t size, size_t nmemb, void *stream) { CMPIStatus *status=(CMPIStatus*)stream; char *str=ptr; char *colonidx; if (str[nmemb-1] != 0) { /* make sure the string is zero-terminated */ str = malloc(nmemb + 1); memcpy(str,ptr,nmemb); str[nmemb] = 0; } ...
false
false
false
false
false
0
GetStatusString(RESULT* result) { wxString s = wxEmptyString; wxString str = wxEmptyString; if (result == NULL) { s = m_sNotAvailableString; } else { s = result_description(result, false); } str.Printf(_("Status: %s"), s.c_str()); return str; }
false
false
false
false
false
0
zeitgeist_data_sources_registry_from_variant (GVariant* sources_variant, gboolean reset_running, GError** error) { GHashTable* result = NULL; GHashTable* registry = NULL; GHashFunc _tmp0_ = NULL; GEqualFunc _tmp1_ = NULL; GHashTable* _tmp2_ = NULL; GVariant* _tmp3_ = NULL; const gchar* _tmp4_ = NULL; GError * _...
false
false
false
false
false
0
DuplicateOrigAtom( ORIG_ATOM_DATA *new_orig_atom, ORIG_ATOM_DATA *orig_atom ) { inp_ATOM *at = NULL; AT_NUMB *nCurAtLen = NULL; AT_NUMB *nOldCompNumber = NULL; if ( new_orig_atom->at && new_orig_atom->num_inp_atoms >= orig_atom->num_inp_atoms ) { at ...
false
true
false
false
false
1
ir_doc_freq(IndexReader *ir, const char *field, const char *term) { int field_num = fis_get_field_num(ir->fis, field); if (field_num >= 0) { return ir->doc_freq(ir, field_num, term); } else { return 0; } }
false
false
false
false
false
0
SwizzleInput(MachineInstr &MI, const std::vector<std::pair<unsigned, unsigned> > &RemapChan) const { unsigned Offset; if (TII->get(MI.getOpcode()).TSFlags & R600_InstFlag::TEX_INST) Offset = 2; else Offset = 3; for (unsigned i = 0; i < 4; i++) { unsigned Swizzle = MI.getOperand(i + Offset).getIm...
false
false
false
false
false
0
mousePressEvent(QGraphicsSceneMouseEvent *event) { //close a toolbox if exists, to emulate qmenu behavior if (d->toolBox) { d->toolBox.data()->setShowing(false); } event->ignore(); if (d->appletAt(event->scenePos())) { return; //no unexpected click-throughs } if (d->wallpape...
false
false
false
false
false
0
__fc_linkup(struct fc_lport *lport) { if (!lport->link_up) { lport->link_up = 1; if (lport->state == LPORT_ST_RESET) fc_lport_enter_flogi(lport); } }
false
false
false
false
false
0
rp5c01_nvram_write(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t pos, size_t size) { struct device *dev = container_of(kobj, struct device, kobj); struct rp5c01_priv *priv = dev_get_drvdata(dev); ssize_t count; spin_lock_irq(&priv->lock); for (count = 0; c...
false
false
false
false
false
0
ipw_set_random_seed(struct ipw_priv *priv) { u32 val; if (!priv) { IPW_ERROR("Invalid args\n"); return -1; } get_random_bytes(&val, sizeof(val)); return ipw_send_cmd_pdu(priv, IPW_CMD_SEED_NUMBER, sizeof(val), &val); }
false
false
false
false
false
0
tls_process_error(void) { unsigned long err; err = ERR_get_error(); if (err != 0) { logger.msg(Arc::ERROR, "OpenSSL Error -- %s", ERR_error_string(err, NULL)); logger.msg(Arc::ERROR, "Library : %s", ERR_lib_error_string(err)); logger.msg(Arc::ERROR, "Function : %s", ERR_func_error_string(err)); l...
false
false
false
false
false
0
caml_ml_input(value vchannel, value buff, value vstart, value vlength) { CAMLparam4 (vchannel, buff, vstart, vlength); struct channel * channel = Channel(vchannel); intnat start, len; int n, avail, nread; Lock(channel); /* We cannot call caml_getblock here because buff may move...
false
false
false
false
true
1
loadFromCache(const QString& h) { // printf("Loading avatar from cache\n"); hash_ = h; setImage(QImage(QDir(AvatarFactory::getCacheDir()).filePath(h))); if (pixmap().isNull()) { qWarning("CachedAvatar::loadFromCache(): Null pixmap. Unsupported format ?"); } }
false
false
false
false
false
0
build_suggestion_menu (GeditAutomaticSpellChecker *spell, const gchar *word) { GtkWidget *topmenu, *menu; GtkWidget *mi; GSList *suggestions; GSList *list; gchar *label_text; topmenu = menu = gtk_menu_new(); suggestions = gedit_spell_checker_get_suggestions (spell->spell_checker, word, -1); list = suggestion...
false
false
false
false
false
0
globus_error_construct_error( globus_module_descriptor_t * base_source, globus_object_t * base_cause, int type, const char * source_file, const char * source_func, int ...
false
false
false
false
false
0
_c_udivMod256(struct u256* n, struct u256* d){ struct u256_divRet ret; struct u256 q = {{0}}; struct u256 r = {{0}}; for(int i = 255; i >= 0; i--){ r = _c_lshift256(&r,1); type256bitSet(&r,0,type256bitGet(n,i)); if(ucmp256(&r,d) >= 0){ r = usub256(&r,d); type256bitSet(&q,i,1); } } ret.q = q; re...
false
false
false
false
false
0
getNonCompileUnitScope(MDNode *N) { if (DIDescriptor(N).isCompileUnit()) return NULL; return N; }
false
false
false
false
false
0
get_comb_box_widget (GNCSearchWindow *sw, struct _crit_data *data) { GtkWidget *combo_box; GtkListStore *store; GtkTreeIter iter; GtkCellRenderer *cell; GList *l; int index = 0, current = 0; store = gtk_list_store_new(NUM_SEARCH_COLS, G_TYPE_STRING, G_TYPE_POINTER); combo_box = gtk_comb...
false
false
false
false
false
0
storeGetMemSpace(int size) { StoreEntry *e = NULL; int released = 0; static time_t last_check = 0; int pages_needed; RemovalPurgeWalker *walker; if (squid_curtime == last_check) return; last_check = squid_curtime; pages_needed = (size / SM_PAGE_SIZE) + 1; if (memInUse(MEM_MEM_NODE) ...
false
false
false
false
false
0
mpfr_get_z (mpz_ptr z, mpfr_srcptr f, mpfr_rnd_t rnd) { int inex; mpfr_t r; mpfr_exp_t exp; if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) { if (MPFR_UNLIKELY (MPFR_NOTZERO (f))) MPFR_SET_ERANGE (); mpz_set_ui (z, 0); /* The ternary value is 0 even for infinity. Giving the rounding ...
false
false
false
false
false
0
blockContents(int block) { if(!openDataFile()) { return QList<QChar>(); } const uchar* data = reinterpret_cast<const uchar*>(dataFile.constData()); const quint32 offsetBegin = qFromLittleEndian<quint32>(data+20); const quint32 offsetEnd = qFromLittleEndian<quint32>(data+24); int max = ...
false
false
false
false
false
0
numaJoin(NUMA *nad, NUMA *nas, l_int32 istart, l_int32 iend) { l_int32 n, i; l_float32 val; PROCNAME("numaJoin"); if (!nad) return ERROR_INT("nad not defined", procName, 1); if (!nas) return 0; if (istart < 0) istart = 0; n = numaGetC...
false
false
false
false
false
0
pixSetUnderTransparency(PIX *pixs, l_uint32 val, l_int32 debug) { PIX *pixg, *pixm, *pixt, *pixd; PROCNAME("pixSetUnderTransparency"); if (!pixs || pixGetDepth(pixs) != 32) return (PIX *)ERROR_PTR("pixs not defined or not 32 bpp", ...
false
false
false
false
false
0
get_timespec_val( gpointer pObject ) { slot_info_t* pInfo = (slot_info_t*)pObject; g_return_val_if_fail( pObject != NULL, gnc_dmy2timespec( 1, 1, 1970 ) ); //if( kvp_value_get_type( pInfo->pKvpValue ) == KVP_TYPE_TIMESPEC ) { return kvp_value_get_timespec( pInfo->pKvpValue ); }
false
false
false
false
false
0
modulus_result_type(const struct glsl_type *type_a, const struct glsl_type *type_b, struct _mesa_glsl_parse_state *state, YYLTYPE *loc) { if (!state->check_version(130, 300, loc, "operator '%%' is reserved")) { return glsl_type::error_type; } /* From GLSL 1.50 spec, page 56: * "The op...
false
false
false
false
false
0
gst_rtp_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstRTPMux *mux = GST_RTP_MUX (parent); gboolean is_pad; gboolean ret; switch (GST_EVENT_TYPE (event)) { case GST_EVENT_CAPS: { GstCaps *caps; gst_event_parse_caps (event, &caps); ret = gst_rtp_mux_setcaps (...
false
false
false
false
false
0
cbf_calculate_initial_position (cbf_positioner positioner, unsigned int reserved, double ratio, double final1, double final2, ...
false
false
false
false
false
0
ion_client_destroy(struct ion_client *client) { struct ion_device *dev = client->dev; struct rb_node *n; pr_debug("%s: %d\n", __func__, __LINE__); while ((n = rb_first(&client->handles))) { struct ion_handle *handle = rb_entry(n, struct ion_handle, node); ion_handle_destroy(&handle->ref); } idr_d...
false
false
false
false
false
0
nautilus_file_get_emblem_icons (NautilusFile *file) { GList *keywords, *l; GList *icons; char *icon_names[2]; char *keyword; GIcon *icon; if (file == NULL) { return NULL; } g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL); keywords = nautilus_file_get_keywords (file); keywords = prepend_automatic_k...
true
true
false
false
false
1
buffered_tell(buffered *self, PyObject *args) { Py_off_t pos; CHECK_INITIALIZED(self) pos = _buffered_raw_tell(self); if (pos == -1) return NULL; pos -= RAW_OFFSET(self); /* TODO: sanity check (pos >= 0) */ return PyLong_FromOff_t(pos); }
false
false
false
false
false
0
widget_destroyed (GtkWidget *obj, gpointer widget_pointer) { DrawspacesConfigureWidget *widget = (DrawspacesConfigureWidget *)widget_pointer; gedit_debug (DEBUG_PLUGINS); g_object_unref (widget->settings); g_slice_free (DrawspacesConfigureWidget, widget_pointer); gedit_debug_message (DEBUG_PLUGINS, "END"); }
false
false
false
false
false
0
tcl_idx2hand STDVAR { int idx; BADARGS(2, 2, " idx"); idx = findidx(atoi(argv[1])); if (idx < 0) { Tcl_AppendResult(irp, "invalid idx", NULL); return TCL_ERROR; } Tcl_AppendResult(irp, dcc[idx].nick, NULL); return TCL_OK; }
false
false
false
false
false
0
pageset_init(struct per_cpu_pageset *p) { struct per_cpu_pages *pcp; int migratetype; memset(p, 0, sizeof(*p)); pcp = &p->pcp; pcp->count = 0; for (migratetype = 0; migratetype < MIGRATE_PCPTYPES; migratetype++) INIT_LIST_HEAD(&pcp->lists[migratetype]); }
false
false
false
false
false
0
ReadTagFallback() { if (BufferSize() >= kMaxVarintBytes || // Optimization: If the varint ends at exactly the end of the buffer, // we can detect that and still use the fast path. (buffer_end_ > buffer_ && !(buffer_end_[-1] & 0x80))) { uint32 tag; const uint8* end = ReadVarint32FromArray(bu...
false
false
false
false
true
1
tabWidget_currentChanged(int index) { SketchAreaWidget * widgetParent = dynamic_cast<SketchAreaWidget *>(currentTabWidget()); if (widgetParent == NULL) return; m_currentWidget = widgetParent; if (m_locationLabel) { m_locationLabel->setText(""); } QStatusBar *sb = statusBar(); connect(sb, SIGNAL(messageChang...
false
false
false
false
false
0
SetOriginalDataArray(MeasureType *setOriginalDataArray) { // Set the original data array. m_OriginalDataArray->SetSize(m_RangeDimension); for ( int i = 0; i < (int)( setOriginalDataArray->GetNumberOfElements() ); i++ ) { m_OriginalDataArray->put( i, setOriginalDataArray->get(i) ); } }
false
false
false
false
false
0
crypto_gcm_init_common(struct aead_request *req) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __be32 counter = cpu_to_be32(1); struct scatterlist *sg; memset(pctx->auth_tag, 0, sizeof(pctx->auth_tag)); memcpy(pctx->iv, req->iv, 12); memcpy(pctx->iv + 12, &counter, 4); sg_init_table(pctx->sr...
false
true
false
false
false
1
PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) { PyObject *hint, *result; Py_ssize_t res; _Py_IDENTIFIER(__length_hint__); if (_PyObject_HasLen(o)) { res = PyObject_Length(o); if (res < 0 && PyErr_Occurred()) { if (!PyErr_ExceptionMatches(PyExc_TypeError)) { ...
false
false
false
false
false
0
rkcomp(char *probe) /* A,C,G,T/U, N probe string, 0-8 nt long */ { Hashseq hashprobe = 0; char coded[RK_HASHSIZE + 1]; int len; int i; /* check bounds violation on probe */ if ((len = strlen(probe)) > RK_HASHSIZE) return 0; /* encode the probe */ if (seqencode(coded, probe)...
false
false
false
false
false
0
mwifiex_pcie_host_to_card(struct mwifiex_adapter *adapter, u8 type, struct sk_buff *skb, struct mwifiex_tx_param *tx_param) { if (!skb) { mwifiex_dbg(adapter, ERROR, "Passed NULL skb to %s\n", __func__); return -1; } if (type == MWIFIEX_TYPE_DATA) return mwifiex_pcie_send_data(adapter...
false
false
false
false
false
0
free_lang_data (void) { unsigned i; /* If we are the LTO frontend we have freed lang-specific data already. */ if (in_lto_p || !flag_generate_lto) return 0; /* Allocate and assign alias sets to the standard integer types while the slots are still in the way the frontends generated them. */ ...
false
false
false
false
false
0
binary_iop(PyObject *v, PyObject *w, const int iop_slot, const int op_slot, const char *op_name) { PyObject *result = binary_iop1(v, w, iop_slot, op_slot); if (result == Py_NotImplemented) { Py_DECREF(result); return binop_type_error(v, w, op_name); } return result; }
false
false
false
false
false
0
put_1d_span(t4_state_t *s, int32_t span, const t4_run_table_entry_t *tab) { const t4_run_table_entry_t *te; te = &tab[63 + (2560 >> 6)]; while (span >= 2560 + 64) { if (put_encoded_bits(s, te->code, te->length)) return -1; span -= te->run_length; } te = &tab[63 + (sp...
false
false
false
false
false
0
uv_remove_ares_handle(uv_ares_task_t* handle) { uv_loop_t* loop = handle->loop; if (handle == loop->uv_ares_handles_) { loop->uv_ares_handles_ = handle->ares_next; } if (handle->ares_next) { handle->ares_next->ares_prev = handle->ares_prev; } if (handle->ares_prev) { handle->ares_prev->ares_n...
false
false
false
false
false
0
test_composePoint(double x1,double y1,double z1, double yaw1,double pitch1,double roll1, double x,double y,double z) { const CPose3D p1(x1,y1,z1,yaw1,pitch1,roll1); const CPoint3D p(x,y,z); CPoint3D p1_plus_p = p1 + p; CPoint3D p1_plus_p2; p1.composePoint(p.x(),p.y(),p.z() ,p1_plus_...
false
false
false
false
false
0
ConsState(CONSENT *pCE) #else ConsState(pCE) CONSENT *pCE; #endif { if (!pCE->fup) return "down"; if (pCE->initfile != (CONSFILE *)0) return "initializing"; switch (pCE->ioState) { case ISNORMAL: return "up"; case INCONNECT: return "connecting"; case ISDISCONNECTED: return "disconn...
false
false
false
false
false
0
new_update(int op, char * memtype, int filefmt, char * filename) { UPDATE * u; u = (UPDATE *)malloc(sizeof(UPDATE)); if (u == NULL) { fprintf(stderr, "%s: out of memory\n", progname); exit(1); } u->memtype = strdup(memtype); u->filename = strdup(filename); u->op = op; u->format = filefmt; r...
false
false
false
false
false
0
brasero_file_monitor_start_monitoring_real (BraseroFileMonitor *self, const gchar *uri) { BraseroFileMonitorPrivate *priv; gchar *unescaped_uri; gchar *path; gint dev_fd; uint32_t mask; uint32_t wd; priv = BRASERO_FILE_MONITOR_PRIVATE (self); unescaped_uri = g_uri_unescape_string (uri, NULL); path =...
false
false
false
false
false
0
UpdatePartitionNamesInterface(void) { populatingPartitionNames = true; partitionNameComboBox->clear(); int partitionsListWidgetRow = partitionsListWidget->currentRow(); if (partitionsListWidgetRow >= 0) { const FileInfo& partitionInfo = workingPackageData.GetFirmwareInfo().GetFileInfos()[partitionsL...
false
false
false
false
false
0
mono_test_Winx64_structs_in2 (winx64_struct1 var1, winx64_struct1 var2, winx64_struct1 var3, winx64_struct1 var4, winx64_struct1 var5) { if (var1.a != 1) return 1; if (var2.a != 2) return 2; if (var3.a != 3) return 3; if (var4.a != 4) return 4; if (var5.a != 5) return 5; return 0; }
false
false
false
false
false
0
abraca_configurable_register (AbracaIConfigurable* obj) { GKeyFile* file = NULL; gboolean _tmp0_; AbracaIConfigurable* _tmp5_; AbracaIConfigurable* _tmp6_; AbracaIConfigurable* _tmp7_; GError * _inner_error_ = NULL; g_return_if_fail (obj != NULL); _tmp0_ = abraca_configurable_config_loaded; if (_tmp0_) { GKe...
false
false
false
false
false
0