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
iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct station_info *sinfo) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_sta *mvmsta = iwl_mvm_st...
false
false
false
false
false
0
p_pw_preview_events_cb (GtkWidget *widget , GdkEvent *event , GapStbPropWidget *pw) { GdkEventExpose *eevent; GdkEventButton *bevent; GapStbMainGlobalParams *sgpp; if ((pw->stb_elem_refptr == NULL) || (pw->stb_refptr == NULL)) { /* the frame_widget is no...
false
false
false
false
false
0
storeValueBasedOnType(void *arr, long pos, GM_Writer& writer, VALUE_TYPE vt) { switch(vt) { case GMTYPE_BOOL: writer.write(((bool *)arr)[pos]); break; case GMTYPE_INT: writer.write(((int *)arr)[pos]); break; case GMTYPE_LONG: writer.write(((long *)arr)[pos]); break; case GMTYPE_FLOAT...
false
false
false
false
false
0
lpphy_set_tx_power_by_index(struct b43_wldev *dev, u8 index) { struct b43_phy_lp *lpphy = dev->phy.lp; struct lpphy_tx_gains gains; u32 iq_comp, tx_gain, coeff, rf_power; lpphy->tx_pwr_idx_over = index; lpphy_read_tx_pctl_mode_from_hardware(dev); if (lpphy->txpctl_mode != B43_LPPHY_TXPCTL_OFF) lpphy_set_tx_pow...
false
false
false
false
false
0
fso_gsm_at_command_sequence_append (FsoGsmAtCommandSequence* self, gchar** commands, int commands_length1) { gchar** _tmp0_ = NULL; gint _tmp0__length1 = 0; g_return_if_fail (self != NULL); _tmp0_ = commands; _tmp0__length1 = commands_length1; { gchar** cmd_collection = NULL; gint cmd_collection_length1 = 0; ...
false
false
false
false
false
0
throwError(ExecState *exec, ErrorType type, const char *message) { JSObject *error = Error::create(exec, type, message, -1, -1, NULL); exec->setException(error); return error; }
false
false
false
false
false
0
glusterd_clearlocks_create_mount (glusterd_volinfo_t *volinfo, char **mntpt) { int ret = -1; glusterd_conf_t *priv = NULL; char template[PATH_MAX] = {0,}; char *tmpl = NULL; priv = THI...
false
false
false
false
false
0
reverseBits(unsigned int p_nIndex, unsigned int p_nBits) { unsigned int i, rev; for(i=rev=0; i < p_nBits; i++) { rev = (rev << 1) | (p_nIndex & 1); p_nIndex >>= 1; } return rev; }
false
false
false
false
false
0
sort (char *base, int len) { int i, j; for (i = 0, j = len - 1; i < j; ++i) { char tmp; int curr; for (curr = i + 1, tmp = base[curr]; curr > 0 && tmp < base[curr - 1]; --curr) { base[curr] = base[curr - 1]; } base[curr] = tmp; } }
false
false
false
false
false
0
ajAlignValid(AjPAlign thys) { ajDebug("ajAlignValid format '%S' %d Nmin %d Nmax %d\n", thys->Formatstr, thys->Format, thys->Nmin, thys->Nmax); if(!thys->Format) /* test acdc-alignbadformat */ { if(ajStrGetLen(thys->Formatstr)) { if(!ajAlignFindFormat(thys->Formatstr, &thy...
false
false
false
false
false
0
test_u_code(PyObject *self) { PyObject *tuple, *obj; Py_UNICODE *value; Py_ssize_t len; /* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */ /* Just use the macro and check that it compiles */ x = Py_UNICODE_ISSPACE(25); tuple = PyTuple_New(1); if (tuple == NULL) ...
false
false
false
false
false
0
gwy_data_field_divide_fields(GwyDataField *result, GwyDataField *operand1, GwyDataField *operand2) { gdouble *p, *q, *r; gint xres, yres, i; g_return_if_fail(GWY_IS_DATA_FIELD(result)); g_return_if_fail (!gwy_data_field_check_compatibili...
false
false
false
false
false
0
set_bool_active(option_t *opt, gboolean active, gboolean do_toggle) { if (do_toggle) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt->checkbox), active); gtk_widget_set_sensitive(GTK_WIDGET(opt->info.bool.checkbox), active); gtk_widget_set_sensitive (GTK_WIDGET (opt->reset_btn), active); }
false
false
false
false
false
0
skip_pack_declarer (NODE_T * p) { /* Skip () REF [] REF FLEX [] [] .. */ while (p != NO_NODE && (is_one_of (p, SUB_SYMBOL, OPEN_SYMBOL, REF_SYMBOL, FLEX_SYMBOL, SHORT_SYMBOL, LONG_SYMBOL, STOP))) { FORWARD (p); } /* Skip STRUCT (), UNION () or PROC [()] */ if (p != NO_NODE && (is_one_of (p, STRUCT_SYMBOL, UNI...
false
false
false
false
false
0
app_exec(app_t *app, gboolean exit_at_app_launch) { gboolean spawned; g_assert(app != NULL); spawned = sys_spawn(app->cmdline, app->path); if (!spawned) { WARN("sys_spawn, cmdline:%s, path:%s", app->cmdline, app->path); return FALSE; } if (exit_at_app_launch) gtk_main_quit(); return TRUE; }
false
false
false
false
false
0
plugin_make_about_window (PluginHandle * plugin) { PluginMiscData * misc = plugin_get_misc_data (plugin, sizeof (PluginMiscData)); Plugin * header = plugin_get_header (plugin); if (misc->about_window) { gtk_window_present ((GtkWindow *) misc->about_window); return; } const char...
false
false
false
false
false
0
find_longest(void) { hs[1]=hrt[curcon[0]]; hs[2]=hrt[(curcon[1]+hs[1])&(HTLEN-1)]; hs[3]=hrt[(curcon[2]+hs[2])&(HTLEN-1)]; hs[4]=hrt[(curcon[3]+hs[3])&(HTLEN-1)]; usp=0; while(cmsp) cmask[cmstack[--cmsp]]=0; cslen=MAXCLEN+1; return find_next(); }
false
false
false
false
false
0
__mt9p031_get_pad_format(struct mt9p031 *mt9p031, struct v4l2_subdev_pad_config *cfg, unsigned int pad, u32 which) { switch (which) { case V4L2_SUBDEV_FORMAT_TRY: return v4l2_subdev_get_try_format(&mt9p031->subdev, cfg, pad); case V4L2_SUBDEV_FORMAT_ACTIVE: return &mt9p031->format; default: return NULL; ...
false
false
false
false
false
0
mtdoops_do_dump(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason) { struct mtdoops_context *cxt = container_of(dumper, struct mtdoops_context, dump); /* Only dump oopses if dump_oops is set */ if (reason == KMSG_DUMP_OOPS && !dump_oops) return; kmsg_dump_get_buffer(dumper, true, cxt->oops_buf ...
false
false
false
false
false
0
text_line_end(void *arg) { struct msg2html_textplain_info *info= (struct msg2html_textplain_info *)arg; /* ** Wrap up the lookahead mid-layer. */ if (info->lookahead_saved) process_text(info->lookahead_buf, info->lookahead_saved, info); /* ** Wrap up the URL collection layer. */ (*info->text_url_...
false
false
false
false
false
0
rem_signature_valid(struct remsig *sig, struct avstat *stbuf) { if(sig->modif.sec != stbuf->mtime.sec || sig->modif.nsec != stbuf->mtime.nsec || sig->size != stbuf->size) return 0; else return 1; }
false
false
false
false
false
0
Crhox( float *p_img, int *npix, int *image, int *lnew, double *krx ) { register int nxdim=0; register int ix=0; register int iy=0; int nrx=0; int nry=0; double sum=0; /* original FORTRAN code: IXA = IMAP(1) IMAP(1-4) => image[0-3] IXE = IMAP(2) IYA = IMAP(3) ...
false
false
false
false
false
0
PositionCalculator( const PG_Rect& rect, const ASCString& panelName ) { CGameOptions::PanelData pd; if ( CGameOptions::Instance()->getPanelData(panelName, pd) ) { pd.x = PG_Application::GetScreenWidth() - pd.x; PG_Rect r ( pd.x, pd.y, DashBoardWidth, rect.Height() ); if ( r.x + r.w > PG_...
false
false
false
false
false
0
g3_code_vector(vec3d * p) { ubyte cc=0; if (p->xyz.x > p->xyz.z) cc |= CC_OFF_RIGHT; if (p->xyz.y > p->xyz.z) cc |= CC_OFF_TOP; if (p->xyz.x < -p->xyz.z) cc |= CC_OFF_LEFT; if (p->xyz.y < -p->xyz.z) cc |= CC_OFF_BOT; if (p->xyz.z < MIN_Z ) cc |= CC_BEHIND; if ( G3_user_clip ) { // Check if behi...
false
false
false
false
false
0
ath10k_wmi_tlv_op_gen_pdev_set_rd(struct ath10k *ar, u16 rd, u16 rd2g, u16 rd5g, u16 ctl2g, u16 ctl5g, enum wmi_dfs_region dfs_reg) { struct wmi_tlv_pdev_set_rd_cmd *cmd; struct wmi_tlv *tlv; struct sk_buff *skb; skb = ath10k_wmi_alloc_skb(ar, sizeof(*tlv) + sizeof(*cmd)); if (!skb) return ERR...
false
false
false
false
false
0
updateValue(KJS::ExecState* exec, KJS::JSValue* val, QTreeWidgetItem* item, bool recurse) { // Note: parent is responsible for setting our name.. item->setText(1, valueToString(val)); if (recurse) { if (val->isObject()) { updateObjectPropertie...
false
false
false
false
false
0
Close() { if (this->is_new) jpeg_destroy_compress(&this->cinfo); else jpeg_destroy_decompress(&this->dinfo); imBinFileClose(this->handle); }
false
false
false
false
false
0
cache_sim_write_dimensions(SecureSaveInfo *ssi, CacheData *cd) { if (!cd || !cd->dimensions) return FALSE; secure_fprintf(ssi, "Dimensions=[%d x %d]\n", cd->width, cd->height); return TRUE; }
false
false
false
false
false
0
f_inputlist(argvars, rettv) typval_T *argvars; typval_T *rettv; { listitem_T *li; int selected; int mouse_used; rettv->vval.v_number = 0; #ifdef NO_CONSOLE_INPUT /* While starting up, there is no place to enter text. */ if (no_console_input()) return; #endif if (argvars[0].v_type...
false
false
false
false
false
0
gw_helper_db_disk_name_is_exist ( GWDBContext *context, gchar *name) { GWCatalogPlugin *plugin = NULL; gboolean exist = FALSE; GWDBDisk **disks = NULL; gint i = 0; if ( context != NULL && name != NULL) { if ( (plugin = (GWCatalogPlugin*)gw_db_context_get_plugin ( context)) != NULL) { if ( (disks = plugin->g...
false
false
false
false
false
0
_GXDraw_AllocGreys(GXDisplay *gdisp) { Display *display = gdisp->display; XColor xcolour; int step = 255/((1<<gdisp->depth)-1), r; for(r = 0; r < 256; r+=step ) { xcolour.red = r<<8; xcolour.green = r<<8; xcolour.blue = r<<8; XAllocColor(display,gdisp->cmap,&xcolour); } }
false
false
false
false
false
0
slotData( KIO::Job * , const QByteArray &data) { //kDebug(7007) << "data size:" << data.size(); Q_ASSERT(m_putJob); if (!m_putJob) return; // Don't crash m_getJob->d_func()->internalSuspend(); m_putJob->d_func()->internalResume(); // Drink the beer m_buffer += data; // On the first set of data inc...
false
false
false
false
false
0
isJpegType(BasicIo& iIo, bool advance) { bool result = true; byte tmpBuf[2]; iIo.read(tmpBuf, 2); if (iIo.error() || iIo.eof()) return false; if (0xff != tmpBuf[0] || JpegImage::soi_ != tmpBuf[1]) { result = false; } if (!advance || !result ) iIo....
false
false
false
false
false
0
lookup (const char *key, hel *hashtab[], int size) /* Function to search a hash table for the first occurence of a particular key. The hash index is calculated to get to the proper bucket, then the linked list is searched sequentially. The insertion strategy insures that the most recently installed entry for ...
false
false
false
false
false
0
usn_bepostop_init(Slapi_PBlock *pb) { int rc = SLAPI_PLUGIN_SUCCESS; Slapi_Entry *plugin_entry = NULL; char *plugin_type = NULL; int postadd = SLAPI_PLUGIN_BE_POST_ADD_FN; int postmod = SLAPI_PLUGIN_BE_POST_MODIFY_FN; int postmdn = SLAPI_PLUGIN_BE_POST_MODRDN_FN; int postdel = SLAPI_PLUGIN_B...
false
false
false
false
false
0
before(struct Point *p, struct Point *q, struct Line *e) { double x1, y1, z1, x2, y2, z2; int status; if (e == NULL) return 1; status = Vect_segment_intersection(p->x, p->y, 0, q->x, q->y, 0, e->p1->x, e->p1->y, 0, e->p2->x, e->p2->y, 0, &x1, &y1, &z1, &x2, &y2, &z2, 0) == 0; return...
false
false
false
false
false
0
potrustobj(obj) struct obj *obj; { if (is_corrodeable(obj) && obj->oeroded2 < MAX_ERODE) { if (obj->greased || obj->oerodeproof || (obj->blessed && rn2(3))) { /* pass */ /* if (obj->greased && !rn2(2)) obj->greased = 0; */ } else { if (!Blind) Your("%s%s!", aobjnam(obj, "rust"), (obj->oeroded2...
false
false
false
false
false
0
cli_htu32_init(struct cli_htu32 *s, size_t capacity, mpool_t *mempool) { if(!s) return CL_ENULLARG; PROFILE_INIT(s); capacity = nearest_power(capacity); s->htable = mpool_calloc(mempool, capacity, sizeof(*s->htable)); if(!s->htable) return CL_EMEM; s->capacity = capacity; s->used = 0; s->maxfill = 8*capac...
false
false
false
false
false
0
wifi_nl80211_get_mode (WifiData *data) { WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data; struct nl80211_iface_info iface_info = { .mode = NM_802_11_MODE_UNKNOWN, }; struct nl_msg *msg; msg = nl80211_alloc_msg (nl80211, NL80211_CMD_GET_INTERFACE, 0); if (nl80211_send_and_recv (nl80211, msg, nl80211_iface_...
false
false
false
false
false
0
SetPathName(const char* path) { delete _pathname; if (path) _pathname = strdup(path); }
false
false
false
false
false
0
check_credentials(struct ntb_ipc *ipc, int sock) { uid_t uid; if (!get_peer_uid(sock, &uid)) { ntb_log("Error getting credentials for IPC connection: %s", strerror(errno)); return false; } if (uid != 0 && uid !=...
false
false
false
false
false
0
VP8ParseIntraMode(VP8BitReader* const br, VP8Decoder* const dec) { uint8_t* const top = dec->intra_t_ + 4 * dec->mb_x_; uint8_t* const left = dec->intra_l_; VP8MBData* const block = dec->mb_data_; block->is_i4x4_ = !VP8GetBit(br, 145); // decide for B_PRED first if (!block->is_i4x4_) { // Hardcoded 16x...
false
true
false
false
false
1
ds2760_battery_update_status(struct ds2760_device_info *di) { int old_charge_status = di->charge_status; ds2760_battery_read_status(di); if (di->charge_status == POWER_SUPPLY_STATUS_UNKNOWN) di->full_counter = 0; if (power_supply_am_i_supplied(di->bat)) { if (di->current_uA > 10000) { di->charge_status = ...
false
false
false
false
false
0
create_array_type_for_decl (tree name, tree type, tree size) { tree itype = NULL_TREE; /* If things have already gone awry, bail now. */ if (type == error_mark_node || size == error_mark_node) return error_mark_node; /* 8.3.4/1: If the type of the identifier of D contains the auto type-specifier, th...
false
false
false
false
false
0
uv_nmi_cleanup_mask(void) { int cpu; for_each_cpu(cpu, uv_nmi_cpu_mask) { uv_cpu_nmi_per(cpu).pinging = 0; uv_cpu_nmi_per(cpu).state = UV_NMI_STATE_OUT; cpumask_clear_cpu(cpu, uv_nmi_cpu_mask); } }
false
false
false
false
false
0
_ecore_con_url_data_cb(void *buffer, size_t size, size_t nitems, void *userp) { Ecore_Con_Url *url_con; Ecore_Con_Event_Url_Data *e; size_t real_size = size * nitems; url_con = (Ecore_Con_Url *)userp; if (!url_con) return -1; if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) { ...
false
true
false
false
false
1
unpackSignalLocation(const Level &level, unsigned int packedSignalLocation, SignalLocation *pSignalLocation, bool *pWithinGrid, string *pMsg) { if (packedSignalLocation & 0xc000) { if (pMsg) { ...
false
false
false
false
false
0
begin_drag (GtkWidget *widget, GdkEvent *event, GitgDndData *data) { GtkTreeView *tree_view = GTK_TREE_VIEW (widget); gint hot_x; gint hot_y; GitgCellRendererPath *cell; GitgRef *ref = get_ref_at_pos (tree_view, (gint)data->x, ...
false
false
false
false
false
0
FormatStatus(wxInt32 item, wxString& strBuffer) const { CWork* work; try { work = m_WorkCache.at(m_iSortedIndexes[item]); } catch ( std::out_of_range ) { work = NULL; } if (work) { strBuffer = work->m_strStatus; } else { strBuffer = wxEmptyString; }...
false
false
false
false
false
0
wslay_event_call_on_frame_recv_start_callback (wslay_event_context_ptr ctx, const struct wslay_frame_iocb *iocb) { if(ctx->callbacks.on_frame_recv_start_callback) { struct wslay_event_on_frame_recv_start_arg arg; arg.fin = iocb->fin; arg.rsv = iocb->rsv; arg.opcode = iocb->opcode; arg.payload_leng...
false
false
false
false
false
0
max_handles (void) { ACE_TRACE ("ACE::max_handles"); #if defined (RLIMIT_NOFILE) && !defined (ACE_LACKS_RLIMIT) rlimit rl; int const r = ACE_OS::getrlimit (RLIMIT_NOFILE, &rl); # if !defined (RLIM_INFINITY) if (r == 0) return rl.rlim_cur; # else if (r == 0 && rl.rlim_cur != RLIM_INFINITY) return rl.rl...
false
false
false
false
false
0
Java_java_awt_BDFontMetrics_stringWidthN(JNIEnv * env, jobject obj, jlong ftFace, jstring string) { #ifdef HAVE_FT2 jsize length; const jchar *chars; jint i, width; FT_Face face = (FT_Face)(intptr_t)ftFace; if (!face) { return 0; } length = (*env)->GetStringLength(env, string); ...
false
false
false
false
false
0
ixsysdep_user_file_mode (zfile) const char *zfile; { uid_t ieuid; gid_t iegid; int iret; struct stat s; if (! fsuser_perms (&ieuid, &iegid)) return 0; iret = stat ((char *) zfile, &s); if (! fsuucp_perms ((long) ieuid, (long) iegid)) return 0; if (iret != 0) { ulog (LOG_ERROR,...
false
false
false
false
false
0
listEntry( const UDSEntry& entry, bool _ready ) { static const int maximum_updatetime = 300; // We start measuring the time from the point we start filling the list if (d->pendingListEntries.isEmpty()) { d->m_timeSinceLastBatch.restart(); } if (!_ready) { d->pendingListEntries.appe...
false
false
false
false
false
0
token_skip_whitespace(struct config_file *file) { char *p = file->current; while (*p == ' ' || *p == '\t') p++; while (*p == '\0') { if (!file_read(file)) return false; p = file->current; while (*p == ' ' || *p == '\t') p++; } file->current = ...
false
false
false
false
false
0
unpack_border(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { if (i == nmax) grow(0); x[i][0] = buf[m++]; x[i][1] = buf[m++]; x[i][2] = buf[m++]; tag[i] = static_cast<int> (buf[m++]); type[i] = static_cast<int> (buf[m++]); mas...
false
false
false
false
false
0
r_undouble(struct SN_env * z) { { int m_test = z->l - z->c; /* test, line 91 */ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; if (!(find_among_b(z, a_2, 3))) return 0; /* among, line 91 */ z->c = z->l - m_test; } z->ket ...
false
false
false
false
false
0
register_archive (GType command_type) { if (Registered_Archives == NULL) Registered_Archives = g_ptr_array_sized_new (5); g_ptr_array_add (Registered_Archives, fr_registered_archive_new (command_type)); }
false
false
false
false
false
0
test_get_object_list (ETestServerFixture *fixture, gconstpointer user_data) { ECal *cal; ECalComponent *e_component; icalcomponent *component; icalcomponent *component_final; gchar *uid; GList *components; cal = E_TEST_SERVER_UTILS_SERVICE (fixture, ECal); ecal_test_utils_create_componen...
false
false
false
false
false
0
get_params (char *name, struct ifreq *ifr, int sock, unsigned mask) { char *dup; struct yamdrv_ioctl_cfg yamctl; ifr->ifr_data = (caddr_t) & yamctl; yamctl.cmd = SIOCYAMGCFG; if (ioctl (sock, SIOCDEVPRIVATE, ifr) == -1) { fprintf (stderr, "%s: Error %s (%i), cannot ioctl SIOCYAMGCFG on %s\n", name, strer...
false
false
false
false
false
0
fsysdep_chdir (zdir) const char *zdir; { if (zdir == NULL || *zdir == '\0') { zdir = getenv ("HOME"); if (zdir == NULL) { ulog (LOG_ERROR, "HOME not defined"); return FALSE; } } if (chdir (zdir) < 0) { ulog (LOG_ERROR, "chdir (%s): %s", zdir, strerror (errno)); retur...
false
false
false
false
false
0
activate_row(GtkTreeSelection * selection) { GtkTreeIter iter; GtkTreeModel *model; gchar *path; if (!gtk_tree_selection_get_selected(selection, &model, &iter)) return; gtk_tree_model_get(model, &iter, PATH_COLUMN, &path, -1); next_filename = path; do_later(G_PRIORITY_DEFAULT, load...
false
false
false
false
false
0
evd_web_selector_add_service (EvdWebSelector *self, const gchar *domain_pattern, const gchar *path_pattern, EvdService *service, GError **error) { EvdWebSelectorCandidate *cand...
false
false
false
false
false
0
stmt_kills_ref_p_1 (gimple stmt, ao_ref *ref) { if (gimple_has_lhs (stmt) && TREE_CODE (gimple_get_lhs (stmt)) != SSA_NAME /* The assignment is not necessarily carried out if it can throw and we can catch it in the current function where we could inspect the previous value. ??? We only need to care...
false
false
false
false
false
0
fotg210_ep0_queue(struct fotg210_ep *ep, struct fotg210_request *req) { if (!req->req.length) { fotg210_done(ep, req, 0); return; } if (ep->dir_in) { /* if IN */ fotg210_start_dma(ep, req); if ((req->req.length == req->req.actual) || (req->req.actual < ep->ep.maxpacket)) fotg210_done(ep, req, 0)...
false
false
false
false
false
0
resize(struct elasticarray * EA, size_t nsize) { size_t nalloc; void * nbuf; /* Figure out how large an allocation we want. */ if (EA->alloc < nsize) { /* We need to enlarge the buffer. */ nalloc = EA->alloc * 2; if (nalloc < nsize) nalloc = nsize; } else if (EA->alloc > nsize * 4) { /* We need to shri...
false
false
false
false
true
1
push (var_store_ptr push_value, parser_env_ptr pe) { if (pe->stack_cnt > pe->stack_size) { pe->stack_size += STACK_INIT; pe->stack = g_realloc (pe->stack, pe->stack_size * sizeof (var_store_ptr)); } /* endif */ pe->stack[(pe->stack_cnt)++] = push_value;...
false
false
false
false
false
0
parseSelectionType(tokenInfo *const token) { if (!isType(token, TOKEN_LOWER_IDENTIFIER)) return FALSE; readToken(token); if (!isType(token, TOKEN_ANGLE_BRACKET_OPEN)) { DebugStatement(debugPrintf(DEBUG_PARSE, "\n Parse Error in %s, expected:{, got:%s\n", __FUNCTION__, vStringValue(token->string))); ...
false
false
false
false
false
0
pdf_end_encrypt(gx_device_pdf * pdev) { if (pdev->KeyLength) { stream *s = pdev->strm; stream *fs = s->strm; sclose(s); gs_free_object(pdev->pdf_memory, s->cbuf, "encrypt buffer"); gs_free_object(pdev->pdf_memory, s, "encrypt stream"); pdev->strm = fs; } }
false
false
false
false
false
0
R2ReadWiseFile(RNArray<R2Span *>& spans, const char *filename) { FILE *fp; char buffer[1024]; char *bufferp; int line_count = 0; char keyword[64], filetype[64]; int wall_count; double x1, y1, z1, x2, y2, z2; double dummy; int matid; // Open file fp = fopen(filename, "r"); ...
false
false
false
false
true
1
remove_particle_in( GenParticle* particle ) { /// this finds *particle in m_particles_in and removes it from that list if ( !particle ) return; m_particles_in.erase( already_in_vector( &m_particles_in, particle ) ); }
false
false
false
false
false
0
check_bracket_match_pair(const char *formula, const char *formula_end) { int ret; struct letter_stack stack; char tmp; ret = letter_stack_init(&stack, 10); if (ret < 0) { error_msg("letter_stack_init"); return ret; } while (formula < formula_end) { switch (*formula) { case '(': case '[': case '...
false
false
false
false
false
0
print_node (NODE *node) { FILE *printer_pipe; char *print_command = getenv ("INFO_PRINT_COMMAND"); int piping = 0; if (!print_command || !*print_command) print_command = DEFAULT_INFO_PRINT_COMMAND; /* Note that on MS-DOS/MS-Windows, this MUST open the pipe in the (default) text mode, since the prin...
false
false
false
false
true
1
get_globusid() { char * globusid; char * globusid_tmp; gss_name_t server_name = GSS_C_NO_NAME; gss_buffer_desc server_buffer_desc = GSS_C_EMPTY_BUFFER; gss_buffer_t server_buffer = &server_buffer_desc; OM_uint32 major_status = 0; OM_uint32 ...
false
false
false
false
false
0
classify_data (const byte * buf, size_t len) { int type; unsigned int i; if (buf[0] == '0' && (buf[1] == 'x' || buf[1] == 'X')) { /* Skip hex prefix. */ buf += 2; len -= 2; } /* The length of the data does not match either a keyid or a fingerprint. */ if (len !=...
false
false
false
false
false
0
sanitize(char *s) /* replace ' by _ */ { char *cp; for (cp = s; (cp = strchr (cp, '\'')); cp++) *cp = '_'; }
false
false
false
false
false
0
do_range_for_auto_deduction (tree decl, tree range_expr) { tree auto_node = type_uses_auto (TREE_TYPE (decl)); if (auto_node) { tree begin_dummy, end_dummy, range_temp, iter_type, iter_decl; range_temp = convert_from_reference (build_range_temp (range_expr)); iter_type = (cp_parser_perform_ran...
false
false
false
false
false
0
text_editor_command (TextEditor *te, gint command, glong wparam, glong lparam) { GList *node; node = te->views; while (node) { aneditor_command (GPOINTER_TO_INT (node->data), command, wparam, lparam); node = g_list_next(node); } }
false
false
false
false
false
0
____lambda27_ (gconstpointer _val1, gconstpointer _val2) { gint result = 0; glong val1 = 0L; gconstpointer _tmp0_ = NULL; glong val2 = 0L; gconstpointer _tmp1_ = NULL; glong _tmp2_ = 0L; glong _tmp3_ = 0L; _tmp0_ = _val1; val1 = (glong) _tmp0_; _tmp1_ = _val2; val2 = (glong) _tmp1_; _tmp2_ = val1; _tmp3_ =...
false
false
false
false
false
0
eepromChecksum(void *memory, int size) { uint8_t *p; int i; p = (uint8_t *)memory; for (i = 0; i < size; i++) { eepromData.ck[0] += *p++; eepromData.ck[1] += eepromData.ck[0]; } }
false
false
false
false
false
0
blkcpy(oav, bv) char **oav; char **bv; { char **av = oav; while ((*av++ = *bv++)) continue; return (oav); }
false
false
false
false
false
0
operator=(plKeyData* other) { if (fKeyData != other) { if (other != NULL) other->Ref(); if (fKeyData != NULL) fKeyData->UnRef(); fKeyData = other; } return *this; }
false
false
false
false
false
0
_pcre_find_bracket(const uschar *code, BOOL utf8, int number) { for (;;) { register int c = *code; if (c == OP_END) return NULL; /* XCLASS is used for classes that cannot be represented just by a bit map. This includes negated single high-valued characters. The length in the table is zero; the actual lengt...
false
false
false
false
false
0
eng_gl_img_obj_set(void *data, void *image, int has_alpha) { Render_Engine *re = (Render_Engine *)data; gl_direct_img_obj = NULL; // Normally direct rendering isn't allowed if alpha is on and // rotation is not 0. BUT, if override is on, allow it. if ((has_alpha) || (re->win->gl_context->rot!=0)) ...
false
false
false
false
false
0
width(const char *text) { if (!text) return 0; long ucs[MAX_TEXT_LENGTH]; int num_chars = decodeUTF8(text, ucs, sizeof(ucs)/sizeof(long)); return getWidth(ucs, &num_chars); }
false
false
false
false
false
0
qxl_release_reserve_list(struct qxl_release *release, bool no_intr) { int ret; struct qxl_bo_list *entry; /* if only one object on the release its the release itself since these objects are pinned no need to reserve */ if (list_is_singular(&release->bos)) return 0; ret = ttm_eu_reserve_buffers(&release->ti...
false
false
false
false
false
0
text_check_changes(GF_Node *node, TextStack *stack, GF_TraverseState *tr_state) { if (gf_node_dirty_get(node) || tr_state->visual->compositor->reset_fonts) { text_clean_paths(tr_state->visual->compositor, stack); build_text(stack, (M_Text*)node, tr_state); gf_node_dirty_clear(node, 0); drawable_mark_modified(s...
false
false
false
false
false
0
_get_track_green_cdrdao(void *user_data, track_t i_track) { _img_private_t *env = user_data; if (!env->gen.init) _init_cdrdao(env); if (i_track > env->gen.i_tracks || i_track == 0) return false; return env->tocent[i_track-env->gen.i_first_track].track_green; }
false
false
false
false
false
0
example_call_connection_manager_constructed (GObject *object) { ExampleCallConnectionManager *self = EXAMPLE_CALL_CONNECTION_MANAGER (object); TpBaseConnectionManager *base = (TpBaseConnectionManager *) self; void (*constructed) (GObject *) = ((GObjectClass *) example_call_connection_manager_parent_class)...
false
false
false
false
false
0
onKeyPress(FXObject*,FXSelector sel,void* ptr){ FXEvent* event=(FXEvent*)ptr; flags&=~FLAG_TIP; if(pane && pane->shown() && pane->handle(pane,sel,ptr)) return 1; if(isEnabled()){ if(target && target->tryHandle(this,FXSEL(SEL_KEYPRESS,message),ptr)) return 1; if(event->code==KEY_space || event->code==KEY...
false
false
false
false
false
0
secu_PrintCRLDistPtsExtension(FILE *out, SECItem *value, char *msg, int level) { CERTCrlDistributionPoints * dPoints; PLArenaPool * pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (!pool) { SECU_PrintError("Error", "Allocating new ArenaPool"); return; } dPoints = CERT_DecodeCRLDistributionPoints(...
false
false
false
false
false
0
pdp_ppp_internal_onDisconnectFromAtPPP (PdpPppInternal* self, GAtPPPDisconnectReason reason) { FsoFrameworkLogger* _tmp0_ = NULL; GAtPPPDisconnectReason _tmp1_ = 0; const gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; gchar* _tmp4_ = NULL; g_return_if_fail (self != NULL); _tmp0_ = ((FsoFrameworkAbstractObject*) sel...
false
false
false
false
false
0
igbvf_print_device_info(struct igbvf_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; struct net_device *netdev = adapter->netdev; struct pci_dev *pdev = adapter->pdev; if (hw->mac.type == e1000_vfadapt_i350) dev_info(&pdev->dev, "Intel(R) I350 Virtual Function\n"); else dev_info(&pdev->dev, "Intel(R) ...
false
false
false
false
false
0
InitArchiveFmt_Custom(ArchiveHandle *AH) { lclContext *ctx; /* Assuming static functions, this can be copied for each format. */ AH->ArchiveEntryPtr = _ArchiveEntry; AH->StartDataPtr = _StartData; AH->WriteDataPtr = _WriteData; AH->EndDataPtr = _EndData; AH->WriteBytePtr = _WriteByte; AH->ReadBytePtr = _ReadBy...
false
false
true
false
true
1
UpdateValue(const WatchesProperty* watch) { Map::iterator it = s_dialogs.find(watch->GetWatch().get()); if (it != s_dialogs.end()) it->second->SetValue(watch); }
false
false
false
false
false
0
gotya_draw_status_row( struct mame_bitmap *bitmap, int sx, int col ) { int row; if (flip_screen) { sx = 35 - sx; } for (row = 29; row >= 0; row--) { int sy; if (flip_screen) { sy = row; } else { sy = 31 - row; } drawgfx(bitmap,Machine->gfx[0], gotya_videoram2[...
false
false
false
false
false
0
makeDPats2(h,n) /* generate pattern list */ Cell h; /* by putting two new patterns with*/ Int n; { /* head h and new var components */ List us = getDiVars(2*n); List vs = NIL; Cell p; Int i; for (i=0, p=h; i<n; ++i) { /* make first version of pattern */ p = ap(p,hd(us)); us = tl...
false
false
false
false
false
0
sorted_list_insert(sorted_list_type* list, void* item) { sorted_list_node *node, *p; p = &(list->root); while(p->next != NULL && list->compare(item, p->next->data) > 0) { p = p->next; } node = xmalloc(sizeof *node); node->next = p->next; node->data = item; p->next = node; }
false
false
false
false
false
0
fs_config_get_const_string(const char *key) { if (!g_initialized) { initialize(); } const char *value = (const char *) fs_hash_table_lookup(g_hash_table, key); if (value && !value[0]) { // an empty string is treated as non-existing (unset value) return NULL; } return valu...
false
false
false
false
false
0
FreeVfd(File file) { Vfd *vfdP = &VfdCache[file]; DO_DB(elog(LOG, "FreeVfd: %d (%s)", file, vfdP->fileName ? vfdP->fileName : "")); if (vfdP->fileName != NULL) { free(vfdP->fileName); vfdP->fileName = NULL; } vfdP->fdstate = 0x0; vfdP->nextFree = VfdCache[0].nextFree; VfdCache[0].nextFree = fil...
false
false
false
false
false
0