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
kwsysSystem_Shell__CharNeedsQuotes(char c, int isUnix, int flags) { /* On Windows the built-in command shell echo never needs quotes. */ if(!isUnix && (flags & kwsysSystem_Shell_Flag_EchoWindows)) { return 0; } /* On all platforms quotes are needed to preserve whitespace. */ if(kwsysSystem_Shell_...
false
false
false
false
false
0
Dir_load(tst_t *settings, tst_t *params) { const char *base = AST_str(settings, params, "base", VAL_QSTRING); tns_value_t *res = DB_exec(bdata(&DIR_SQL), base, AST_str(settings, params, "index_file", VAL_QSTRING), AST_str(settings, params, "default_ctype", VAL_QSTRING)); check(res ...
false
false
false
false
false
0
excel_write_vector_blip (ExcelWriteState *ewb, BlipInf *blip, const BlipType *bt) { BiffPut *bp = ewb->bp; if (bp->version >= MS_BIFF_V8) { guint8 buf [VECTOR_BLIP_HDR_LEN]; double coords [4]; double width, height; sheet_object_position_pts_get (blip->so, coords); width = fabs (coords[2] - coords[0]); ...
false
false
false
false
false
0
camel_sasl_challenge_base64_finish (CamelSasl *sasl, GAsyncResult *result, GError **error) { GSimpleAsyncResult *simple; AsyncContext *async_context; gchar *response; g_return_val_if_fail (CAMEL_IS_SASL (sasl), NULL); g_return_val_if_fail (G_...
false
false
false
false
false
0
nemo_icon_container_free_drag_data (NemoIconContainer *container) { NemoIconDndInfo *dnd_info; dnd_info = container->details->dnd_info; dnd_info->drag_info.got_drop_data_type = FALSE; if (dnd_info->shadow != NULL) { eel_canvas_item_destroy (dnd_info->shadow); dnd_info->shadow = NULL; } if (dnd_info->drag...
false
false
false
false
false
0
processIntersections( noding::SegmentString * e0, int segIndex0, noding::SegmentString * e1, int segIndex1 ) { // don't bother intersecting a segment with itself if (e0 == e1 && segIndex0 == segIndex1) return; const geom::Coordinate & p00 = (*e0->getCoordinates())[ segIndex0 ]; const geom::Coordinate & p01 =...
false
false
false
false
false
0
usb_acpi_get_connect_type(acpi_handle handle, struct acpi_pld_info *pld) { enum usb_port_connect_type connect_type = USB_PORT_CONNECT_TYPE_UNKNOWN; struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *upc; acpi_status status; /* * According to ACPI Spec 9.13. PLD indicates whether us...
false
false
false
false
false
0
avl_tree_remove_node(AVLTree *tree, AVLTreeNode *node) { AVLTreeNode *swap_node; AVLTreeNode *balance_startpoint; int i; /* The node to be removed must be swapped with an "adjacent" * node, ie. one which has the closest key to this one. Find * a node to swap with. */ swap_node = avl_tree_node_get_replacement...
false
false
false
false
false
0
joinIntervals() { DEBUG(dbgs() << "********** JOINING INTERVALS ***********\n"); std::vector<MachineInstr*> TryAgainList; if (Loops->empty()) { // If there are no loops in the function, join intervals in function order. for (MachineFunction::iterator I = MF->begin(), E = MF->end(); I != E; ++I) ...
false
false
false
false
false
0
vidioc_enum_dv_timings(struct file *file, void *_fh, struct v4l2_enum_dv_timings *timings) { struct vivid_dev *dev = video_drvdata(file); struct video_device *vdev = video_devdata(file); if (vdev->vfl_dir == VFL_DIR_RX) { if (!vivid_is_hdmi_cap(dev)) return -ENODATA; } else { if (!vivid_is_hdmi_out(...
false
false
false
false
false
0
label_to_block_fn (struct function *ifun, tree dest) { int uid = LABEL_DECL_UID (dest); /* We would die hard when faced by an undefined label. Emit a label to the very first basic block. This will hopefully make even the dataflow and undefined variable warnings quite right. */ if (seen_error () && u...
false
false
false
false
false
0
gst_tcp_client_sink_render (GstBaseSink * bsink, GstBuffer * buf) { size_t wrote = 0; GstTCPClientSink *sink; gint size; sink = GST_TCP_CLIENT_SINK (bsink); g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_TCP_CLIENT_SINK_OPEN), GST_FLOW_WRONG_STATE); size = GST_BUFFER_SIZE (buf); GST_LOG...
false
false
false
false
false
0
iwl_mvm_scan_config_rates(struct iwl_mvm *mvm) { struct ieee80211_supported_band *band; unsigned int rates = 0; int i; band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; for (i = 0; i < band->n_bitrates; i++) rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); band = &mvm->nvm_data->bands[IEEE80211_BA...
false
false
false
false
false
0
BitVector_MSB(wordptr addr, boolean bit) { N_word size = BV_SIZE_(addr); N_word mask = BV_MASK_(addr); if (size-- > 0) { if (bit) *(addr+size) |= mask AND NOT (mask >> 1); else *(addr+size) &= NOT mask OR (mask >> 1); } }
false
false
false
false
false
0
escape_char(char *s, char c) { int n = char_occurrences(s, c); char *new = malloc(strlen(s) + n + 1); int j = 0; int i; for (i = 0; i < strlen(s); i++) { if (s[i] == c) new[j++] = '\\'; new[j++] = s[i]; } new[j] = '\0'; return new; }
false
false
false
false
true
1
_gdc_view_option_changed(GtkComboBox *widget, gpointer user_data) { GtkTreeIter iter; GtkTreeModel *model; gint months_val; model = GTK_TREE_MODEL(gtk_combo_box_get_model(widget)); if (!gtk_combo_box_get_active_iter(widget, &iter)) return; gtk_tree_model_get(model, &iter, VIEW_OPTS_COLU...
false
false
false
false
false
0
r100_cp_init_microcode(struct radeon_device *rdev) { const char *fw_name = NULL; int err; DRM_DEBUG_KMS("\n"); if ((rdev->family == CHIP_R100) || (rdev->family == CHIP_RV100) || (rdev->family == CHIP_RV200) || (rdev->family == CHIP_RS100) || (rdev->family == CHIP_RS200)) { DRM_INFO("Loading R100 Micro...
false
false
false
false
false
0
CheckLinedefInsideBox(int xmin, int ymin, int xmax, int ymax, int x1, int y1, int x2, int y2) { int count = 2; int tmp; for (;;) { if (y1 > ymax) { if (y2 > ymax) return FALSE; x1 = x1 + (int) ((x2-x1) * (double)(ymax-y1) / (double)(y2-y1)); y1 = ymax; ...
false
false
false
false
false
0
snd_pcm_iec958_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) { snd_pcm_iec958_t *iec = pcm->private_data; snd_pcm_format_t format; int err = snd_pcm_hw_params_slave(pcm, params, snd_pcm_iec958_hw_refine_cchange, snd_pcm_iec958_hw_refine_sprepare, snd_pcm_iec958_hw_refine_schange, ...
false
false
false
false
false
0
qr_solve(HepMatrix *A,const HepMatrix &b) { HepMatrix Q=qr_decomp(A); // Quick way to to Q.T*b. HepMatrix b2(Q.num_col(),b.num_col(),0); int nb = b.num_col(); int nq = Q.num_col(); HepMatrix::mcIter b1i = b.m.begin(); HepMatrix::mIter b21i = b2.m.begin(); for (int i=1;i<=b.num_col();i++) { ...
false
false
false
false
false
0
virtualBegin (G_GNUC_UNUSED sqlite3_vtab *tab) { VirtualTable *vtable = (VirtualTable *) tab; TRACE (tab, NULL); if (vtable->locked) return SQLITE_ERROR; else { vtable->locked = TRUE; return SQLITE_OK; } }
false
false
false
false
false
0
gtk_hotkey_info_new (const gchar *app_id, const gchar *key_id, const gchar *signature, GAppInfo *app_info) { GtkHotkeyInfo * self; g_return_val_if_fail (app_id != NULL, NULL); g_return_val_if_fail (key_id != NULL, NULL); /* A NULL app_info is ok, but it better be a GAppInfo then */ if (app_i...
false
false
false
false
false
0
garray_redraw(t_garray *x) { if (glist_isvisible(x->x_glist)) sys_queuegui(&x->x_gobj, x->x_glist, garray_doredraw); /* jsarlo { */ /* this happens in garray_vis() when array is visible for performance reasons */ else { if (x->x_listviewing) sys_vgui("pdtk_array_listview...
false
false
false
false
false
0
gst_auto_convert_src_event (GstPad * pad, GstObject * parent, GstEvent * event) { gboolean ret = TRUE; GstAutoConvert *autoconvert = GST_AUTO_CONVERT (parent); GstPad *internal_sinkpad; internal_sinkpad = gst_auto_convert_get_internal_sinkpad (autoconvert); if (internal_sinkpad) { ret = gst_pad_push_even...
false
false
false
false
false
0
brasero_session_span_possible (BraseroSessionSpan *session) { GSList *tracks; BraseroTrack *track; goffset max_sectors = 0; goffset track_blocks = 0; BraseroSessionSpanPrivate *priv; g_return_val_if_fail (BRASERO_IS_SESSION_SPAN (session), BRASERO_BURN_ERR); priv = BRASERO_SESSION_SPAN_PRIVATE (session); max...
false
false
false
false
false
0
gwy_resource_editor_save(GwyResourceEditor *editor, const gchar *name) { GwyInventory *inventory; GwyResource *resource; GtkTreeModel *model; gchar *filename; GString *str; FILE *fh; gwy_debug("<%s>", name); model = gtk_tree_view_get_model(GTK_TREE_VIEW(editor->...
false
false
false
false
false
0
AddToIndex( OGRFeature *poFeature, int iTargetField ) { OGRErr eErr = OGRERR_NONE; if( poFeature->GetFID() == OGRNullFID ) { CPLError( CE_Failure, CPLE_AppDefined, "Attempt to index feature with no FID." ); return OGRERR_FAILURE; ...
false
false
false
false
false
0
megasas_alloc_request_fusion(struct megasas_instance *instance) { struct fusion_context *fusion; fusion = instance->ctrl_context; fusion->req_frames_desc = dma_alloc_coherent(&instance->pdev->dev, fusion->request_alloc_sz, &fusion->req_frames_desc_phys, GFP_KERNEL); if (!fusion->req_frames_desc) { dev_e...
false
false
false
false
false
0
Scan_Tag_With_Mask (ET_File *ETFile) { GList *fill_tag_list = NULL; GList *l; gchar **dest = NULL; gchar *mask; // The 'mask' in the entry gchar *filename_utf8; File_Tag *FileTag; g_return_if_fail (ScannerWindow != NULL && ScanTagMaskCombo != NULL); g_return_if_fail (ETFile != NULL); ...
false
false
false
true
false
1
r6040_phy_write(void __iomem *ioaddr, int phy_addr, int reg, u16 val) { int limit = MAC_DEF_TIMEOUT; u16 cmd; iowrite16(val, ioaddr + MMWD); /* Write the command to the MDIO bus */ iowrite16(MDIO_WRITE + reg + (phy_addr << 8), ioaddr + MMDIO); /* Wait for the write bit to be cleared */ while (limit--) { ...
false
false
false
false
false
0
hi6421_regulator_ldo_get_optimum_mode(struct regulator_dev *rdev, int input_uV, int output_uV, int load_uA) { struct hi6421_regulator_info *info = rdev_get_drvdata(rdev); if (load_uA > info->eco_microamp) return REGULATOR_MODE_NORMAL; return REGULATOR_MODE_IDLE; }
false
false
false
false
false
0
fmpz_tdiv_ui(fmpz_t output, const fmpz_t input, const unsigned long x) { output[0] = input[0]; unsigned long size = FLINT_ABS(input[0]); mpn_divmod_1(output+1, input+1, size, x); NORM(output); }
false
false
false
false
false
0
spi_clps711x_isr(int irq, void *dev_id) { struct spi_master *master = dev_id; struct spi_clps711x_data *hw = spi_master_get_devdata(master); u8 data; /* Handle RX */ data = readb(hw->syncio); if (hw->rx_buf) *hw->rx_buf++ = data; /* Handle TX */ if (--hw->len > 0) { data = hw->tx_buf ? *hw->tx_buf++ : 0; ...
false
false
false
false
false
0
file_collect (lua_State *L) { IOCtrl *ctrl = (IOCtrl *)lua_touserdata(L, -1); FILE *f = getnonullfile(L, ctrl, 1); if (f != stdin && f != stdout && f != stderr) CLOSEFILE(L, f); return 0; }
false
false
false
false
false
0
HPDF_Destination_SetFitB (HPDF_Destination dst) { HPDF_STATUS ret = HPDF_OK; HPDF_Page target; HPDF_PTRACE((" HPDF_Destination_SetFitB\n")); if (!HPDF_Destination_Validate (dst)) return HPDF_INVALID_DESTINATION; target = (HPDF_Page)HPDF_Array_GetItem (dst, 0, HPDF_OCLASS_DICT); if ...
false
false
false
false
false
0
hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, struct hugetlb_cgroup *h_cg, struct page *page) { if (hugetlb_cgroup_disabled() || !h_cg) return; set_hugetlb_cgroup(page, h_cg); return; }
false
false
false
false
false
0
inTagList(const DcmElement *element, DcmAttributeTag *tagList) { if (element == NULL) return OFFalse; if (tagList == NULL) return OFTrue; // tag list absent, use all tags DcmTagKey key; const DcmTag &elementTag = element->getTag(); unsigned long vm = tagList->getVM(); for (unsigned long i=0; i < vm; i++) ...
false
false
false
false
false
0
ocfs2_clear_page_regions(struct page *page, struct ocfs2_super *osb, u32 cpos, unsigned from, unsigned to) { void *kaddr; unsigned int cluster_start, cluster_end; ocfs2_figure_cluster_boundaries(osb, cpos, &cluster_start, &cluster_end); kaddr = kmap_atomic(page); if (from || to) { if (from >...
false
false
false
false
false
0
graph_guru_set_page (GraphGuruState *s, int page) { char *name; if (s->current_page == page) return; switch (page) { case 0: name = _("Step 1 of 2: Select Chart Type"); gtk_widget_set_sensitive (s->button_navigate, s->plot != NULL); gtk_button_set_label (GTK_BUTTON (s->button_navigate), GTK_STOCK_...
false
false
false
false
false
0
on_user_is_loaded_changed (ActUser *user, GParamSpec *pspec, GdmSessionSettings *settings) { if (act_user_is_loaded (settings->priv->user)) { load_settings_from_user (settings); g_signal_handlers_disconnect_...
false
false
false
false
false
0
_Conv_A2W(char *data, SQLLEN *pInd, UDWORD size) { wchar_t *wdata = (wchar_t *) data; if (*pInd != SQL_NULL_DATA) { wchar_t *buf = (wchar_t *)dm_SQL_A2W ((SQLCHAR *) data, (ssize_t)*pInd); if (buf != NULL) WCSCPY (wdata, buf); MEM_FREE (buf); } }
false
false
false
false
false
0
mc33_test_face(char face, float *v) { float A, B, C, D; switch (face) { case -1: case 1: A = v[0]; B = v[4]; C = v[5]; D = v[1]; break; case -2: case 2: A = v[1]; B = v[5]; C = v[6]; D = v[2]; break; case -3: case 3: A = v[2]; B = v[6]; C = v[7]; D = v[3]; break; c...
false
false
false
false
false
0
getFirstDeepest(QAbstractItemModel *model, const QModelIndex &parent, int *count) { static const int column = 0; Q_ASSERT(model->hasChildren(parent)); Q_ASSERT(model->rowCount(parent) > 0); for (int row = 0; row < model->rowCount(parent); ++row) { (*count)++; const QModelIndex child = model->index(row, ...
false
false
false
false
false
0
get_readers_write_callback( void *userdata, struct rc_instruction * inst, rc_register_file file, unsigned int index, unsigned int mask) { struct get_readers_callback_data * d = userdata; if (index == d->DstIndex && file == d->DstFile) { unsigned int shared_mask = mask & d->DstMask; d->ReaderData->AbortOnRea...
false
false
false
false
false
0
reply(std::ostream& os, http::Request& request, http::Reply& reply) { try { if( ! _proc ) { _fault.rc(4); _fault.text("invalid XML-RPC"); throw _fault; } if( _args ) { ++_args; if( * _args ) { ...
false
false
false
false
false
0
flo_eql(x, y) VALUE x, y; { if (TYPE(y) == T_FLOAT) { double a = RFLOAT(x)->value; double b = RFLOAT(y)->value; if (isnan(a) || isnan(b)) return Qfalse; if (a == b) return Qtrue; } return Qfalse; }
false
false
false
false
false
0
PK11_ImportPrivateKeyInfoAndReturnKey(PK11SlotInfo *slot, SECKEYPrivateKeyInfo *pki, SECItem *nickname, SECItem *publicValue, PRBool isPerm, PRBool isPrivate, unsigned int keyUsage, SECKEYPrivateKey **privk, void *wincx) { CK_KEY_TYPE keyType = CKK_RSA; SECStatus rv = SECFailure; SECKEYRawPrivateKey *lp...
false
false
false
false
false
0
fs_nvram_memcpy_to(fs_nvram_t *fs, u_int offset, const u_char *data, u_int len) { u_int i; for (i = 0; i < len; i++) { fs->write_byte(fs, offset + i, *data); data++; } }
false
false
false
false
false
0
is_mounted(const char *mpoint) { int res; struct stat st; char *parent; dev_t dev; res = lstat(mpoint, &st); if (res) return 0; dev = st.st_dev; parent = dirname_r(mpoint); if (!parent) return 0; res = lstat(parent, &st); free(parent); if (res) ...
false
false
false
false
false
0
drm_gem_map_attach(struct dma_buf *dma_buf, struct device *target_dev, struct dma_buf_attachment *attach) { struct drm_prime_attachment *prime_attach; struct drm_gem_object *obj = dma_buf->priv; struct drm_device *dev = obj->dev; prime_attach = kzalloc(sizeof(*prime_attach), GFP_KERNEL); if (!pr...
false
false
false
false
false
0
tvp7002_get_pdata(struct i2c_client *client) { struct v4l2_of_endpoint bus_cfg; struct tvp7002_config *pdata; struct device_node *endpoint; unsigned int flags; if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL)...
false
false
false
false
false
0
move_overlap (gint *y, gint h, gint oy, gint cy, gint line_height, gboolean move_up) { /* Test if there is overlap */ if (*y - cy < oy && *y - cy + h > oy - line_height) { if (move_up) { *y = oy - line_height - h + ...
false
false
false
false
false
0
setup_show_lapic(char *arg) { int num = -1; if (strcmp(arg, "all") == 0) { show_lapic = CONFIG_NR_CPUS; } else { get_option(&arg, &num); if (num >= 0) show_lapic = num; } return 1; }
false
false
false
false
false
0
unassociate_proxies (gpointer key, gpointer val, gpointer user_data) { DBusGProxyList *list; const char *name; GSList *tmp; DBusGProxyUnassociateData *data; list = val; data = user_data; name = data->name; for (tmp = list->proxies; tmp; tmp = tmp->next) { DBusGProxy *proxy = DBUS_G_PROXY (...
false
false
false
false
false
0
CurveDataSetPoint(CurveData *curve, int point, double x, double y) { int i; double left = curve->m_anchors[0].x; double right = curve->m_anchors[curve->m_numAnchors - 1].x; if (point == 0) { for (i = 0; i < curve->m_numAnchors; i++) curve->m_anchors[i].x = x + (curve->m_anchors[i].x ...
false
false
false
false
false
0
AslCompilerSignon ( UINT32 FileId) { char *Prefix = ""; char *UtilityName; /* Set line prefix depending on the destination file type */ switch (FileId) { case ASL_FILE_ASM_SOURCE_OUTPUT: case ASL_FILE_ASM_INCLUDE_OUTPUT: ...
false
false
false
false
false
0
fmt_convert_to_s32(int32_t *dest, void *src_v, int n, enum WavSampleFormat fmt) { int i, v; if(fmt == WAV_SAMPLE_FMT_U8) { uint8_t *src = src_v; for(i=0; i<n; i++) { dest[i] = (src[i] - 128) << 24; } } else if(fmt == WAV_SAMPLE_FMT_S16) { int16_t *src = src_v; ...
false
false
false
false
false
0
Xfputc(c, fp) int c; XFILE *fp; { u_char uc; uc = (u_char)c; if (Xfwrite((char *)&uc, sizeof(uc), fp) < (int)sizeof(uc)) return(EOF); return(c); }
false
false
false
false
false
0
main(int argc, char **argv) { ESL_GETOPTS *go = esl_getopts_CreateDefaultApp(options, 0, argc, argv, banner, usage); ESL_RANDOMNESS *rng = esl_randomness_CreateFast(esl_opt_GetInteger(go, "-s")); int be_verbose = esl_opt_GetBoolean(go, "-v"); if (be_verbose) printf("p7_bg unit ...
true
true
false
false
false
1
wcursyncup(WINDOW *win) /* sync the cursor in all derived windows to its value in the base window */ { WINDOW *wp; T((T_CALLED("wcursyncup(%p)"), win)); for (wp = win; wp && wp->_parent; wp = wp->_parent) { wmove(wp->_parent, wp->_pary + wp->_cury, wp->_parx + wp->_curx); } returnVoid; }
false
false
false
false
false
0
db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r, int (*submit_query)(const db_con_t* _h, const str* _c), int (*store_result)(const db_con_t* _h, db_res_t** _r)) { if (!_h || !_s || !submit_query || !store_result) { LM_ERR("invalid parameter value\n"); return -1; } if (submit_query(_h, _s) < 0...
false
false
false
false
false
0
ftrace_graph_notrace_open(struct inode *inode, struct file *file) { struct ftrace_graph_data *fgd; if (unlikely(ftrace_disabled)) return -ENODEV; fgd = kmalloc(sizeof(*fgd), GFP_KERNEL); if (fgd == NULL) return -ENOMEM; fgd->table = ftrace_graph_notrace_funcs; fgd->size = FTRACE_GRAPH_MAX_FUNCS; fgd->coun...
false
false
false
false
false
0
tp_message_is_delivery_report (TpMessage *self) { gboolean valid; g_return_val_if_fail (TP_IS_MESSAGE (self), FALSE); tp_asv_get_uint32 (tp_message_peek (self, 0), "delivery-status", &valid); return valid; }
false
false
false
false
false
0
multi_unload_common_icons() { int idx; if (Is_standalone) return; // unload all icons for(idx=0; idx<MULTI_NUM_COMMON_ICONS; idx++){ if(Multi_common_icons[idx] != -1){ // don't bm_release() here, used in multiple places - taylor bm_unload(Multi_common_icons[idx]); Multi_common_icons[idx] = -1; } }...
false
false
false
false
false
0
dispdosdrive(no) int no; { # ifdef HDDMOUNT char buf[strsize("HDD98 #offset=") + MAXCOLSCOMMA(3) + 1]; # endif int i, len, w1, w2, width; if (no >= maxfdtype) { cputspace(MAXCUSTVAL); return(0); } width = (MAXCUSTVAL - 1) / 2; cputstr(width, fdtype[no].name); putsep(); w1 = MAXCUSTVAL - 1 - width; # if...
false
false
false
false
false
0
restoreService() { if ( _isSuspended ) { _isSuspended = false; JASSERT ( _option>=0 && _facility>=0 ) ( _option ) ( _facility ); openlog ( ( _identIsNotNULL ? _ident().c_str() : NULL), _option, _facility ); } }
false
false
false
false
false
0
elm_gengrid_item_cursor_unset(Elm_Object_Item *item) { Elm_Gen_Item *it = (Elm_Gen_Item *)item; ELM_GENGRID_ITEM_CHECK_OR_RETURN(it); if (!it->mouse_cursor) return; if (VIEW(it)) elm_widget_item_cursor_unset(it); eina_stringshare_del(it->mouse_cursor); it->mouse_cursor = NULL; }
false
false
false
false
false
0
gt_chain2dim_chainingboundarycases(const GtChain2Dimmode *chainmode, GtChain2Dim *chain, const GtChain2Dimmatchtable *matchtable) { chain->storedinreverseorder = false; if (matchtable->nextfree == 0) { chain->scoreofchain = 0; chain->chai...
false
false
false
false
false
0
acf_exception_read(struct ast_channel *chan, const char *name, char *data, char *buf, size_t buflen) { struct ast_datastore *ds = ast_channel_datastore_find(chan, &exception_store_info, NULL); struct pbx_exception *exception = NULL; if (!ds || !ds->data) return -1; exception = ds->data; if (!strcasecmp(data, "RE...
true
true
false
false
false
1
packageToInstall() const { QList<Pack> toReturn; foreach(const PackItem &it, d->m_Items) { if (!it.isInstalled && !it.isAnUpdate && it.userCheckState==Qt::Checked) toReturn << it.pack; } return toReturn; }
false
false
false
false
false
0
fscache_update_object(struct fscache_object *object, int event) { _enter("{OBJ%x},%d", object->debug_id, event); fscache_stat(&fscache_n_updates_run); fscache_stat(&fscache_n_cop_update_object); object->cache->ops->update_object(object); fscache_stat_d(&fscache_n_cop_update_object); _leave(""); return ...
false
false
false
false
false
0
cs_add (const cs *A, const cs *B, double alpha, double beta) { int p, j, nz = 0, anz, *Cp, *Ci, *Bp, m, n, bnz, *w, values ; double *x, *Bx, *Cx ; cs *C ; if (!CS_CSC (A) || !CS_CSC (B)) return (NULL) ; /* check inputs */ if (A->m != B->m || A->n != B->n) return (NULL) ; m = A->m ; anz =...
false
false
false
false
false
0
collect_users (const char *ssid, CkSession *session, GHashTable *hash) { char *username; if (session_is_real_user (session, &username)) { if (username != NULL) { g_hash_table_insert (hash, username, NULL); } ...
false
false
false
false
false
0
gkrellm_scale_piximage_to_pixmap(GkrellmPiximage *piximage, GdkPixmap **pixmap, GdkBitmap **mask, gint w_dst, gint h_dst) { GdkWindow *window = gkrellm_get_top_window()->window; GdkPixbuf *src_pixbuf, *dst_pixbuf; gint w_src, h_src; gboolean has_alpha; /* I want the pixmap freed even if there is no image...
false
false
false
false
false
0
calc_live_regs( struct i915_fragment_program *p ) { const struct gl_fragment_program *program = &p->FragProg; GLuint regsUsed = ~((1 << I915_MAX_TEMPORARY) - 1); uint8_t live_components[I915_MAX_TEMPORARY] = { 0, }; GLint i; for (i = program->Base.NumInstructions - 1; i >= 0; i--) { stru...
false
false
false
false
false
0
e_util_strv_to_slist (const gchar * const *strv) { GSList *slist = NULL; gint ii; if (!strv) return NULL; for (ii = 0; strv[ii]; ii++) { slist = g_slist_prepend (slist, g_strdup (strv[ii])); } return g_slist_reverse (slist); }
false
false
false
false
false
0
init_wunit_generic(void) { UINT8 *base; int i, j; /* set up code ROMs */ memcpy(midyunit_code_rom, memory_region(REGION_USER1), memory_region_length(REGION_USER1)); /* load the graphics ROMs -- quadruples */ midyunit_gfx_rom = base = memory_region(REGION_GFX1); for (i = 0; i < memory_region_length(RE...
false
false
false
false
false
0
zend_binary_strcmp(const char *s1, uint len1, const char *s2, uint len2) /* {{{ */ { int retval; retval = memcmp(s1, s2, MIN(len1, len2)); if (!retval) { return (len1 - len2); } else { return retval; } }
false
false
false
false
false
0
AddPlugin(XMLNode mcccfg, const std::string& libname, const std::string& libpath) { if (!libpath.empty()) { XMLNode mm = mcccfg["ModuleManager"]; if (!mm) mcccfg.NewChild("ModuleManager", 0); XMLNode mp = mm["Path"]; for (; (bool)mp; ++mp) if (mp == libpath) break; ...
false
false
false
false
false
0
testAMPM() { LocalDateTime dt1(2005, 1, 1, 0, 15, 30); assert (dt1.isAM()); assert (!dt1.isPM()); assert (dt1.hourAMPM() == 12); dt1.assign(2005, 1, 1, 12, 15, 30); assert (!dt1.isAM()); assert (dt1.isPM()); assert (dt1.hourAMPM() == 12); dt1.assign(2005, 1, 1, 13, 15, 30); assert (!dt1.isAM()); assert (d...
false
false
false
false
false
0
property (CRDocHandler *a_this, CRString *a_name, CRTerm *a_expr, gboolean a_is_important) { gchar *str = NULL ; CRTerm *cur_term = NULL ; str = (gchar*) cr_string_peek_raw_str (a_name) ; if (str) { g_print ("\n\n") ; ...
false
false
false
false
false
0
e_gadcon_unpopulate(E_Gadcon *gc) { E_Gadcon_Client *gcc; E_OBJECT_CHECK(gc); E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE); /* Be careful, e_object_del does remove gcc from gc->clients */ while (gc->clients) { gcc = eina_list_data_get(gc->clients); _e_gadcon_client_unpopulate(gcc); ...
false
false
false
false
false
0
read_eeprom(unsigned int ioaddr, int index) { int timer; outw(EEPROM_Read + index, ioaddr + Wn0EepromCmd); /* Pause for at least 162 usec for the read to take place. */ for (timer = 1620; timer >= 0; timer--) { if ((inw(ioaddr + Wn0EepromCmd) & 0x8000) == 0) break; } return inw(ioaddr + Wn0EepromData); }
false
false
false
false
false
0
getUnknownOperator() const { IntegratedOperatorExpression::OperatorType t = IntegratedOperatorExpression::undefined; LinearListType::const_iterator i = __linearList.begin(); while (i != __linearList.end()) { const IntegratedOperatorExpression& I = *(*i)->integrated(); const IntegratedExpression& IE ...
false
false
false
false
false
0
smb_tcp_print (const u_char * data, int length) { int caplen; u_int smb_len; const u_char *maxbuf; if (length < 4) goto trunc; if (snapend < data) goto trunc; caplen = snapend - data; if (caplen < 4) goto trunc; maxbuf = data + caplen; smb_len = EXTRACT_24BITS(data + 1); leng...
false
false
false
false
false
0
disconnect_sheet_signals (SheetControlGUI *scg) { WBCGtk *wbcg = scg->wbcg; Sheet *sheet = scg_sheet (scg); if (scg == wbcg->active_scg) disconnect_sheet_focus_signals (wbcg); #if 0 g_printerr ("Disconnecting all for %s with scg=%p\n", sheet->name_unquoted, scg); #endif g_signal_handlers_disconnect_by_func (s...
false
false
false
false
false
0
is_null() const { if ( parent_hkl_info != NULL && parent_cell != NULL ) return ( parent_hkl_info->is_null() || parent_cell->is_null() ); else return true; }
false
false
false
false
false
0
logsqlite_prepare_path(session_t *session, time_t sent) { char *path, *tmp, datetime[5]; struct tm *tm = localtime(&sent); string_t buf; if (!(tmp = config_logsqlite_path)) { return NULL; } buf = string_init(NULL); while (*tmp) { if ((char)*tmp == '%' && (tmp+1) != NULL) { switch (*(tmp+1)) { case ...
false
false
false
false
false
0
jputenv(def) const char *def; /* Note: caller must ensure string persists */ { static bool env_malloced = NO; /* should we free it when replacing? */ const char **const e = (const char **)environ, /* to avoid type complaints from gcc */ **p, *eq; if ((eq = strchr(def, '=')) == NULL) return; for (p = e; ; ...
false
false
false
false
false
0
DtsCreateMdataPool(DTS_LIB_CONTEXT *Ctx) { uint32_t i, mpSz =0; DTS_INPUT_MDATA *temp=NULL; mpSz = BC_INPUT_MDATA_POOL_SZ * sizeof(DTS_INPUT_MDATA); if( (Ctx->MdataPoolPtr = malloc(mpSz)) == NULL){ DebugLog_Trace(LDIL_DBG,"Failed to Alloc mem\n"); return BC_STS_INSUFF_RES; } memset(Ctx->MdataPoolPtr,0,mp...
false
false
false
false
false
0
heim_ntlm_calculate_lm2(const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], unsigned char ntlmv2[16], struct ntlm_buf *answer) { unsigned char clientchallenge[8]; if (RAND_bytes(clientchallenge, sizeof(clientchallenge)) != 1) return HNT...
true
true
false
false
false
1
AddOption(const std::string& option, const std::string& value, bool overwrite) { if (option.empty() || value.empty() || (!overwrite && urloptions.find(option) != urloptions.end())) return false; urloptions[option] = value; return true; }
false
false
false
false
false
0
query_info_cb (GFile *source, GAsyncResult *res, AsyncData *async) { GFileInfo *info; GError *error = NULL; GeditDocumentLoaderPrivate *priv; gedit_debug (DEBUG_LOADER); /* manually check the cancelled state */ if (g_cancellable_is_cancelled (async->cancellable)) { async_data_free (...
false
false
false
false
false
0
supplicant_register(const struct supplicant_callbacks *callbacks) { connection = dbus_bus_get(DBUS_BUS_SYSTEM, NULL); if (connection == NULL) return -EIO; if (dbus_connection_add_filter(connection, supplicant_filter, NULL, NULL) == FALSE) { dbus_connection_unref(connection); connection = NULL; return -E...
false
false
false
false
false
0
SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name) { // ignore empty string if (!name || name[0] == '\0') { return; } vtkInformation *info = this->GetInputArrayInformatio...
false
false
false
false
false
0
multi_species_man_consensus_id_starts_with(ED4_base *base, AW_CL cl_start) { // TRUE if consensus id starts with 'start' ED4_multi_species_manager *ms_man = base->to_multi_species_manager(); char *start = (char*)cl_start; ED4_base *consensus = ms_man->search_spec_child_rek(ED4_L_SPECIES); if (consensus...
false
false
false
false
false
0
git_add_get_command_line (GiggleJob *job, gchar **command_line) { GiggleGitAddPriv *priv; GString *str; GList *files; priv = GET_PRIV (job); files = priv->files; str = g_string_new (GIT_COMMAND " add"); while (files) { g_string_append_printf (str, " \"%s\"", (gchar *) files->data); fil...
false
false
false
false
false
0
get_enemy_with_dialog(const char *dialog) { enemy *en; BROWSE_ALIVE_BOTS(en) { if (!strcmp(en->dialog_section_name, dialog)) { return en; } } BROWSE_DEAD_BOTS(en) { if (!strcmp(en->dialog_section_name, dialog)) { return en; } } return NULL; }
false
false
false
false
false
0
globus_gram_job_manager_validate_username( globus_gram_jobmanager_request_t * request) { char * tmp_str = NULL; char * buffer = NULL; struct passwd pwd; struct passwd * pwd_result = NULL; int ...
false
false
false
false
false
0
mouseReleaseEvent(QMouseEvent *event) { d->pressedPosition = QPoint(); d->rubberBandRect = QRect(); if (!d->categoryDrawerV2) { QListView::mouseReleaseEvent(event); return; } QHash<QString, Private::Block>::ConstIterator it(d->blocks.constBegin()); while (it != d->blocks.constEnd...
false
false
false
false
false
0