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
copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format, u32 pitch) { if (!target || !width || !height) return; const u32 bpp=getBitsPerPixelFromFormat(format)/8; if (0==pitch) pitch = width*bpp; if (Format==format && Size.Width==width && Size.Height==height) { if (pitch==Pitch) ...
false
false
false
false
false
0
saferealloc(char *ptr, int length) { char *newptr; if(length <=0) length=1; newptr=realloc(ptr,length); if (ptr == (char *)0) { fprintf(stderr,"%s:realloc failed",Module); exit(1); } return ptr; }
false
false
false
false
true
1
memory_operand (rtx op, enum machine_mode mode) { rtx inner; if (! reload_completed) /* Note that no SUBREG is a memory operand before end of reload pass, because (SUBREG (MEM...)) forces reloading into a register. */ return MEM_P (op) && general_operand (op, mode); if (mode != VOIDmode && GET_M...
false
false
false
false
false
0
uwb_rsv_init(struct uwb_rc *rc) { INIT_LIST_HEAD(&rc->reservations); INIT_LIST_HEAD(&rc->cnflt_alien_list); mutex_init(&rc->rsvs_mutex); spin_lock_init(&rc->rsvs_lock); INIT_DELAYED_WORK(&rc->rsv_update_work, uwb_rsv_update_work); INIT_DELAYED_WORK(&rc->rsv_alien_bp_work, uwb_rsv_alien_bp_work); rc->bow.can_rese...
false
false
false
false
false
0
buffer_cat (buffer * b, const char *s) { char *new_data; long size; long len, used; if (!b || !s) return -1; size = b->size; len = strlen (s); if (! b->data) return buffer_copy (b, s); used = b->used + len; if (used >= size) { size *= 2; size += len; new_data = realloc (b->dat...
false
false
false
false
false
0
fso_gsm_v250_d_issue (FsoGsmV250D* self, const gchar* number, gboolean voice) { gchar* result = NULL; const gchar* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; gchar* postfix = NULL; const gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; gchar* safenumber = NULL; const gchar* _tmp4_ = NULL; gchar* _tmp5_ = NULL; const ...
false
false
false
false
false
0
enter_scope () { if (func_def_f) func_def_f = 0; else scope_level++; }
false
false
false
false
false
0
endin_cleanf( bibl *bin, param *p ) { long i; for ( i=0; i<bin->nrefs; ++i ) endin_cleanref( bin->ref[i] ); }
false
false
false
false
false
0
free_grp_mask(IntSet *grp_mask, int grp_num) { int i; for (i = 0; i < grp_num; i++) { destruct_IntSet(grp_mask[i]); } free(grp_mask); }
false
false
false
false
false
0
clear_stale_entries (codeBook * c) { int staleThresh = c->t >> 1; int *keep = (int *) g_malloc (sizeof (int) * (c->numEntries)); int keepCnt = 0; code_element **foo; int k; int numCleared; /* SEE WHICH CODEBOOK ENTRIES ARE TOO STALE */ for (int i = 0; i < c->numEntries; i++) { if (c->cb[i]->stale > s...
false
false
false
false
false
0
dump_loader_block (volatile loader_block * lb) { #ifdef DEBUG_AMBASSADOR unsigned int i; PRINTDB (DBG_LOAD, "lb @ %p; res: %d, cmd: %d, pay:", lb, be32_to_cpu (lb->result), be32_to_cpu (lb->command)); for (i = 0; i < MAX_COMMAND_DATA; ++i) PRINTDM (DBG_LOAD, " %08x", be32_to_cpu (lb->payload.data[i])); ...
false
false
false
false
false
0
C4_Model_add_span(C4_Model *model, gchar *name, C4_State *span_state, gint min_query, gint max_query, gint min_target, gint max_target){ register C4_Span *span; g_assert(model->is_open); span = C4_Span_create(name, span_state, ...
false
false
false
false
false
0
c_operator(config_entry_t *ce) { char *name; char *password = NULL; operclass_t *operclass = NULL; config_entry_t *topce; if (ce->ce_vardata == NULL) { conf_report_warning(ce, "no parameter for configuration option"); return 0; } topce = ce; name = ce->ce_vardata; for (ce = ce->ce_entries; ce; ce = ce-...
false
false
false
false
false
0
unit_role_by_rule_name(const char *s) { enum unit_role_id i; fc_assert_ret_val(ARRAY_SIZE(role_names) == (L_LAST - L_FIRST), L_LAST); for(i = L_FIRST; i < L_LAST; i++) { if (fc_strcasecmp(role_names[i - L_FIRST], s) == 0) { return i; } } return L_LAST; }
false
false
false
false
false
0
cp_parser_mem_initializer (cp_parser* parser) { tree mem_initializer_id; tree expression_list; tree member; /* Find out what is being initialized. */ if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN)) { pedwarn ("anachronistic old-style base class initializer"); mem_initializer_id...
false
false
false
false
false
0
push_undo_atom( const int type, const int from, const int to ) { disable_interrupts(); if( !resize_undo_buffer( &ustack, &usize, ( u_ptr + 1 ) * sizeof (undo_t) ) ) { show_strerror( 0, errno ); set_error_msg( "Memory exhausted" ); if( ustack ) { clear_undo_stack(); free( ustack )...
false
false
false
false
false
0
nodetrack_ismember(nodetrack_t* mbr, const char * name, cl_uuid_t u) { if (cl_uuid_is_null(&u)) { return(g_hash_table_lookup(mbr->nt.namemap, name) != NULL); } return (g_hash_table_lookup(mbr->nt.uuidmap, &u) != NULL); }
false
false
false
false
false
0
sec_asn1d_free_child (sec_asn1d_state *state, PRBool error) { if (state->child != NULL) { PORT_Assert (error || state->child->consumed == 0); PORT_Assert (state->our_mark != NULL); PORT_ArenaZRelease (state->top->our_pool, state->our_mark); if (error && state->top->their_pool == NULL) { /* * XXX We n...
false
false
false
false
false
0
file_ngg_load(FILE *file, gn_bmp *bitmap, gn_phone *info) { unsigned char buffer[2000]; int i, j; bitmap->type = GN_BMP_CallerLogo; if (fread(buffer, 1, 16, file) != 16) return GN_ERR_FAILED; bitmap->width = buffer[6]; bitmap->height = buffer[8]; bitmap->size = bitmap->height * bitmap->width / 8; if (((bit...
true
true
false
false
true
1
update(const MSIndexVector&) { if (internalUpdateStatus()==MSFalse) { double value=currentValue(); setSliderPosition(valueToPixel(value)); } else internalUpdateStatus(MSFalse); MSString buffer; valueWin()->updateValue(formatValue(buffer,currentValue())); }
false
false
false
false
false
0
lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net) { struct lan78xx_net *dev = netdev_priv(net); struct sk_buff *skb2 = NULL; if (skb) { skb_tx_timestamp(skb); skb2 = lan78xx_tx_prep(dev, skb, GFP_ATOMIC); } if (skb2) { skb_queue_tail(&dev->txq_pend, skb2); if (skb_queue_len(&dev->txq_pend)...
false
false
false
false
false
0
clear(void) { for (dataType::const_iterator it = data_.begin() ; (it != data_.end()) ; it++) delete *it; data_.clear(); }
false
false
false
false
false
0
TrimWrite(Areport *f, char *buffer) { char *p = buffer + strlen(buffer) - 1; while (p > buffer) { if (*p == ' ') { p--; } else { break; } } p[1] = 0; f->PutStr(buffer, 1); }
false
false
false
false
false
0
ty2zone (dec) double dec; /* declination in degrees */ { int zone; /* gsc zone (returned) */ double zonesize; int ndeczones = 12; /* number of declination zones per hemisphere */ /* width of declination zones */ zonesize = 90.0 / ndeczones; zone = ((int) (dec / zonesize)); if (dec < 0) zone = nd...
false
false
false
false
false
0
createToolBar() { m_ToolBar = new QToolBar(q); m_ToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); m_ToolBar->addAction(aToggleSearchView); m_ToolBar->addAction(aCreateUser); m_ToolBar->addAction(aModifyUser); m_ToolBar->addAction(aSave); m_ToolBar->ad...
false
false
false
false
false
0
xlog_iodone(xfs_buf_t *bp) { struct xlog_in_core *iclog = bp->b_fspriv; struct xlog *l = iclog->ic_log; int aborted = 0; /* * Race to shutdown the filesystem if we see an error. */ if (XFS_TEST_ERROR(bp->b_error, l->l_mp, XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) { xfs_buf_ioerror_alert(bp, _...
false
false
false
false
false
0
operator=(const SimpleTimeZone &right) { if (this != &right) { TimeZone::operator=(right); rawOffset = right.rawOffset; startMonth = right.startMonth; startDay = right.startDay; startDayOfWeek = right.startDayOfWeek; startTime = right.startTime...
false
false
false
false
false
0
setLevel( int level, CategoryId::CatMenuId type ) { if( !m_treeModel ) return; QList<CategoryId::CatMenuId> levels = m_treeModel->levels(); if( type == CategoryId::None ) { while( levels.count() >= level ) levels.removeLast(); } else { levels.removeAll( ty...
false
false
false
false
false
0
seqCdFileOpen(const AjPStr dir, const char* name, AjPStr* fullname) { SeqPCdFile thys = NULL; AJNEW0(thys); thys->File = ajFileNewInNamePathC(name, dir); if(!thys->File) { AJFREE(thys); return NULL; } AJNEW0(thys->Header); seqCdRead...
false
false
false
false
false
0
tg3_get_rxfh(struct net_device *dev, u32 *indir, u8 *key, u8 *hfunc) { struct tg3 *tp = netdev_priv(dev); int i; if (hfunc) *hfunc = ETH_RSS_HASH_TOP; if (!indir) return 0; for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++) indir[i] = tp->rss_ind_tbl[i]; return 0; }
false
false
false
false
false
0
connect () { // Following code should handle both Berkeley-derived socket // implementations and Solaris. int err = 0; socklen_t len = sizeof err; int rc = getsockopt (s, SOL_SOCKET, SO_ERROR, (char*) &err, &len); if (rc == -1) err = errno; if (err != 0) { // Assert that ...
false
false
false
false
false
0
addr_to_string (ACE_TCHAR buffer[], size_t size, int ipaddr_format) const { if (this->htid_.length() == 0) return this->ACE_INET_Addr::addr_to_string(buffer,size,ipaddr_format); if (size < htid_.length()) return -1; ACE_OS::strncpy (buffer,...
false
false
false
false
false
0
ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num) { mutex_lock(&osb->recovery_lock); trace_ocfs2_recovery_thread(node_num, osb->node_num, osb->disable_recovery, osb->recovery_thread_task, osb->disable_recovery ? -1 : ocfs2_recovery_map_set(osb, node_num)); if (osb->disable_recovery) goto out; ...
false
false
false
false
false
0
gda_sql_builder_add_case (GdaSqlBuilder *builder, GdaSqlBuilderId test_expr, GdaSqlBuilderId else_expr, ...) { g_return_val_if_fail (GDA_IS_SQL_BUILDER (builder), 0); g_return_val_if_fail (builder->priv->main_stmt, 0); SqlPart *ptest, *pelse; ptest = get_part (builder, test_expr, GDA_SQL_ANY_EXPR); pelse = g...
false
false
false
false
false
0
skipTo(const int32_t target) { if (!haveSkipped) { // first time, load skip levels loadSkipLevels(); haveSkipped = true; } // walk up the levels until highest level is found that has a skip // for this target int32_t level = 0; while (level < numberOfSkipLevels - 1 && target > skipDoc[level + 1]) { level...
false
false
false
false
false
0
clutter_container_foreach (ClutterContainer *container, ClutterCallback callback, gpointer user_data) { g_return_if_fail (CLUTTER_IS_CONTAINER (container)); g_return_if_fail (callback != NULL); #ifdef CLUTTER_ENABLE_DEBUG if (G_UNLIKELY (_clutter_d...
false
false
false
false
false
0
eng_image_animated_loop_count_get(void *data __UNUSED__, void *image) { Evas_GL_Image *gim = image; Image_Entry *im; if (!gim) return -1; im = (Image_Entry *)gim->im; if (!im) return -1; if (!im->flags.animated) return -1; return im->loop_count; }
false
false
false
false
false
0
getAllOnesValue(unsigned BitWidth, bool isIEEE) { switch (BitWidth) { case 16: return APFloat(IEEEhalf, APInt::getAllOnesValue(BitWidth)); case 32: return APFloat(IEEEsingle, APInt::getAllOnesValue(BitWidth)); case 64: return APFloat(IEEEdouble, APInt::getAllOnesValue(BitWidth)); case 80: retu...
false
false
false
false
false
0
Get(v8::Handle<Value> key) { i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); ON_BAILOUT(isolate, "v8::Object::Get()", return Local<v8::Value>()); ENTER_V8(isolate); i::Handle<i::Object> self = Utils::OpenHandle(this); i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); EXCEPTION_PREAMBLE(is...
false
false
false
false
false
0
alc_strtophtrs(s_name,p_layer,lp_l,lp_w) char *s_name, *p_layer; long *lp_l, *lp_w; { static char *p_l,*p_w, buffer[MBKSZNAME]; int i; #ifdef JP_DEBUG puts( "- Execution de \`alc_strtophtrs\` ."); #endif strcpy( buffer, s_name); if ( (buffer[0]!='T')||(buffer[2...
false
false
false
false
false
0
on_button_release (GtkWidget *widget, GdkEventButton *event, gpointer data) { int item_no = GPOINTER_TO_INT (data); if (event->button != 3) return FALSE; GtkWidget *menu = gtk_menu_new (); GtkWidget *mi = gtk_menu_item_new_with_label (_("Information")); g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (o...
false
false
false
false
false
0
model_introspect (Babl *babl) { int i; babl_log ("\t\tcomponents=%i", babl->model.components); for (i = 0; i < babl->model.components; i++) { babl_log ("\t\tindex[%i] = \"%s\"", i, BABL (babl->model.component[i])->instance.name); } }
false
false
false
false
false
0
createGssContext(int fd) { if( fd < 0 || fd > MAX_GSS_CONTEXT) { errno = EINVAL; #ifdef SHOW_ERROR perror("invalid file descriptor"); #endif return NULL; } tunnel_ctx_t *ctx = malloc( sizeof(tunnel_ctx_t) ); if( ctx == NULL ) { errno = EINVAL; #ifdef SHOW_ERROR perror("invalid file descriptor"); #endif...
false
false
false
false
false
0
imclient_decodebase64(char *input) { int len = 0; unsigned char *output = (unsigned char *)input; int c1, c2, c3, c4; assert(input); while (*input) { c1 = *input++; if (CHAR64(c1) == XX) return -1; c2 = *input++; if (CHAR64(c2) == XX) return -1; c3 = *input++; if (c3 != '=' && CHAR64(c3) == ...
false
false
false
false
false
0
setActivationState(int newState) { if ( (m_activationState1 != DISABLE_DEACTIVATION) && (m_activationState1 != DISABLE_SIMULATION)) m_activationState1 = newState; }
false
false
false
false
false
0
imageviewer_create_widget_func(PrefsPage * _page, GtkWindow * window, gpointer data) { ImageViewerPage *prefs_imageviewer = (ImageViewerPage *) _page; GtkWidget *table; GtkWidget *autoload_img; GtkWidget *resize_img; GtkWidget *inline_img; GtkWidget *print_imgs; table = gtk_table_new(4, 1, FALS...
false
false
false
false
false
0
output_completion_banner(char *analyze_script_file_name, char *deletion_script_file_name) { /* Did we copy the free space files? */ if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804) pg_log(PG_REPORT, "Optimizer statistics are not transferred by pg_upgrade so,\n" "once you start the new ser...
false
false
false
false
false
0
dechain(sed_label_t *lpt, sed_reptr_t *address) { sed_reptr_t *rep; if ((lpt == NULL) || (lpt->chain == NULL) || (address == NULL)) return; rep = lpt->chain; while (rep->lb1) { sed_reptr_t *next; next = rep->lb1; rep->lb1 = address; rep = next; } rep->lb1...
false
false
false
false
false
0
SetData(vtkDataArray *data) { if ( data != this->Data && data != NULL ) { if (data->GetNumberOfComponents() != this->Data->GetNumberOfComponents() ) { vtkErrorMacro(<<"Number of components is different...can't set data"); return; } this->Data->UnRegister(this); this->Data = dat...
false
false
false
false
false
0
assemble_asm (tree string) { app_enable (); if (TREE_CODE (string) == ADDR_EXPR) string = TREE_OPERAND (string, 0); fprintf (asm_out_file, "\t%s\n", TREE_STRING_POINTER (string)); }
false
false
false
false
false
0
setCurrentText(const QVariant &text) const { if (m_Item) { if (m_Item->itemData()) { m_Item->itemData()->setData(0, text); } } }
false
false
false
false
false
0
flmVerifyFileUse( F_MUTEX hMutex, FFILE ** ppFileRV) { RCODE rc = FERR_OK; FFILE * pFile = *ppFileRV; // Can't open the file if it is being closed by someone else. if (pFile->uiFlags & DBF_BEING_CLOSED) { rc = RC_SET( FERR_IO_ACCESS_DENIED); goto Exit; } // If the file is in the process of being ...
false
false
false
false
false
0
doGouraudTriangleShFill(GfxGouraudTriangleShading *shading) { double x0, y0, x1, y1, x2, y2; GfxColor color0, color1, color2; int i; for (i = 0; i < shading->getNTriangles(); ++i) { shading->getTriangle(i, &x0, &y0, &color0, &x1, &y1, &color1, &x2, &y2, &color2); gouraudFillTriangle(x0, y0, &co...
false
false
false
false
false
0
step_size(struct g726_state *state_ptr) { int y, dif, al; if (state_ptr->ap >= 256) { return state_ptr->yu; } y = state_ptr->yl >> 6; dif = state_ptr->yu - y; al = state_ptr->ap >> 2; if (dif > 0) { y += (dif * al) >> 6; } else if (dif < 0) { y += (dif * al + 0x3F) >> 6; } return y; }
false
false
false
false
false
0
snprint_line(char *buf, size_t count, const u8 * data, u32 len, u32 ofs) { int out, i, j, l; char c; out = snprintf(buf, count, "%08X", ofs); for (l = 0, i = 0; i < 2; i++) { out += snprintf(buf + out, count - out, " "); for (j = 0; j < 8 && l < len; j++, l++) out += snprintf(buf + out, count - out, "...
false
false
false
false
false
0
maybe_fix_daily_start (long *ed, int pd) { int wday = weekday_from_epoch_day(*ed); int fix = 0; if (wday == 0) { /* 5- or 6-day data: sunday not valid */ fix = 1; } else if (wday == 6 && pd == 5) { /* 5-day data: saturday not valid */ fix = 2; } if (fix) { char *fixed, *msg; *ed += ...
false
false
false
false
false
0
bnad_rxq_post(struct bnad *bnad, struct bna_rcb *rcb) { struct bnad_rx_unmap_q *unmap_q = rcb->unmap_q; u32 to_alloc; to_alloc = BNA_QE_FREE_CNT(rcb, rcb->q_depth); if (!(to_alloc >> BNAD_RXQ_REFILL_THRESHOLD_SHIFT)) return; if (BNAD_RXBUF_IS_SK_BUFF(unmap_q->type)) bnad_rxq_refill_skb(bnad, rcb, to_alloc); ...
false
false
false
false
false
0
highscore() { if ( m_gameWidget->score() == 0 ) { return; } kDebug() ; KScoreDialog ksdialog( KScoreDialog::Name | KScoreDialog::Score | KScoreDialog::Level, this ); ksdialog.initFromDifficulty(Kg::difficulty()); KScoreDialog::FieldInfo info; info[KScoreDialog::Score].setNum( m_game...
false
false
false
false
false
0
ui_emodule_install(int before, char *ename, PFI func) { int i,k; emodule *em, *emp; if((k = ui_emodule_index(ename,NULL)) >= 0) ui_emodule_uninstall(k); k = VVCOUNT(uistate.emod)++; vvneeds(&uistate.emod, VVCOUNT(uistate.emod)); if(before > k) before = k; else if(before < 0) before = 0; /* Shift the...
false
false
false
false
false
0
write(const char* buf, int n) { if (a) a->write(buf, n); if (b) b->write(buf, n); }
false
false
false
false
false
0
truncate_spaces(line) char_u *line; { int i; /* find start of trailing white space */ for (i = (int)STRLEN(line) - 1; i >= 0 && vim_iswhite(line[i]); i--) { if (State & REPLACE_FLAG) replace_join(0); /* remove a NUL from the replace stack */ } line[i + 1] = NUL; }
false
false
false
false
false
0
isMemberFunc(const Scope *scope, const Token *tok) { unsigned int args = countParameters(tok); for (std::list<Function>::const_iterator func = scope->functionList.begin(); func != scope->functionList.end(); ++func) { /** @todo we need to look at the argument types when there are overloaded functions ...
false
false
false
false
false
0
get_browser_command_line_format (const gchar *homepage) { static const char * URI_SCHEME_HTTP = "http"; GAppInfo * info = g_app_info_get_default_for_uri_scheme (URI_SCHEME_HTTP); g_return_val_if_fail (NULL != info, NULL); const char * exe_name = g_app_info_get_executable (info); g_return_val_if_fail (NULL !...
false
false
false
false
false
0
find_pseudo_copy (rtx set) { rtx dest = SET_DEST (set); rtx src = SET_SRC (set); unsigned int rd, rs; bitmap b; if (!REG_P (dest) || !REG_P (src)) return false; rd = REGNO (dest); rs = REGNO (src); if (HARD_REGISTER_NUM_P (rd) || HARD_REGISTER_NUM_P (rs)) return false; if (GET_MODE_SIZE (GE...
false
false
false
false
false
0
SplitAllCriticalEdges(Function &F, const CriticalEdgeSplittingOptions &Options) { unsigned NumBroken = 0; for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) { TerminatorInst *TI = I->getTerminator(); if (TI->getNumSuccessors() > 1 && !isa<IndirectBrInst>(TI)) ...
false
false
false
false
false
0
T1_GetAfmFileName( int FontID) { static char filename[MAXPATHLEN+1]; if (T1_CheckForInit())return(NULL); /* Check first for valid FontID */ if ((FontID<0) || (FontID>FontBase.no_fonts)){ T1_errno=T1ERR_INVALID_FONTID; return(NULL); } if (pFontBase->pFontArray[FontID].pAfmFileName==NULL) { ...
false
false
false
false
false
0
sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D)) { TSRMLS_FETCH(); if (SG(sapi_started) && EG(in_execution)) { return FAILURE; } sapi_module.input_filter = input_filter; ...
false
false
false
false
false
0
inclusion_get_procinfo(BrinDesc *bdesc, uint16 attno, uint16 procnum) { InclusionOpaque *opaque; uint16 basenum = procnum - PROCNUM_BASE; /* * We cache these in the opaque struct, to avoid repetitive syscache * lookups. */ opaque = (InclusionOpaque *) bdesc->bd_info[attno - 1]->oi_opaque; /* * If we alr...
false
false
false
false
false
0
launchFilenameLayoutConfigDialog() { PodcastFilenameLayoutConfigDialog pflcDialog( m_channel, this ); pflcDialog.configure(); }
false
false
false
false
false
0
create_loads_and_stores_for_name (void **slot, void *data) { struct name_to_copy_elt *const elt = (struct name_to_copy_elt *) *slot; struct clsn_data *const clsn_data = (struct clsn_data *) data; tree t; gimple stmt; gimple_stmt_iterator gsi; tree type = TREE_TYPE (elt->new_name); tree load_struct; gsi...
false
false
false
false
false
0
WebPDecode(const uint8_t* data, size_t data_size, WebPDecoderConfig* config) { WebPDecParams params; VP8StatusCode status; if (config == NULL) { return VP8_STATUS_INVALID_PARAM; } status = GetFeatures(data, data_size, &config->input); if (status != VP8_STATUS_OK) { if (sta...
false
false
false
false
false
0
git_config_parse_int64(int64_t *out, const char *value) { const char *num_end; int64_t num; if (!value || git__strtol64(&num, value, &num_end, 0) < 0) goto fail_parse; switch (*num_end) { case 'g': case 'G': num *= 1024; /* fallthrough */ case 'm': case 'M': num *= 1024; /* fallthrough */ case 'k...
false
false
false
false
false
0
test_set_label_prop (Test *test, gconstpointer unused) { const gchar *item_path = "/org/freedesktop/secrets/collection/english/1"; GAsyncResult *result = NULL; GError *error = NULL; SecretItem *item; guint sigs = 2; gchar *label; secret_item_new_for_dbus_path (test->service, item_path, SECR...
false
false
false
false
false
0
e1000_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto, u16 vid) { struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; u32 vfta, index; /* don't update vlan cookie if already programmed */ if ((adapter->hw.mng_cookie.status & E1000_MNG_DHCP_CO...
false
false
false
false
false
0
create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, hbool_t use_gpfs) { hid_t ret_pl = -1; herr_t ret; /* generic return value */ int mpi_rank; /* mpi variables */ /* need the rank for error checking macros */ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_...
false
false
false
false
false
0
gonzo_become(void) { trace(("gonzo_become()\n{\n")); gonzo_user()->become_begin(); trace(("}\n")); }
false
false
false
false
false
0
cifs_relock_file(struct cifsFileInfo *cfile) { struct cifs_sb_info *cifs_sb = CIFS_SB(cfile->dentry->d_sb); struct cifsInodeInfo *cinode = CIFS_I(d_inode(cfile->dentry)); struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); int rc = 0; down_read(&cinode->lock_sem); if (cinode->can_cache_brlcks) { /* can cache lo...
false
false
false
false
false
0
addrbook_res_items_vis(gpointer key, gpointer value, gpointer data) { AddressBookFile *book = data; AddrItemObject *obj = (AddrItemObject *) value; ItemFolder *rootFolder = book->addressCache->rootFolder; if (obj->parent == NULL) { if (ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON) { rootFolder->listPerson = g_list_ap...
false
false
false
false
false
0
FCEU_rewind(FCEUFILE *fp) { if(fp->type==1) { gzrewind(fp->fp); } else if(fp->type>=2) { ((MEMWRAP *)(fp->fp))->location=0; } else /* Rewind */ fseek(fp->fp,0,SEEK_SET); }
false
false
false
false
false
0
fc_peer_logout ( struct fc_peer *peer, int rc ) { struct fc_ulp *ulp; struct fc_ulp *tmp; DBGC ( peer, "FCPEER %s logged out: %s\n", fc_ntoa ( &peer->port_wwn ), strerror ( rc ) ); /* Drop login reference, if applicable */ if ( fc_link_ok ( &peer->link ) ) fc_peer_put ( peer ); /* Erase peer details ...
false
false
false
false
false
0
video_push_lines(Kimage *kimage_ptr, int start_line, int end_line, int left_pix, int right_pix) { int mdepth_mismatch; int srcy; if(left_pix >= right_pix || left_pix < 0 || right_pix <= 0) { halt_printf("video_push_lines: lines %d to %d, pix %d to %d\n", start_line, end_line, left_pix, right_pix); printf("...
false
false
false
false
false
0
abitset_empty_p (bitset dst) { bitset_windex i; bitset_word *dstp = ABITSET_WORDS (dst); for (i = 0; i < dst->b.csize; i++) if (dstp[i]) return false; return true; }
false
false
false
false
true
1
cpl_image_fill_gaussian( cpl_image * ima, double xcen, double ycen, double norm, double sig_x, double sig_y) { double x, y; int i, j; /* Test entries */ cpl_ensure_code(ima,...
false
false
false
false
false
0
__inorder_to_tree(unsigned j, unsigned size, unsigned extra) { unsigned shift; if (j > extra) j += j - extra; shift = ffs(j); j >>= shift; j |= roundup_pow_of_two(size) >> shift; return j; }
false
false
false
false
false
0
ajStrFmtCapital(AjPStr* Pstr) { AjPStr thys; char* cp; AjBool wasspace = ajTrue; ajStrFmtLower(Pstr); if(!*Pstr) *Pstr = ajStrNewResLenC("", 1, 0); else if((*Pstr)->Use > 1) ajStrGetuniqueStr(Pstr); thys = *Pstr; cp = thys->Ptr; while(*cp) { if(wasspa...
false
false
false
false
false
0
refresh_info_data_free (RefreshInfoData *data) { camel_folder_change_info_free (data->changes); refresh_info_data_infos_free (data); g_slice_free (RefreshInfoData, data); }
false
false
false
false
false
0
GetXPMData(char **data) { if(!PImageLoadPixmapFromXpmData( dpy, win, 0, data, &view.pixmap, &view.mask, &view.width, &view.height, &view.depth)) { GetXBMData(); } }
false
false
false
false
false
0
mat4_add_column(Mat4 *old, double *new_cells) { int row; if (old->cols == 0) old->cells = calloc(4, sizeof(double)); else old->cells = realloc(old->cells,(old->cols+1) * 4 * sizeof(double)); old->cols += 1; for (row = 0; row < 4; ++row) mat4_set(old, row, old->cols-1, new_cells[row]); return old; }
false
false
false
false
false
0
storeTimestampsSet(StoreEntry * entry) { const HttpReply *reply = entry->mem_obj->reply; time_t served_date = reply->date; int age = httpHeaderGetInt(&reply->header, HDR_AGE); /* * The timestamp calculations below tries to mimic the properties * of the age calculation in RFC2616 section 13.2.3...
false
false
false
false
false
0
read_config_err_run_or_abort (GtkDialog *w, gint response_id) { if ((GTK_RESPONSE_OK == response_id) || (GTK_RESPONSE_YES == response_id)) { gtk_widget_destroy (GTK_WIDGET(w)); first_time_ever = TRUE; post_read_config(); } else { gtk_main_quit(); } }
false
false
false
false
false
0
subsys_dev_iter_next(struct subsys_dev_iter *iter) { struct klist_node *knode; struct device *dev; for (;;) { knode = klist_next(&iter->ki); if (!knode) return NULL; dev = container_of(knode, struct device_private, knode_bus)->device; if (!iter->type || iter->type == dev->type) return dev; } }
false
false
false
false
false
0
crypt_volume_key_get(struct crypt_device *cd, int keyslot, char *volume_key, size_t *volume_key_size, const char *passphrase, size_t passphrase_size) { struct luks_masterkey *mk; char *processed_key = NULL; int r, key_len; key_len = crypt_get_volume_key_size(cd); if (key_len > *volume_key_size) { log_err(c...
false
true
false
false
false
1
checksum_start (const char *hostcpu, const char *appliance, const char *modpath, const char *initrd) { pp = popen (shacmd, "w"); if (pp == NULL) error (EXIT_FAILURE, errno, "popen: command failed: %s", shacmd); fprintf (pp, "%s %s %s %d\n", PACKAGE_STRING, hostcpu, modpath, geteuid...
false
false
false
false
false
0
dht_frame_return (call_frame_t *frame) { dht_local_t *local = NULL; int this_call_cnt = -1; if (!frame) return -1; local = frame->local; LOCK (&frame->lock); { this_call_cnt = --local->call_cnt; } UNLOCK (&frame-...
false
false
false
false
false
0
udisks_daemon_util_dup_object (gpointer interface_, GError **error) { gpointer ret; g_return_val_if_fail (G_IS_DBUS_INTERFACE (interface_), NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); ret = g_dbus_interface_dup_object (interface_); if (ret == NULL)...
false
false
false
false
false
0
bluetooth_uuid_to_string (const char *uuid) { char **parts; guint uuid16; gboolean is_custom = FALSE; if (g_str_has_suffix (uuid, "-0000-1000-8000-0002ee000002") != FALSE) is_custom = TRUE; parts = g_strsplit (uuid, "-", -1); if (parts == NULL || parts[0] == NULL) { g_strfreev (parts); return NULL; } u...
false
false
false
false
false
0
DeleteTable() { if(this->TextureUnits!=0) { size_t i=0; size_t c=this->NumberOfTextureUnits; bool valid=true; while(valid && i<c) { valid=!this->TextureUnits[i]; ++i; } if(!valid) { vtkErrorMacro(<<"the texture unit is deleted but not some texture unit has n...
false
false
false
false
false
0
new_fluid_audio_driver(fluid_settings_t* settings, fluid_synth_t* synth) { int i; fluid_audio_driver_t* driver = NULL; char* name; char *allnames; for (i = 0; fluid_audio_drivers[i].name != NULL; i++) { if (fluid_settings_str_equal(settings, "audio.driver", fluid_audio_drivers[i].name)) { FLUID_LOG(FLUID_DBG...
false
false
false
false
false
0
decode_end(AVCodecContext *avctx) { H264Context *h = avctx->priv_data; MpegEncContext *s = &h->s; int i; av_freep(&h->rbsp_buffer[0]); av_freep(&h->rbsp_buffer[1]); free_tables(h); //FIXME cleanup init stuff perhaps for(i = 0; i < MAX_SPS_COUNT; i++) av_freep(h->sps_buffers + i); ...
false
false
false
false
false
0
MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || uiPointId != POINT_ID_ERANIKUS_REDEEMED) { return; } DoScriptText(SAY_REDEEMED_1, m_creature); m_uiEventTimer = 11000; }
false
false
false
false
false
0