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
it821x_smart_set_mode(struct ata_link *link, struct ata_device **unused) { struct ata_device *dev; ata_for_each_dev(dev, link, ENABLED) { /* We don't really care */ dev->pio_mode = XFER_PIO_0; dev->dma_mode = XFER_MW_DMA_0; /* We do need the right mode information for DMA or PIO and this comes from the ...
false
false
false
false
false
0
escapeXML () { size_t incr = 0; char * ptr = m_psz; while (ptr < m_pEnd) { if ((*ptr == '<') || (*ptr == '>')) incr += 3; else if (*ptr == '&') incr += 4; else if (*ptr == '"') incr += 5; ptr++; } bool bInsert = grow (incr); ptr = m_psz; while (ptr < m_pEnd) { if (*ptr == '<') { if...
false
false
false
false
false
0
gs_glyph_cache__release(void *data, void *event) { gs_glyph_cache *self = (gs_glyph_cache *)data; gs_glyph_cache_elem *e = self->list; gs_font_type42 *pfont = self->pfont; while (e != NULL) { gs_glyph_cache_elem *next_e; next_e = e->next; e->gd.procs->free(&e->gd, "gs_glyph_cac...
false
false
false
false
false
0
tm_log_emit (void) { htab_iterator hi; struct tm_log_entry *lp; FOR_EACH_HTAB_ELEMENT (tm_log, lp, tm_log_entry_t, hi) { size_t i; gimple stmt; if (dump_file) { fprintf (dump_file, "TM thread private mem logging: "); print_generic_expr (dump_file, lp->addr, 0); fprintf (dump_file...
false
false
false
false
false
0
calculate_it92_factor(const t_it92_coeff *p, double stol2) { int i; double sf = p->c; for (i = 0; i < 4; i++) sf += p->a[i] * exp(-p->b[i] * stol2); return sf; }
false
false
false
false
false
0
gdl_dock_notebook_dock (GdlDockObject *object, GdlDockObject *requestor, GdlDockPlacement position, GValue *other_data) { g_return_if_fail (GDL_IS_DOCK_NOTEBOOK (object)); g_return_if_fail (GDL_IS_DOCK_ITEM (requestor)); ...
false
false
false
false
false
0
createEdges(DynamicArray<float>& points, ScanLineList* scanLineList, int winding) { // Make sure path is closed points.add(points[0]); points.add(points[1]); vplUint numPoints = points.getItemCount()/2; // Make sure we...
false
false
false
false
false
0
drv_NULL_init(const char *section, const __attribute__ ((unused)) int quiet) { WIDGET_CLASS wc; int ret; info("%s: %s", Name, "$Rev: 975 $"); /* display preferences */ XRES = 6; /* pixel width of one char */ YRES = 8; /* pixel height of one char */ CHARS = 8; /* number of user-...
false
false
false
false
false
0
expression_op_func__cond( expression* expr, /*!< Pointer to expression to perform operation on */ /*@unused@*/ thread* thr, /*!< Pointer to thread containing this expression */ /*@unused@*/ const sim_time* time /*!< Pointer to current simulation time */ ) { PROFILE(EXPRESSION_OP_FUNC...
false
false
false
false
false
0
EndModal(int retCode) { // valid only while in a ShowDialog() call if (s_ActiveDialog) { s_ActiveDialog->EndModal(retCode); return; } cbMessageBox(_("EndModal() only valid while inside a ShowDialog() call..."), _("Error"), wxICON_ERROR); }
false
false
false
false
false
0
IntrFloatExpr ( Char * str ) { Obj val; UInt len; /* ignore or code */ if ( IntrReturning > 0 ) { return; } if ( IntrIgnoring > 0 ) { return; } if ( IntrCoding > 0 ) { CodeFloatExpr( str ); return; } ...
false
true
false
false
false
1
vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, int codingset) { GetBitContext *gb = &v->s.gb; int index, escape, run = 0, level = 0, lst = 0; index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3); if (index != vc1_ac_sizes[codingset] - 1) { run = vc1...
false
false
false
false
false
0
intel_execlists_submission(struct i915_execbuffer_params *params, struct drm_i915_gem_execbuffer2 *args, struct list_head *vmas) { struct drm_device *dev = params->dev; struct intel_engine_cs *ring = params->ring; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_ringbuff...
false
false
false
false
false
0
computed_goto(unsigned int new_address) { printf("dspic %s.\n",__FUNCTION__); dspic::gTrace->raw(trace_other | (value<<1)); // Use the new_address and the cached pclath (or page select bits // for 12 bit cores) to generate the destination address: value = (new_address >>1); value = (value ...
false
false
false
false
false
0
process_state_r(t30_state_t *s, const uint8_t *msg, int len) { switch (msg[2] & 0xFE) { case T30_DIS: process_rx_dis_dtc(s, msg, len); break; case T30_DCS: process_rx_dcs(s, msg, len); break; case T30_DCN: /* Received a DCN while waiting for a DIS */ s...
false
false
false
false
false
0
GetPublicHub( CString name, DCConfigHubItem * hubitem ) { bool err = false; DCConfigHubItem * hubitem1; if ( !hubitem ) { return err; } hubitem1 = 0; m_Mutex.Lock(); if ( pPublicHubList->Get(name.ToUpper(),&hubitem1) == 0 ) { // update hubitem->m_sName = hubitem1->m_sName; hubitem->m_sHost ...
false
false
false
false
false
0
done_group() { if(!dc->isNull()) { BigInteger p, q, g; dc->getResult(&p, &q, &g); group = DLGroup(p, q, g); } delete dc; dc = 0; if(!wasBlocking) emit parent->finished(); }
false
false
false
false
false
0
get_foreign_key_create_info(void) /*==========================================*/ { char* str = 0; long flen; ut_a(prebuilt != NULL); /* We do not know if MySQL can call this function before calling external_lock(). To be safe, update the thd of the current table handle. */ update_thd(ha_thd()); prebuilt->tr...
false
false
false
false
false
0
cs2_pack_byte (cs2_t * s, SANE_Byte byte) { while (s->send_buf_size <= s->n_send) { s->send_buf_size += 16; s->send_buf = (SANE_Byte *) cs2_xrealloc (s->send_buf, s->send_buf_size); if (!s->send_buf) return SANE_STATUS_NO_MEM; } s->send_buf[s->n_send++] = byte; return SANE_STATUS_GOO...
false
false
false
false
false
0
unpack_comm(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { partner[i] = static_cast<int> (buf[m++]); probability[i] = buf[m++]; } }
false
false
false
false
false
0
gms_hint_arrange_windows (int requested_lines, glui32 * width, glui32 * height) { if (gms_hint_windows_available ()) { winid_t parent; /* Resize the hint menu window to fit the current hint. */ parent = glk_window_get_parent (gms_hint_menu_window); glk_window_set_arrangement (pare...
false
false
false
false
false
0
atsopt_filename_append ( ats_ptr_type dir, ats_ptr_type bas ) { int n1, n2, n ; char dirsep, *dirbas ; // dirsep = atsopt_filename_theDirSep_get () ; // n1 = strlen ((char*)dir) ; n2 = strlen ((char*)bas) ; n = n1 + n2 ; if (n1 > 0 && ((char*)dir)[n1-1] != dirsep) n += 1 ; dirbas = ATS_MALLOC (n + 1) ...
false
true
false
false
false
1
wbsd_shutdown(struct device *dev, int pnp) { struct mmc_host *mmc = dev_get_drvdata(dev); struct wbsd_host *host; if (!mmc) return; host = mmc_priv(mmc); mmc_remove_host(mmc); /* * Power down the SD/MMC function. */ if (!pnp) wbsd_chip_poweroff(host); wbsd_release_resources(host); wbsd_free_mmc(d...
false
false
false
false
false
0
snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream) { int bytes_per_sample, bpp, ret, i; int index = substream->number; struct snd_usb_caiaqdev *cdev = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct device *dev = caiaqdev_to_dev(cdev); dev_dbg(dev, "%s(...
false
false
false
false
false
0
irc_send_privmsg(const char *recipient, char *message, irc_account *ia) { char *out_msg; int offset = 0; char buff[BUF_LEN]; memset(buff, 0, BUF_LEN); int type = 0; if (!message) return IRC_NOECHO; while (message[offset] == ' ' || message[offset] == '\t') offset++; if (message[offset] == '/') { char *p...
true
true
false
false
false
1
build_duplicate_type (tree type) { struct copy_body_data id; memset (&id, 0, sizeof (id)); id.src_fn = current_function_decl; id.dst_fn = current_function_decl; id.src_cfun = cfun; id.decl_map = pointer_map_create (); id.debug_map = NULL; id.copy_decl = copy_decl_no_change; type = remap_type_1 (type...
false
false
false
false
false
0
getSyntaxerForLanguage(QString language) { Syntaxer * syntaxer = m_syntaxers.value(language, NULL); if (syntaxer == NULL) { syntaxer = new Syntaxer(); if (syntaxer->loadSyntax(m_languages.value(language))) { m_syntaxers.insert(language, syntaxer); } } return m_syntaxers.value(language, NULL); }
false
false
false
false
false
0
stlg_nth_member(const SuperTlg *stlg, int n) { if (stlg_is_tlg(stlg)) return NULL; if (stlg_is_sb(stlg)) { if (n == 0) return stlg->callee; else return NULL; } return list_nth_data(stlg->members, n); }
false
false
false
false
false
0
ucma_disconnect(struct ucma_file *file, const char __user *inbuf, int in_len, int out_len) { struct rdma_ucm_disconnect cmd; struct ucma_context *ctx; int ret; if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; ctx = ucma_get_ctx(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); re...
false
false
false
false
false
0
_model_picture_added (FrogrController *controller, FrogrPicture *picture, gpointer data) { FrogrMainView *self = FROGR_MAIN_VIEW (data); FrogrMainViewPrivate *priv = FROGR_MAIN_VIEW_GET_PRIVATE (self); GdkPixbuf *pixbuf = NULL; const gchar *fileuri = NULL; GtkTreeIt...
false
false
false
false
false
0
gst_ebml_writer_send_new_segment_event (GstEbmlWrite * ebml, guint64 new_pos) { gboolean res; GST_INFO ("seeking to %" G_GUINT64_FORMAT, new_pos); res = gst_pad_push_event (ebml->srcpad, gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, new_pos, -1, 0)); if (!res) GST_WARNING ("seek to %" G_...
false
false
false
false
false
0
gschem_accel_label_get_accel_width (GschemAccelLabel *accel_label) { g_return_val_if_fail (GSCHEM_IS_ACCEL_LABEL (accel_label), 0); return (accel_label->accel_string_width + (accel_label->accel_string_width ? accel_label->accel_padding : 0)); }
false
false
false
false
false
0
show_pwm_temp_sel_common(struct nct6775_data *data, char *buf, int src) { int i, sel = 0; for (i = 0; i < NUM_TEMP; i++) { if (!(data->have_temp & (1 << i))) continue; if (src == data->temp_src[i]) { sel = i + 1; break; } } return sprintf(buf, "%d\n", sel); }
false
true
false
false
false
1
spiciralloue( cir, taille ) circuit *cir; int taille; { void *pt; if(!cir) { fflush( stdout ); fprintf( stderr, "*** mbkspi internal error *** : spiciralloue()\n" ); EXIT(1); } pt = mbkalloc( taille ); cir->FREE = addchain( cir->FREE, pt ); cir->TAILLE = cir->TAILLE + taille ; return( ...
false
false
false
false
false
0
totem_is_special_mrl (const char *uri) { GMount *mount; if (uri == NULL || g_str_has_prefix (uri, "file:") != FALSE) return FALSE; if (g_str_has_prefix (uri, "dvb:") != FALSE) return TRUE; mount = totem_get_mount_for_media (uri); if (mount != NULL) g_object_unref (mount); return (mount != NULL); }
false
false
false
false
false
0
duplInheritedMembersError(const Token *tok1, const Token* tok2, const std::string &derivedname, const std::string &basename, const std::string &variablename, bool derivedIsStruct, bool baseIsStruct) { std::list<const Token *> toks; toks.push_back(tok1); toks.push_back(tok2); const std::...
false
false
false
false
false
0
mod_state(struct zone *zone, enum zone_stat_item item, long delta, int overstep_mode) { struct per_cpu_pageset __percpu *pcp = zone->pageset; s8 __percpu *p = pcp->vm_stat_diff + item; long o, n, t, z; do { z = 0; /* overflow to zone counters */ /* * The fetching of the stat_threshold is racy. We ...
false
false
false
false
false
0
discard_stream(int s, servtab_t *sep UNUSED_PARAM) { #if BB_MMU while (safe_read(s, line, LINE_SIZE) > 0) continue; #else /* We are after vfork here! */ /* move network socket to stdin */ xmove_fd(s, STDIN_FILENO); /* discard output */ close(STDOUT_FILENO); xopen(bb_dev_null, O_WRONLY); /* no error messages p...
false
false
false
false
false
0
FcTypecheckExpr (FcConfigParse *parse, FcExpr *expr, FcType type) { const FcObjectType *o; const FcConstant *c; /* If parsing the expression failed, some nodes may be NULL */ if (!expr) return; switch (FC_OP_GET_OP (expr->op)) { case FcOpInteger: case FcOpDouble: FcTypecheckValue (parse,...
false
false
false
false
false
0
diff_filter_context(int context, int upper_bound, int lower_bound, xmlNode * xml_node, xmlNode * parent) { xmlNode *us = NULL; xmlNode *child = NULL; xmlAttrPtr pIter = NULL; xmlNode *new_parent = parent; const char *name = crm_element_name(xml_node); CRM_CHECK(xml_node != N...
false
false
false
false
false
0
tick_to_seconds (int tick) { int i,ind = 0; float seconds; float delta; for (i = 0; i < temposize; i++) { ind = i; if (tick < tempo_array[ind].tick) break; } if (tick < tempo_array[ind].tick) { delta = (float) (tick -tempo_array[ind-1].tick) * (float) tempo_array[ind-1].tempo / ...
false
false
false
false
false
0
float_approx (const cl_R& x) { realcase6(x , return float_approx(x); , return float_approx(x); , return float_approx(x); , return float_approx(x); , return float_approx(x); , return float_approx(x); ); } }
false
false
false
false
false
0
create_send_rtp_sink (GstRtpSession * rtpsession) { GST_DEBUG_OBJECT (rtpsession, "creating pad"); rtpsession->send_rtp_sink = gst_pad_new_from_static_template (&rtpsession_send_rtp_sink_template, "send_rtp_sink"); gst_pad_set_chain_function (rtpsession->send_rtp_sink, gst_rtp_session_chain_sen...
false
false
false
false
false
0
bool_nextlen(const char *expr, int len) { int i, depth; if (!len) return -1; i = 0; if (expr[i] == '~') { i++; if (i >= len) return -1; } if (expr[i] == '(') { if (i+2 >= len) return -1; i++; for (depth = 1; depth && i < len; i++) { if (expr[i] == '(') depth++; else if (expr[i] == ')') de...
false
false
false
false
false
0
update_left_conflict_sizes_p (ira_allocno_t a, ira_allocno_t removed_a, int size) { int i, conflict_size, before_conflict_size, diff, start; int node_preorder_num, parent_i; allocno_hard_regs_node_t node, removed_node, parent; allocno_hard_regs_subnode_t subnodes; allocno_color_data_t data = ALLOCNO_...
false
false
false
false
false
0
tei_id_remove(struct FsmInst *fi, int event, void *arg) { struct PStack *st = fi->userdata; struct sk_buff *skb = arg; struct IsdnCardState *cs; int tei; tei = skb->data[4] >> 1; if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, "identity remove tei %d", tei); if ((st->l2.tei != -1) && ((tei == GR...
false
false
false
false
false
0
PyFFGlyph_preserveLayer(PyFF_Glyph *self, PyObject *args) { int layer = self->layer, dohints=false; if ( !PyArg_ParseTuple(args,"|ii", &layer, &dohints ) ) return( NULL ); _SCPreserveLayer(self->sc,layer,dohints); Py_RETURN( self ); }
false
false
false
false
false
0
gog_graph_finalize (GObject *obj) { GogGraph *graph = GOG_GRAPH (obj); GSList *tmp; tmp = graph->data; graph->data = NULL; g_slist_foreach (tmp, (GFunc) g_object_unref, NULL); g_slist_free (tmp); /* on exit the role remove routines are not called */ g_slist_free (graph->charts); if (graph->idle_handler != 0...
false
false
false
false
false
0
removeAllUnsetValues(bool isRemovingUnsetSectionsOnly) { std::list<ArConfigSection *> *sections; ArConfigSection *section; std::list<ArConfigSection *>::iterator sectionIt; std::list<ArConfigArg> *params; ArConfigArg *param; std::list<ArConfigArg>::iterator paramIt; std::list<std::list<ArConfigArg>::it...
false
false
false
false
false
0
xfrm_state_flag_parse(__u8 *flags, int *argcp, char ***argvp) { int argc = *argcp; char **argv = *argvp; int len = strlen(*argv); if (len > 2 && strncmp(*argv, "0x", 2) == 0) { __u8 val = 0; if (get_u8(&val, *argv, 16)) invarg("FLAG value is invalid", *argv); *flags = val; } else { while (1) { if (...
false
false
false
false
false
0
AddEmptyPowerPIN(asName) char *asName; { ePIN_t *pPIN; char Use; Use = C_USE_NONE; if (!strncmp(asName, "vdd", 3)) Use = C_USE_POWER; if (!strncmp(asName, "vss", 3)) Use = C_USE_GROUND; if ((pPIN = getPIN(LV_pMACRO, asName)) == (ePIN_t*)NULL) { m_AddPin(LV_pMACRO->lPIN, asName); LV_pMACRO->...
false
false
false
false
false
0
set_first_time_flag(void) { GSettings *gsettings; gsettings = g_settings_new ("org.gnome.gnomeradio"); g_settings_set_boolean(gsettings, "first-time-flag", TRUE); g_clear_object (&gsettings); }
false
false
false
false
false
0
dot_prodchar3( const S_CHAR a[], const S_CHAR b[] ) { int prod = ((int)a[0]*(int)b[0] + (int)a[1]*(int)b[1] + (int)a[2]*(int)b[2])/100; if ( prod > 100 ) prod = 100; else if ( prod < -100 ) prod = -100; return prod; }
false
false
false
false
false
0
discovery_fw(void *data, struct iface_rec *iface, struct list_head *rec_list) { struct discovery_rec *drec = data; struct boot_context *bcontext; struct list_head targets; struct node_rec *rec; int rc; INIT_LIST_HEAD(&targets); rc = fw_get_targets(&targets); if (rc) { log_error("Could not get list of targ...
false
false
false
false
false
0
print_live_ranges (FILE *f) { ira_allocno_t a; ira_allocno_iterator ai; FOR_EACH_ALLOCNO (a, ai) print_allocno_live_ranges (f, a); }
false
false
false
false
false
0
sbc_parse_change_state(GstElement *element, GstStateChange transition) { GstSbcParse *parse = GST_SBC_PARSE(element); switch (transition) { case GST_STATE_CHANGE_READY_TO_PAUSED: GST_DEBUG("Setup subband codec"); parse->channels = -1; parse->rate = -1; parse->first_parsing = TRUE; sbc_init(&parse-...
false
false
false
false
false
0
try_match_anywhere(term *t, term *r, reactionrule *rl, match *m) { set<match *> matches; if(DEBUG) cout << "matcher::try_match_anywhere: " << m->to_string() << endl; term *p = t->next(); while(p != NULL) { if(DEBUG) cout << "p: " << p->to_string() << ": "; if(p->parent == NULL || p->parent->active_context()...
false
false
false
false
false
0
jsonp_error_set_source(json_error_t *error, const char *source) { size_t length; if(!error || !source) return; length = strlen(source); if(length < JSON_ERROR_SOURCE_LENGTH) strcpy(error->source, source); else { size_t extra = length - JSON_ERROR_SOURCE_LENGTH + 4; ...
false
true
false
false
false
1
ui_window_focus(UiWin *w) { UiCursesWin *win = (UiCursesWin*)w; UiCursesWin *oldsel = win->ui->selwin; win->ui->selwin = win; if (oldsel) ui_window_draw_status((UiWin*)oldsel); ui_window_draw_status(w); }
false
false
false
false
false
0
CompareWorkWhenIdle(const wxString& strFirst, const wxString& strSecond) { long lFirstValue; long lSecondValue; // Convert to numbers strFirst.ToLong(&lFirstValue); strSecond.ToLong(&lSecondValue); // Is lFirstValue larger than lSecondValue? if (lFirstValue > lSecondValue) return 1; /...
false
false
false
false
false
0
expint(double n, double z) { double y; /* the answer */ { /* Test for admissibility of arguments */ double junk; if (n < 0 || z < 0 || modf(n,&junk)) return -1.0; if (z == 0 && n < 2) return -1.0; } /* special cases */ if (n == 0) return exp(-z)/z; if (z == 0) return ...
false
false
false
false
false
0
isErodedCompletely(const LinearRing *ring, double bufferDistance) { const CoordinateSequence *ringCoord = ring->getCoordinatesRO(); // degenerate ring has no area if (ringCoord->getSize() < 4) return bufferDistance < 0; // important test to eliminate inverted triangle bug // also optimizes erosion test for tr...
false
false
false
false
false
0
setup_original_colormap (struct state *st, XWindowAttributes *xgwa) { XGCValues gcv; int lose = 0; int n; XColor *colors = (XColor *) calloc (sizeof(*colors), st->count*2); colors[0].pixel = get_pixel_resource (st->dpy, xgwa->colormap, "background", "Ba...
false
false
false
false
false
0
load(const std::string &name) { //Note: assumes screen 0 for now, changes on draw if needed Display *disp = App::instance()->display(); XftFont *newxftfont = XftFontOpenXlfd(disp, 0, name.c_str()); if (newxftfont == 0) { newxftfont = XftFontOpenName(disp, 0, name.c_str()); if (newxftfo...
false
false
false
false
false
0
faceNormal (int faceCentre [3]) { LOOP (i, nAxes) { if (abs(faceCentre [i]) == sizes [i]) { return i; } } return 0; }
false
false
false
false
false
0
CloseDependentDatasets() { int bRet = GDALPamDataset::CloseDependentDatasets(); if( nInternalOverviewsToFree ) { bRet = TRUE; for(int i = 0; i < nInternalOverviewsToFree; i++) delete papoInternalOverviews[i]; CPLFree(papoInternalOverviews); papoInternalOverviews =...
false
false
false
false
false
0
irq_handler(int irq, void *dev_id) { struct ddb *dev = (struct ddb *) dev_id; u32 s = ddbreadl(INTERRUPT_STATUS); if (!s) return IRQ_NONE; do { ddbwritel(s, INTERRUPT_ACK); if (s & 0x00000001) irq_handle_i2c(dev, 0); if (s & 0x00000002) irq_handle_i2c(dev, 1); if (s & 0x00000004) irq_handle_i2...
false
false
false
false
false
0
CSLFetchNameValue(char **papszStrList, const char *pszName) { int nLen; if (papszStrList == NULL || pszName == NULL) return NULL; nLen = strlen(pszName); while(*papszStrList != NULL) { if (EQUALN(*papszStrList, pszName, nLen) && ( (*papszStrList)[nLen] == '=' || ...
false
false
false
false
false
0
MR_iterateOverTreeContexts(Tree *t,int chain[]) #else void MR_iterateOverTreeContexts(t,chain) Tree *t; int chain[]; #endif { if (t == NULL) return; chain[0]=t->token; if (t->down != NULL) { MR_iterateOverTreeContexts(t->down,&chain[1]); } else { MR_merge_tree_contexts_client(merg...
false
false
false
false
false
0
window_wm_toolbar_snap (void) { GdkRectangle appframe, tbframe; int x, y; if (!wm_toolbar) return FALSE; gdk_window_get_frame_extents (app->window, &appframe); gdk_window_get_frame_extents (wm_toolbar->window, &tbframe); GdkRectangle monitor; gdk_screen_get_monitor_geometry (((GtkWindow *)app)->scr...
false
false
false
false
false
0
windows_private_get_windows_filter(const Repl_Agmt *ra) { Dirsync_Private *dp; LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_windows_filter\n" ); PR_ASSERT(ra); dp = (Dirsync_Private *) agmt_get_priv(ra); PR_ASSERT (dp); if (dp->windows_filter == NULL) { const char *userfilter = windows_private_...
false
false
false
false
false
0
filterCoveredNodeToPoint(const Node *n) { const Coordinate& coord=n->getCoordinate(); if(!op->isCoveredByLA(coord)) { Point *pt=geometryFactory->createPoint(coord); resultPointList->push_back(pt); } }
false
false
false
false
false
0
data(const QModelIndex& index, int role = Qt::DisplayRole) const { if (!index.isValid()) return QVariant(); if (m_Languages.empty()) return QVariant(); int idx = qMin(index.row(), m_Languages.size()); const Language &l = m_Languages[idx]; if (role == ...
false
false
false
false
false
0
filename_get_path(const gchar *filename){ if (!filename) return NULL; GFile *file= g_file_new_for_commandline_arg(filename); gchar *file_path= g_file_get_path (file); g_object_unref(file); return file_path; }
false
false
false
false
false
0
getOutputDir(const char* filename, plPageInfo* page) { plString name = filename; if (name.rfind(SLASH) >= 0) name = name.left(name.rfind(SLASH) + 1); else name = ""; return name + page->getAge() + "_PRC" + SLASH; }
false
false
false
false
false
0
debug_kusage(void) { struct debug_alloc_header *h_free, *h_used; #ifdef CONFIG_IA64 /* FIXME: using dah for ia64 unwind always results in a memory leak. * Fix that memory leak first, then set debug_kusage_one_time = 1 for * all architectures. */ static int debug_kusage_one_time; #else static int debug_kusage_...
false
false
false
false
false
0
methodString() const { if (!methodStringOverride.isEmpty()) return (methodStringOverride).toLatin1(); switch(method) { case HTTP_GET: return "GET"; case HTTP_PUT: return "PUT"; case HTTP_POST: return "POST"; case HTTP_HEAD: return "HEAD"; case HTTP_DE...
false
false
false
false
false
0
object_new (Object_Type type) { struct free_list_el *el; Event_Type event = 0; size_t obj_size; Any_Type arg; Object *obj; obj_size = type_size[type]; if (free_list[type]) { el = free_list[type]; free_list[type] = el->next; obj = (Object *) el; } else { obj = malloc...
false
false
false
false
false
0
getVisibilityFlags() const { if(mRegionMap.empty()) return MovableObject::getDefaultVisibilityFlags(); RegionMap::const_iterator ri = mRegionMap.begin(); return ri->second->getVisibilityFlags(); }
false
false
false
false
false
0
mt7601u_bbp_rr(struct mt7601u_dev *dev, u8 offset) { u32 val; int ret = -ETIMEDOUT; if (WARN_ON(!test_bit(MT7601U_STATE_WLAN_RUNNING, &dev->state))) return -EINVAL; if (test_bit(MT7601U_STATE_REMOVED, &dev->state)) return 0xff; mutex_lock(&dev->reg_atomic_mutex); if (!mt76_poll(dev, MT_BBP_CSR_CFG, MT_BBP_...
false
false
false
false
false
0
isl_qpolynomial_fold_realign_domain( __isl_take isl_qpolynomial_fold *fold, __isl_take isl_reordering *r) { int i; fold = isl_qpolynomial_fold_cow(fold); if (!fold || !r) goto error; for (i = 0; i < fold->n; ++i) { fold->qp[i] = isl_qpolynomial_realign_domain(fold->qp[i], isl_reordering_copy(r)); ...
false
false
false
false
true
1
flushCurrentPolygon() { if (m_currentPolygon.size() < 2) { m_currentPolygon.clear(); return; } clipPolygon(m_currentPolygon); QPainterPath path; path.addPolygon(m_currentPolygon); QGraphicsPathItem *pathItem; pathItem = addPath(path, m_currentPen, Qt::NoBrush); pathItem->setZValue(m_currentZ++); m_current...
false
false
false
false
false
0
adjust_insn_aux_data(struct verifier_env *env, u32 prog_len, u32 off, u32 cnt) { struct bpf_insn_aux_data *new_data, *old_data = env->insn_aux_data; if (cnt == 1) return 0; new_data = vzalloc(sizeof(struct bpf_insn_aux_data) * prog_len); if (!new_data) return -ENOMEM; memcpy(new_data, old_data, sizeof(str...
false
false
false
false
false
0
readIndexList(istream & fin, vector<unsigned int> & v, unsigned int count) { char buf[256]; vector<string> token; unsigned int i = 0; //cerr << "*** IndexList\n"; while (i < count && fin.getline(buf, sizeof(buf))) { // Tokenize token.clear(); ...
false
false
false
false
false
0
H5FD_family_fapl_copy(const void *_old_fa) { const H5FD_family_fapl_t *old_fa = (const H5FD_family_fapl_t*)_old_fa; H5FD_family_fapl_t *new_fa = NULL; H5P_genplist_t *plist; /* Property list pointer */ void *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT if(NULL == (new_fa = ...
false
false
false
false
false
0
gimple_push_bind_expr (gimple gimple_bind) { if (gimplify_ctxp->bind_expr_stack == NULL) gimplify_ctxp->bind_expr_stack = VEC_alloc (gimple, heap, 8); VEC_safe_push (gimple, heap, gimplify_ctxp->bind_expr_stack, gimple_bind); }
false
false
false
false
false
0
fc_lport_enter_scr(struct fc_lport *lport) { struct fc_frame *fp; FC_LPORT_DBG(lport, "Entered SCR state from %s state\n", fc_lport_state(lport)); fc_lport_state_enter(lport, LPORT_ST_SCR); fp = fc_frame_alloc(lport, sizeof(struct fc_els_scr)); if (!fp) { fc_lport_error(lport, fp); return; } if (!...
false
false
false
false
false
0
get_remote_config(const char *key, const char *value) { const char *var; if (prefixcmp(key, "remote.")) return 0; var = strrchr(key, '.'); if (var == key + 6 || strcmp(var, ".fetch")) return 0; /* * Ok, we are looking at key == "remote.$foo.fetch"; */ if (get_remote_branch_name(value)) nfasprintf(&conf...
false
false
false
false
false
0
SetCoeffRegs(double *coeff, int mantSize, coeffPtr pCoeff, int pos) { int maxVal, icoeff, res; int sign; double c; sign = 0; maxVal = 1 << mantSize; c = *coeff; if (c < 0.0) { sign = 1; c = -c; } res = 12 - mantSize; if ((icoeff = (int)(c * 4 * max...
false
false
false
false
false
0
update_working_area() { get_desktop_working_area(&working_area); /* Adjust again according to the dimension of working area */ height = working_area.height; width = working_area.width; max_slots = MAX((height - NHEIGHT) / NHEIGHT, MAX_SLOTS); }
false
false
false
false
false
0
visu_scalar_field_setCommentary(VisuScalarField *field, const gchar* comment) { g_return_if_fail(field); field->priv->commentary = g_strdup(comment); }
false
false
false
false
false
0
RegisterFlag(CommandLineFlag* flag) { Lock(); pair<FlagIterator, bool> ins = flags_.insert(pair<const char*, CommandLineFlag*>(flag->name(), flag)); if (ins.second == false) { // means the name was already in the map if (strcmp(ins.first->second->filename(), flag->filename()) != 0) { ReportError(D...
false
false
false
false
false
0
setup_socket() const { int reuse = 1; struct sockaddr_in addr; int fd, ret; memset(&addr, 0, sizeof(addr)); #if defined __BSD__ addr.sin_len = sizeof(struct sockaddr_in); #endif addr.sin_family = AF_INET; addr.sin_port = htons(m_port); addr.sin_addr.s_addr = inet_addr(m_host.c_str()); ...
false
false
false
false
false
0
CompareNumbers( void *theEnv, int type1, void *vptr1, int type2, void *vptr2) { /*============================================*/ /* Handle the situation in which the values */ /* are exactly equal (same type, same value). */ /*============================================*/ if (vptr1 == vpt...
false
false
false
false
false
0
FindParameters(FCDENodeList& nodes, StringList& names) { for (const FCDENode** itN = (const FCDENode**) children.begin(); itN != children.end(); ++itN) { const FCDENode* node = (*itN); if (node->GetChildNodeCount() == 0) { nodes.push_back(const_cast<FCDENode*>(node)); names.push_back(node->GetName...
false
false
false
false
false
0
_init_clarity_with_playlist(ClarityWidget *cw, Playlist *playlist) { if (! gtk_widget_get_realized(GTK_WIDGET(cw))) return; if (cw->current_playlist == playlist) // Should already have all these tracks displayed return; _clarity_widget_clear(cw); cw->current_playlist = playlis...
false
false
false
false
false
0
_edsf_persona_store_set_contact_birthday (EdsfPersonaStore* self, EContact* contact, GDateTime* _bday) { EContactDate* _contact_bday = NULL; GDateTime* _tmp0_ = NULL; EContact* _tmp17_ = NULL; EContactField _tmp18_ = 0; EContactDate* _tmp19_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (contact != N...
false
false
false
false
false
0
gst_dp_packet_from_caps_any (const GstCaps * caps, GstDPHeaderFlag flags, guint * length, guint8 ** header, guint8 ** payload, GstDPVersion version) { guint8 *h; guchar *string; guint payload_length; g_return_val_if_fail (GST_IS_CAPS (caps), FALSE); g_return_val_if_fail (length, FALSE); g_return_val_if...
false
false
false
false
false
0
brasero_status_set_completed (BraseroStatus *status) { BraseroStatusPrivate *priv; g_return_if_fail (status != NULL); g_return_if_fail (BRASERO_IS_STATUS (status)); priv = BRASERO_STATUS_PRIVATE (status); priv->res = BRASERO_BURN_OK; priv->progress = 1.0; }
false
false
false
false
false
0
prepareSourceDevice() { // some data may already be available if (m_updateMode == QNmeaPositionInfoSource::SimulationMode) { if (m_nmeaReader && m_device->bytesAvailable()) m_nmeaReader->readAvailableData(); } if (!m_connectedReadyRead) { connect(m_device, SIGNAL(readyRead()...
false
false
false
false
false
0