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
broadsheet_spiflash_write_sector(struct broadsheetfb_par *par, int addr, const char *data, int sector_size) { int i; int err; for (i = 0; i < sector_size; i += BS_SPIFLASH_PAGE_SIZE) { err = broadsheet_spiflash_write_page(par, addr + i, &data[i]); if (err) return err; } return 0; }
false
false
false
false
false
0
textColor() { if ( m_cachedTheme != theme()->identifier() ) { m_textColor = spritePixmap( "textcolor", QSize( 3, 3 ) ).toImage().pixel( 1, 1 ); m_cachedTheme = theme()->identifier(); } return m_textColor; }
false
false
false
false
false
0
jbig2_decode_ht_region_get_hpats(Jbig2Ctx *ctx, Jbig2Segment *segment) { int index = 0; Jbig2PatternDict *pattern_dict = NULL; Jbig2Segment *rsegment = NULL; /* loop through all referred segments */ while (!pattern_dict && segment->referred_to_segment_count > index) { rsegment = jbig2_find_segment(ctx, s...
false
false
false
false
false
0
eventFilter(QObject *watched, QEvent *event) { QGraphicsWidget *targetWidget = static_cast<QGraphicsWidget *>(d->target); if (watched == targetWidget) { if (event->type() == QEvent::GraphicsSceneResize || event->type() == QEvent::GraphicsSceneMove) { // We need to wait for the pa...
false
false
false
false
false
0
gnc_import_find_split_matches(GNCImportTransInfo *trans_info, gint process_threshold, double fuzzy_amount_difference, gint match_date_hardlimit) { GList * list_element; Query *query = qof_query_create_for(GN...
false
false
false
false
false
0
createSpaceLanguage() { if (g_SpaceLang.isNull()) { g_SpaceLang = new TokenizerLanguage(); g_SpaceLang->setSpaceTokens(" ,\t\r\n"); } return g_SpaceLang.get(); }
false
false
false
false
false
0
cp_parser_omp_var_list_no_open (cp_parser *parser, enum omp_clause_code kind, tree list) { cp_token *token; while (1) { tree name, decl; token = cp_lexer_peek_token (parser->lexer); name = cp_parser_id_expression (parser, /*template_p=*/false, /*check_dependency_p=*/true, ...
false
false
false
false
false
0
adt7316_show_DAC(struct adt7316_chip_info *chip, int channel, char *buf) { u16 data; u8 msb, lsb, offset; int ret; if (channel >= ADT7316_DA_MSB_DATA_REGS || (channel == 0 && (chip->config3 & ADT7316_EN_IN_TEMP_PROP_DACA)) || (channel == 1 && (chip->config3 & ADT7316_EN_EX_TEMP_PROP_DACB))) return -EPE...
false
true
false
false
true
1
hfcpci_softirq(void *arg) { WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, arg, _hfcpci_softirq) != 0); /* if next event would be in the past ... */ if ((s32)(hfc_jiffies + tics - jiffies) <= 0) hfc_jiffies = jiffies + 1; else hfc_jiffies += tics; hfc_tl.expires = hfc_jiffies; add_ti...
false
false
false
false
false
0
mainwindow_destroy(MAIN_WINDOW_REC *window) { g_return_if_fail(window != NULL); mainwindows = g_slist_remove(mainwindows, window); signal_emit("mainwindow destroyed", 1, window); term_window_destroy(window->screen_win); if (mainwindows != NULL) { gui_windows_remove_parent(window); if (!quitting) { ...
false
false
false
false
false
0
set_nonincremental_init_from_string (str) tree str; { tree value, purpose, type; HOST_WIDE_INT val[2]; const char *p, *end; int byte, wchar_bytes, charwidth, bitpos; if (TREE_CODE (constructor_type) != ARRAY_TYPE) abort (); if (TYPE_PRECISION (TREE_TYPE (TREE_TYPE (str))) == TYPE_PRECISION ...
false
false
false
false
false
0
gf_isom_get_brand_info(GF_ISOFile *movie, u32 *brand, u32 *minorVersion, u32 *AlternateBrandsCount) { if (!movie || !brand) return GF_BAD_PARAM; if (!movie->brand) { *brand = 0; if (minorVersion) *minorVersion = 0; if (AlternateBrandsCount) *AlternateBrandsCount = 0; return GF_OK; } *brand = movie->brand->...
false
false
false
false
false
0
GetLengthMSG() const { if ( IsMetaEvent() ) // for all Meta Events { return data_length; } else if ( IsSystemMessage() ) // for all System Exclusive Events { return GetSystemMessageLength ( status ); } else // for all Channel Events { return GetMessageLength ( s...
false
false
false
false
false
0
file_stuff(request *r) { int fildes; int len; struct stat statbuf; struct tm *tm_time; /* no file */ if(!r->file) { r->status = 400; return; } free(r->content_type); r->content_type = strdup(content_type(r->file)); /* forbidden path */ if(forbidden(r->file)) { r->status = 403; r...
false
true
false
false
true
1
clipboard_notify_handler_cb (GladeClipboard *clipboard, GParamSpec *spec, GladeWindow * window) { if (strcmp (spec->name, "has-selection") == 0) { gtk_action_set_sensitive (window->priv->paste_action, glade_clipboard_g...
false
false
false
false
false
0
ExecSeqStat4 ( Stat stat ) { UInt leave; /* a leave-statement was executed */ /* execute the statements */ if ( (leave = EXEC_STAT( ADDR_STAT(stat)[0] )) != 0 ) { return leave; } if ( (leave = EXEC_STAT( ADDR_STAT(...
false
false
false
false
false
0
gth_script_file_load_from_file (GthScriptFile *self, GFile *file, GError **error) { char *buffer; gsize len; GError *read_error; gboolean retval; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (file != N...
false
false
false
false
false
0
_systray_cb_window_configure(void *data, int type __UNUSED__, void *event) { Ecore_X_Event_Window_Configure *ev = event; Instance *inst = data; Icon *icon; const Eina_List *l; EINA_LIST_FOREACH(inst->icons, l, icon) if (icon->win == ev->win) { _systray_icon_geometry_apply(icon); ...
false
false
false
false
false
0
gnc_table_set_virt_cell_cursor (Table *table, VirtualCellLocation vcell_loc, CellBlock *cursor) { VirtualCell *vcell; if (table == NULL) return; vcell = gnc_table_get_virtual_cell (table, vcell_loc); if (vcell == NULL) ret...
false
false
false
false
false
0
lhsexpr_hassym(struct expr_t *ndp, struct sy_t *syp) { register struct expr_t *ndp2; switch ((byte) ndp->optyp) { case ID: if (ndp->lu.sy == syp) return(TRUE); break; case GLBREF: case NUMBER: case REALNUM: break; case LSB: case PARTSEL: if (ndp->lu.x->lu.sy == syp) return(TRUE); break; c...
false
false
false
false
false
0
operator=(const Field& src) { TranslatableItem::operator=(src); m_glom_type = src.m_glom_type; m_field_info = src.m_field_info->copy(); m_lookup_relationship = src.m_lookup_relationship; m_strLookupField = src.m_strLookupField; m_calculation = src.m_calculation; m_visible = src.m_visible; m_primary...
false
false
false
false
false
0
exp_mode (GtkWidget * mainw, gpointer mode) /* callback function to set export format selected in the export dialog */ { char expn[255]; char *exten[10] = { ".fig", ".tex", ".eps", ".xbm", ".svg", ".mol", ".emf", ".sxd", ".png", ".asy" }; int i, n; mainw = mainw; /* Avoid gcc unused parameter warning */ str...
false
false
false
false
false
0
fso_gsm_at_command_queue_onParserCompletedSolicited (FsoGsmAtCommandQueue* self, gchar** response, int response_length1) { FsoFrameworkAbstractCommandHandler* _tmp0_ = NULL; FsoFrameworkAbstractCommandHandler* _tmp1_ = NULL; gchar** _tmp2_ = NULL; gint _tmp2__length1 = 0; g_return_if_fail (self != NULL); g_object...
false
false
false
false
false
0
FoldDoc(unsigned int startPos, int length, int initStyle, Accessor &styler) { bool foldComment = styler.GetPropertyInt("fold.comment") != 0; bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; // property lexer.d.fold.at.else // This option enables D folding on a "} else {" line of an if statement. ...
false
false
false
false
false
0
Database_write() { rewind(conn->file); int rc = 1; // Take a chunk of data the size of 1 int, from the address // 'conn->db->max_data' points to, and write it to 'conn->file'. rc = fwrite(&conn->db->max_data, sizeof(int), 1, conn->file); // Repeat for 'max_rows' rc = fwrite(&conn->db->max_rows, sizeof...
false
false
false
false
true
1
get_mon_name(char *output_name, size_t max, int r_idx, int in_los) { /* Get monster race and name */ monster_race *r_ptr = &r_info[r_idx]; char race_name[80]; my_strcpy(race_name, r_ptr->name, sizeof(race_name)); /* Unique names don't have a number */ if (rf_has(r_ptr->flags, RF_UNIQUE)) { my_strcpy(output_...
true
true
false
false
false
1
regress_lms (double *x, double *y, GMT_LONG nvalues, double *stat, int col) { double d_angle, limit, a, old_error, d_error, angle_0, angle_1; int n_angle; d_angle = 1.0; limit = 0.1; n_angle = irint ((180.0 - 2 * d_angle) / d_angle) + 1; regresslms_sub (x, y, -90.0 + d_angle, 90.0 - d_angle, nvalues, n_angle, s...
false
false
false
false
false
0
store_page_setup(ByteStream &str, int dpi, const GRect &grect, int align ) { /* Will store PostScript code necessary to prepare page for the coming \Ref{DjVuImage}. This is basically a scaling code plus initialization of some buffers. */ if (options.ge...
false
false
false
false
false
0
rf_serial_read(struct adapter *adapt, enum rf_radio_path rfpath, u32 offset) { u32 ret = 0; struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct bb_reg_def *phyreg = &hal_data->PHYRegDef[rfpath]; u32 tmplong, tmplong2; u8 rfpi_enable = 0; offset &= 0xff; tmplong = phy_query_bb_reg(adapt, rFPGA0_XA_...
false
false
false
false
false
0
MatrixExpPade(double *ExpAt, double const *A, int n, double t) { /* Calculate exp(A*t) by diagonal Pade approximation with scaling and squaring */ int order = 8; int N = n*n; double *workspace = new double[4*N]; double * const Temp = workspace; double * const At = workspace + N; doub...
false
false
false
false
false
0
addBookmark() { WebView *webView = currentTab(); QString url = QLatin1String(webView->url().toEncoded()); QString title = webView->title(); AddBookmarkDialog dialog; dialog.setUrl(url); dialog.setTitle(title); BookmarkNode *menu = BrowserApplication::bookmarksManager()->menu(); QModelIn...
false
false
false
false
false
0
snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substream) { struct emu10k1x *emu; struct emu10k1x_midi *midi = substream->rmidi->private_data; unsigned long flags; int err = 0; emu = midi->emu; if (snd_BUG_ON(!emu)) return -ENXIO; spin_lock_irqsave(&midi->open_lock, flags); snd_emu10k1x_intr_di...
false
false
false
false
false
0
add(const Identifier& ident) { if (!m_set.add(ident.ustring().rep()).second) return; m_vector.append(ident); } }
false
false
false
false
false
0
nikonCrypt(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot) { DataBuf buf; if (size < 4) return buf; const NikonArrayIdx* nci = find(nikonArrayIdx, NikonArrayIdx::Key(tag, reinterpret_cast<const char*>(pData), size)); if (nci == 0 || nci->start_ == NA || s...
false
false
false
false
false
0
ispell_provider_list_dictionaries (EnchantProvider * me, size_t * out_n_dicts) { size_t i, nb; char ** out_dicts = g_new0 (char *, size_ispell_map + 1); (void)me; nb = 0; for (i = 0; i < size_ispell_map; i++) if (_ispell_provider_dictionary_exists (me->owner, ispell_map[i].dict)) out_dicts[nb++] = g_...
false
false
false
false
false
0
cmu_print(register const u_char *bp) { register const struct cmu_vend *cmu; #define PRINTCMUADDR(m, s) { TCHECK(cmu->m); \ if (cmu->m.s_addr != 0) \ printf(" %s:%s", s, ipaddr_string(&cmu->m.s_addr)); } printf(" vend-cmu"); cmu = (const struct cmu_vend *)bp; /* Only print if there are unknown bits */ TCHEC...
true
true
false
false
false
1
suspend_common(struct device *dev, bool do_wakeup) { struct pci_dev *pci_dev = to_pci_dev(dev); struct usb_hcd *hcd = pci_get_drvdata(pci_dev); int retval; /* Root hub suspend should have stopped all downstream traffic, * and all bus master traffic. And done so for both the interface * and the stub usb_de...
false
false
false
false
false
0
text_pattern_gt(PG_FUNCTION_ARGS) { text *arg1 = PG_GETARG_TEXT_PP(0); text *arg2 = PG_GETARG_TEXT_PP(1); int result; result = internal_text_pattern_compare(arg1, arg2); PG_FREE_IF_COPY(arg1, 0); PG_FREE_IF_COPY(arg2, 1); PG_RETURN_BOOL(result > 0); }
false
false
false
false
false
0
PC080SN_xscroll_word_w(int chip,offs_t offset,data16_t data,UINT32 mem_mask) { COMBINE_DATA(&PC080SN_ctrl[chip][offset]); data = PC080SN_ctrl[chip][offset]; switch (offset) { case 0x00: PC080SN_bgscrollx[chip][0] = -data; break; case 0x01: PC080SN_bgscrollx[chip][1] = -data; break; ...
false
false
false
false
false
0
snd_ice1712_pcm(struct snd_ice1712 *ice, int device) { struct snd_pcm *pcm; int err; err = snd_pcm_new(ice->card, "ICE1712 consumer", device, 1, 1, &pcm); if (err < 0) return err; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ice1712_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ic...
false
true
false
false
false
1
loadText(FILE * pFile) { int count = 0; char tmpString[256]; KBlocksReplayData tmpData; mReplayList.clear(); while(1) { count = fscanf(pFile, "%d %s %d %d", &(tmpData.time), tmpString, &(tmpData.index), &(tmpData.value)); tmpData.type = mRTMap[string(tmpString)]; if ((tmp...
false
false
false
false
false
0
giraffe_slitgeometry_print(GiSlitGeometry *self) { const cxchar *fctid = "giraffe_slitgeometry_print"; cxint i; gi_message("Current slit geometry setup"); if (self == NULL) { gi_message("Empty slit geometry!"); return; } if (self->subslits == NULL) { gi_message(fctid...
false
false
false
false
false
0
execute(void) { unsigned long dummy; TRACE("Called\n"); /* Read the instruction, we already know what it is */ Memory_RetrWordFromPC(&dummy); TRACE("Value=0x%04x, doing exception vector 4\n", dummy); /* Do an exception */ exception_do_exception(4); TRACE("Done\n"); return; }
false
false
false
false
false
0
lookup_programs(const str* path) { static str dotqmail; striter line; striter progname; const char* start; const char* end; unsigned long left; if (!ibuf_openreadclose(path->s, &dotqmail)) return -1; striter_loop(&line, &dotqmail, '\n') { /* skip over spaces preceding '|' */ for (start = li...
false
false
false
false
false
0
SetControlConnectionTranslation(const char *cs) { if(translation_activated) return; if(telnet_layer_send) { // cannot do two conversions in one DirectedBuffer, stack it. control_recv=new IOBufferStacked(control_recv.borrow()); } send_cmd_buffer.SetTranslation(cs,false); control_recv-...
false
false
false
false
false
0
NextSameSite(FA *scan) const { if(scan==0) scan=chain; else scan=scan->next; for( ; scan; scan=scan->next) if(scan!=this && SameSiteAs(scan)) return scan; return 0; }
false
false
false
false
false
0
hdlc_rx_init(hdlc_rx_state_t *s, int crc32, int report_bad_frames, int framing_ok_threshold, hdlc_frame_handler_t handler, void *user_data) { if (s == NULL) { ...
false
false
false
false
false
0
get_arrwrd_val(struct h_t *hp, p_vpi_value value_p) { int32 arri, arrwid; byte *sbp; struct net_t *np; struct xstk_t *xsp, *xsp2; /* nothing to check - stren legal */ /* DBG remove --- */ if (hp->hin_itp == NULL) __vpi_terr(__FILE__, __LINE__); /* --- */ __push_itstk(hp->hin_itp); /* notice union field...
false
false
false
false
false
0
recomputeLimits(void) { if (spectrum) { if (!absolute) mins = maxs = spectrum[0]; // else they have already been set to 0 for (int i = 1 ; i < nbSpectrumValues ; i++) { if (spectrum[i] > maxs) maxs = spectrum[i]; if (spectrum[i] < mins) mins = spectrum[i]; } // special case of the char values. ...
false
false
false
false
false
0
rule_add (GtkWidget *widget, ERuleEditor *editor) { GtkWidget *rules; GtkWidget *content_area; if (editor->edit != NULL) return; editor->edit = e_rule_editor_create_rule (editor); e_filter_rule_set_source (editor->edit, editor->source); rules = e_filter_rule_get_widget (editor->edit, editor->context...
false
false
false
false
false
0
duplicateAltInfoArray(AltInfo original[]) { int size; AltInfo *duplicate; for (size = 0; original[size].end != TRUE; size++) ; size++; duplicate = allocate(size*sizeof(AltInfo)); memcpy(duplicate, original, size*sizeof(AltInfo)); return duplicate; }
false
false
false
false
false
0
show_test_case (cairo_t *cr, CutTestCase *test_case, CutTestResultStatus status, guint n_tests, guint n_successes, guint n_failures, guint n_errors, guint n_pendings, guint n_omissions) { PangoLayout *layout; const gchar *utf8; int width, height; gdouble x, y; utf8 =...
false
false
false
false
false
0
server_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct gf_flock *lock, dict_t *xdata) { gfs3_lk_rsp rsp = {0,}; rpcsvc_request_t *req = NULL; server_state_t *state = NULL; req = frame->local; ...
false
false
false
false
false
0
Copy () { return new CGlue( _width, _height, _hshrink, _hstretch, _vshrink,_vstretch, _hshrlim, _hstrlim, _vshrlim, _vstrlim ); }
false
false
false
false
false
0
request_new (NMSecretAgent *agent, NMConnection *connection, const char *connection_path, const char *setting_name, const char **hints, guint32 flags, NMSecretAgentGetSecretsFunc get_callback, NMSecretAgentSaveSecretsFunc save_ca...
false
false
false
false
false
0
square_root(void) { double arg; arg = POPn; if (arg < 0) runtime_error(_("invalid argument in sqrt")); PSHn(sqrt(arg)); }
false
false
false
false
false
0
maybe_cancel_patrol_due_to_enemy(struct unit *punit) { bool cancel = FALSE; int radius_sq = get_unit_vision_at(punit, unit_tile(punit), V_MAIN); struct player *pplayer = unit_owner(punit); circle_iterate(unit_tile(punit), radius_sq, ptile) { struct unit *penemy = is_non_allied_unit_tile(ptile, pplayer); ...
false
false
false
false
false
0
cmp_recs(xpparam_t const *xpp, xrecord_t *r1, xrecord_t *r2) { return r1->ha == r2->ha && xdl_recmatch(r1->ptr, r1->size, r2->ptr, r2->size, xpp->flags); }
false
false
false
false
false
0
glusterd_check_voloption_flags (char *key, int32_t flags) { char *completion = NULL; struct volopt_map_entry *vmep = NULL; int ret = 0; COMPLETE_OPTION(key, completion, ret); for (vmep = glusterd_volopt_map; vmep->key; vmep++) { if (strcmp (vmep->key, key) == 0...
false
false
false
false
false
0
gsd_cursor_manager_finalize (GObject *object) { GsdCursorManager *cursor_manager; g_return_if_fail (object != NULL); g_return_if_fail (GSD_IS_CURSOR_MANAGER (object)); cursor_manager = GSD_CURSOR_MANAGER (object); g_clear_pointer (&cursor_manager->priv->monitors, g_hash_table_...
false
false
false
false
false
0
LC220__CLOSURE__dwtrans(base0) register object *base0; { register object *base=vs_base; register object *sup=base+VM224; VC224 vs_check; {object V1659; object V1660; object V1661; V1659=(base[0]); V1660=(base[1]); V1661=(base[2]); vs_top=sup; (((object)VV[77])->s.s_dbind)= (V1661); if((({register fixnum _i=(...
false
false
false
false
false
0
sync_inet_list(void) { GtkTreeModel *model; GtkTreeIter iter; InetMon *in, *in_tmp; GList *list, *new_inet_list; /* Just save all data and then later read it back in. This avoids | complicated detecting of name changes while ports the same, moving | a inet down or up slots, etc. Data is lost only if a...
false
false
false
false
false
0
rb_frozen_class_p(VALUE klass) { const char *desc = "something(?!)"; if (OBJ_FROZEN(klass)) { if (FL_TEST(klass, FL_SINGLETON)) desc = "object"; else { switch (TYPE(klass)) { case T_MODULE: case T_ICLASS: desc = "module"; break; case T_CLASS: desc = "class"; break; ...
false
false
false
false
false
0
SetTileSize(int id,const trpg2dPoint &pt) { if (id < 0 || id >= (int)tileSize.size()) return; tileSize[id] = pt; }
false
false
false
false
false
0
HasOverlapWith(GdlGlyphClassMember * pglfdLeft, GrcFont * pfont) { GdlGlyphDefn * pglfLeft = dynamic_cast<GdlGlyphDefn*>(pglfdLeft); if (m_glft == kglftPseudo) { return m_pglfOutput->HasOverlapWith(pglfdLeft, pfont); } else if (pglfLeft) { if (pglfLeft->m_glft == kglftPseudo) { return HasOverlapWith(pglf...
false
false
false
false
false
0
fade_anims() { float alpha = 255.0; int ms, i; stk_timer_reset(); if ( game->game_type == GT_LOCAL && game->winner != PADDLE_BOTTOM ) frame_remove_life(); while ( alpha > 0 ) { displays_hide(); for ( i = 0; i < game->paddle_count; i++ ) paddle_hide( game->paddles[i] ); balls_hide(); extras_hide(); s...
false
false
false
false
true
1
do_sync_push(const char *lpath, const char *rpath, int verifyApk) { struct stat st; unsigned mode; int fd; fd = adb_connect("sync:"); if(fd < 0) { fprintf(stderr,"error: %s\n", adb_error()); return 1; } if(stat(lpath, &st)) { fprintf(stderr,"cannot stat '%s': %s\n",...
false
false
false
false
false
0
read_aff_domain(struct isl_stream *s, __isl_take isl_set *dom, struct vars *v) { struct isl_token *tok; tok = isl_stream_next_token(s); if (tok && (tok->type == ISL_TOKEN_IDENT || tok->is_keyword)) { isl_stream_push_token(s, tok); return read_map_tuple(s, dom, isl_dim_set, v, 1, 0); } if (!tok || tok->type !...
false
false
false
false
false
0
scif_cleanup_scifdev(struct scif_dev *dev) { struct scif_hw_dev *sdev = dev->sdev; if (!dev->sdev) return; if (scifdev_is_p2p(dev)) { if (dev->cookie) { sdev->hw_ops->free_irq(sdev, dev->cookie, dev); dev->cookie = NULL; } scif_destroy_intr_wq(dev); } flush_work(&scif_info.misc_work); scif_destroy_...
false
false
false
false
false
0
DoMouseDown(float frametime) { OwnerSystem->SetActiveObject(this); if ( (OwnerSystem->GetMouseX() >= CheckCoords[0]) && (OwnerSystem->GetMouseX() <= CheckCoords[2]) && (OwnerSystem->GetMouseY() >= CheckCoords[1]) && (OwnerSystem->GetMouseY() <= CheckCoords[3]) ) { HighlightStatus = 2; } return OF_TRUE; }
false
false
false
false
false
0
krb5_rc_free_entry(krb5_context context, krb5_donot_replay **rep) { krb5_donot_replay *rp = *rep; *rep = NULL; if (rp) { if (rp->client) free(rp->client); if (rp->server) free(rp->server); if (rp->msghash) free(rp->msghash); rp->client...
false
false
false
false
false
0
volume_set(gpointer data, const char *param) { int cur_volume = mpd_status_get_volume(connection); /* if volume is disabled (current_volume < 0) ignore this command */ if (strlen(param) > 0 && current_volume >= 0) { int volume = 0; if (param[0] == '-' || param[0] == '+') { volume = cur_volume; } volume...
false
false
false
false
false
0
wl1273_fm_vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *capability) { struct wl1273_device *radio = video_get_drvdata(video_devdata(file)); dev_dbg(radio->dev, "%s\n", __func__); strlcpy(capability->driver, WL1273_FM_DRIVER_NAME, sizeof(capability->driver)); strlcpy(capability-...
false
false
false
false
false
0
mq_dirty_inode_readdir (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, fd_t *fd) { quota_local_t *local = NULL; local = frame->local; if...
false
false
false
false
false
0
m_emit_def (pIIR_RecordType t) { printf("struct {\n"); for (pIIR_ElementDeclarationList elts = t->element_declarations; elts; elts = elts->rest) { pIIR_ElementDeclaration re = elts->first; printf (" "); emit (re->subtype); printf (" "); emit_id (re->declarator); print...
false
false
false
false
false
0
fso_gsm_sms_storage_factory_create (const gchar* type, const gchar* imsi) { FsoGsmISmsStorage* result = NULL; FsoGsmISmsStorage* storage = NULL; const gchar* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; GQuark _tmp3_ = 0U; static GQuark _tmp2_label0 = 0; g_return_val_if_fail (type != NULL, NULL); g_return_val_if_...
false
false
false
false
false
0
bad_path(p) register char *p; { while (*p) { if (p[0] == '.' && ((p[1] == '/' || p[1] == '.') && p[2] == '/')) return TRUE; while (*p && *p != '/') p++; if (p[0] == '/' && p[1] == '/') return TRUE; if (*p == '/') p++; } return FALSE; }
false
false
false
false
false
0
slurmdb_sort_hierarchical_assoc_list(List assoc_list) { List slurmdb_hierarchical_rec_list = slurmdb_get_acct_hierarchical_rec_list(assoc_list); /* Clear all the pointers out of the list without freeing the memory since we will just add them back in later. */ while(list_pop(assoc_list)) { } _append_hierarc...
false
false
false
false
false
0
pickTileContigCase(const RGBvalue*) { tileContigRoutineIv put = 0; switch (photometric_) { case PHOTOMETRIC_RGB: if (bitspersample_ == 8) { put = &TIFFRasterImpl::putRGBcontig8bittile; } else { put = &TIFFRasterImpl::putRGBcontig16bittile; } break; case PHOTOMETRIC_PALETTE: switch (bitspe...
false
false
false
false
false
0
db_output_dumpvars( FILE* vfile /*!< Pointer to file to output dumpvars output to */ ) { PROFILE(DB_OUTPUT_DUMPVARS); inst_link* instl = db_list[curr_db]->inst_head; while( instl != NULL ) { instance_output_dumpvars( vfile, instl->inst ); instl = instl->next; } PROFILE_END; }
false
false
false
false
false
0
_si5351_msynth_reparent(struct si5351_driver_data *drvdata, int num, enum si5351_multisynth_src parent) { if (parent == SI5351_MULTISYNTH_SRC_DEFAULT) return 0; if (num > 8) return -EINVAL; si5351_set_bits(drvdata, SI5351_CLK0_CTRL + num, SI5351_CLK_PLL_SELECT, (parent == SI5351_MULTISYNTH_SRC_VCO0) ...
false
false
false
false
false
0
PyvtkOctreePointLocator_FindClosestPoint_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "FindClosestPoint"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkOctreePointLocator *op = static_cast<vtkOctreePointLocator *>(vp); double temp0; double temp1; double temp2; double temp3; ...
false
false
false
false
false
0
ixgb_configure_rx(struct ixgb_adapter *adapter) { u64 rdba = adapter->rx_ring.dma; u32 rdlen = adapter->rx_ring.count * sizeof(struct ixgb_rx_desc); struct ixgb_hw *hw = &adapter->hw; u32 rctl; u32 rxcsum; /* make sure receives are disabled while setting up the descriptors */ rctl = IXGB_READ_REG(hw, RCTL); I...
false
false
false
false
false
0
read_metadata_picture_(FLAC__StreamDecoder *decoder, FLAC__StreamMetadata_Picture *obj) { FLAC__uint32 x; FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); /* read type */ if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_TYPE_LEN)) r...
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &MF) { AFI = MF.getInfo<ARMFunctionInfo>(); MCP = MF.getConstantPool(); Subtarget = &MF.getSubtarget<ARMSubtarget>(); SetupMachineFunction(MF); if (Subtarget->isTargetCOFF()) { bool Internal = MF.getFunction()->hasInternalLinkage(); COFF::SymbolStorageClass Scl =...
false
false
false
false
false
0
server_readv (rpcsvc_request_t *req) { server_state_t *state = NULL; call_frame_t *frame = NULL; gfs3_read_req args = {{0,},}; int ret = -1; int op_errno = 0; if (!req) goto out; if (!xdr_to_generic (req->msg[0], &a...
false
false
false
false
false
0
actor_run (edict_t *self) { if ((level.time < self->pain_debounce_time) && (!self->enemy)) { if (self->movetarget) actor_walk(self); else actor_stand(self); return; } if (self->monsterinfo.aiflags & AI_STAND_GROUND) { actor_stand(self); return; } self->monsterinfo.currentmove = &actor_move_run;...
false
false
false
false
false
0
_gss_asn1_length_der (size_t len, unsigned char *ans, size_t * ans_len) { size_t k; unsigned char temp[sizeof (len)]; if (len < 128) { if (ans != NULL) ans[0] = (unsigned char) len; *ans_len = 1; } else { k = 0; while (len) { temp[k++] = len & 0xFF; len = len >> 8; ...
false
false
false
false
false
0
validate_name(const char *n) { register char c; register int len = 0; if (!n || !*n) return 0; /* Hyphen used as VG-LV separator - ambiguity if LV starts with it */ if (*n == '-') return 0; if (!strcmp(n, ".") || !strcmp(n, "..")) return 0; while ((len++, c = *n++)) if (!isalnum(c) && c != '.' && c !...
false
false
false
false
false
0
parse_search_string(char * search_string, char search_separator, char field_separator, int start_index, char * search, char * fieldname) { int i = start_index; int j = 0, k = 0; int reading_fieldname = 0; while (i < strlen(search_string)) { if (...
false
false
false
false
false
0
gtf_show_transcript(GtFeatureNode *feature_node, GtGTFVisitor *gtf_visitor, GtError *err) { GtFeatureNode *fn; unsigned long i; int had_err; gt_error_check(err); gt_assert(feature_node && gtf_visitor); gt_array_reset(gtf_visitor->exon_features); gt_array_reset(gtf_visitor->C...
false
false
false
false
false
0
tei_id_assign(struct FsmInst *fi, int event, void *arg) { struct teimgr *tm = fi->userdata; struct layer2 *l2; u_char *dp = arg; int ri, tei; ri = ((unsigned int) *dp++ << 8); ri += *dp++; dp++; tei = *dp >> 1; if (*debug & DEBUG_L2_TEI) tm->tei_m.printdebug(fi, "identity assign ri %d tei %d", ri, ...
false
false
false
false
false
0
processLine(imap &imapAccount, std::vector<const char *> &words) { if (words.size() > 0 && ready2send && strncmp(words[0], ">", 1) == 0) { ready2send=false; WriteTmpFile *w=new WriteTmpFile(this); if (!w) LIBMAIL_THROW(strerror(errno)); w->tfile=tfile; tfile=NULL; w->tfilebytecount=tfilebytecount...
false
false
false
false
false
0
update_icons(FmPlacesModel* model) { GtkTreeIter it; FmIcon* icon; GdkPixbuf* pix; /* update the eject icon */ icon = fm_icon_from_name("media-eject"); pix = fm_pixbuf_from_icon(icon, fm_config->pane_icon_size); g_object_unref(icon); if(model->eject_icon) g_object_unref(model->e...
false
false
false
false
false
0
tell_server ( ) { if (selected < 0) return; unsigned char buf[Exult_server::maxlength]; unsigned char *ptr = &buf[0]; Write2(ptr, info[selected].num); ExultStudio *studio = ExultStudio::get_instance(); studio->send_to_server(Exult_server::set_edit_chunknum, buf, ptr - buf); }
false
false
false
false
false
0
MomentaryUseTool (const char* keyCode, Event& e) { Tool* curTool= _editor->GetCurTool(); const char* origCode = curTool->GetControlInfo()->GetKeyCode(); KeyMap* keymap = _editor->GetKeyMap(); if (strcmp(origCode, keyCode) == 0) { UseTool(CurTool(), e); /* already using this tool */ } else { ...
false
false
false
false
false
0
ast_aoc_create(const enum ast_aoc_type msg_type, const enum ast_aoc_charge_type charge_type, const enum ast_aoc_request requests) { struct ast_aoc_decoded *decoded = NULL; /* verify input */ if (((unsigned int) charge_type > AST_AOC_CHARGE_UNIT) || ((unsigned int) msg_type > AST_AOC_E) || ((msg_type == AST_...
false
false
false
false
false
0
__target_check_io_state(struct se_cmd *se_cmd, struct se_session *tmr_sess, int tas) { struct se_session *sess = se_cmd->se_sess; assert_spin_locked(&sess->sess_cmd_lock); WARN_ON_ONCE(!irqs_disabled()); /* * If command already reached CMD_T_COMPLETE state within * target_complete_cmd() or CMD_T_FABRIC...
false
false
false
false
false
0
readwrite_device(int64_t dev_offset, unsigned requested_data_size, unsigned *actual_data_size, void *data_buffer, int mode) { int rwdb_rc = 0; if ((dev_offset % Dev_SectorSize) || (requested_data_size % Dev_SectorSize)) { rwdb_rc = FSCK_FAILED_SEEK; } else { switch (mode) { case fsck_READ: ...
false
false
false
false
false
0
xmpp_buddy_move(HybridAccount *account, HybridBuddy *buddy, HybridGroup *new_group) { XmppBuddy *xbuddy; XmppStream *stream; stream = hybrid_account_get_protocol_data(account); if (!(xbuddy = xmpp_buddy_find(stream->account, buddy->id))) { return FALSE; } if (xmpp_bud...
false
false
false
false
false
0