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
stars_pre_level_init(bool clear_backgrounds) { uint idx, i; starfield_bitmap *sb = NULL; if (clear_backgrounds) { // Goober5000 - clear entire array, including backgrounds that will be unused for (i = 0; i < MAX_BACKGROUNDS; i++) { Backgrounds[i].suns.clear(); Backgrounds[i].bitmaps.clear(); } } s...
false
false
false
false
false
0
ql_loopback_test(struct ql_adapter *qdev, u64 *data) { *data = ql_start_loopback(qdev); if (*data) goto out; *data = ql_run_loopback_test(qdev); out: ql_stop_loopback(qdev); return *data; }
false
false
false
false
false
0
is_disabled (GsmApp *app) { GsmAutostartAppPrivate *priv; const char *current_desktop; priv = GSM_AUTOSTART_APP (app)->priv; /* GSM_AUTOSTART_APP_ENABLED_KEY key, used by old gnome-session */ if (g_desktop_app_info_has_key (priv->app_info, ...
false
false
false
false
false
0
TCSP_ForceClear_Internal(TCS_CONTEXT_HANDLE hContext) /* in */ { UINT64 offset = 0; UINT32 paramSize; TSS_RESULT result; BYTE txBlob[TSS_TPM_TXBLOB_SIZE]; LogDebug("Entering Force Clear"); if ((result = ctx_verify_context(hContext))) return result; if ((result = tpm_rqu_build(TPM_ORD_ForceClear, &offset, txB...
false
false
false
false
false
0
fso_gsm_lib_gsm0710mux_transport_real_read (FsoFrameworkTransport* base, void* data, gint length) { FsoGsmLibGsm0710muxTransport * self; gint result = 0; gint _tmp0_ = 0; gint _tmp1_ = 0; gint _tmp2_ = 0; void* _tmp3_ = NULL; gchar* _tmp4_ = NULL; gint _tmp4__length1 = 0; gint _tmp5_ = 0; gint l = 0; gint _t...
false
false
false
false
false
0
xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { /* * Optimization: use streaming patterns when the XPath expression can * be compiled to a stream lookup */ xmlPatternPtr stream; xmlXPathCompExprPtr comp; xmlDictPtr dict = NULL; const xmlChar **namespaces = NULL...
false
false
false
false
false
0
gcr_system_prompt_close_finish (GcrSystemPrompt *self, GAsyncResult *result, GError **error) { g_return_val_if_fail (GCR_IS_SYSTEM_PROMPT (self), FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (g_simple_asyn...
false
false
false
false
false
0
tailCall(VM &vm, const Location &loc, int nCallerArgs) { vm.needStack(1); int nArgs = vm.nActualArgs; if (nCallerArgs) { ELObj **oldFrame = vm.sp - nArgs; ELObj **newFrame = oldFrame - nCallerArgs; for (int i = 0; i < nArgs; i++) newFrame[i] = oldFrame[i]; vm.frame = newFrame; vm.sp = ne...
false
false
false
false
false
0
union_components( __isl_take isl_union_map *umap, int *exact) { int i; int n; isl_ctx *ctx; isl_basic_map **list = NULL; isl_basic_map **next; isl_union_map *path = NULL; struct isl_tc_follows_data data; struct isl_tarjan_graph *g = NULL; int c, l; int recheck = 0; n = 0; if (isl_union_map_foreach_map(uma...
false
false
false
true
false
1
make_table (insn_table *isa, decode_table *rules, model_entry *model) { insn_entry *insn; gen_list *entry = ZALLOC (gen_list); entry->table = ZALLOC (gen_entry); entry->table->top = entry; entry->model = model; entry->isa = isa; for (insn = isa->insns; insn != NULL; insn = insn->next) { if (mode...
false
false
false
false
false
0
gender(mtmp) register struct monst *mtmp; { if (is_neuter(mtmp->data)) return 2; return mtmp->female; }
false
false
false
false
false
0
ix86_pragma_target_parse (tree args, tree pop_target) { tree prev_tree = build_target_option_node (); tree cur_tree; struct cl_target_option *prev_opt; struct cl_target_option *cur_opt; int prev_isa; int cur_isa; int diff_isa; enum processor_type prev_arch; enum processor_type prev_tune; enum proces...
false
false
false
false
false
0
XGI_SetYFilter(unsigned short ModeIdIndex, struct vb_device_info *pVBInfo) { unsigned short tempbx, index; unsigned char const *filterPtr; unsigned char tempcl, tempch, tempal; XGI_GetTVPtrIndex2(&tempbx, &tempcl, &tempch, pVBInfo); /* bx, cl, ch */ switch (tempbx) { case 0x00: case 0x04: filterPtr = N...
false
false
false
false
false
0
Blox_MoveThink(edict_t * self) { vec3_t start, end, endp, offset; vec3_t forward, right, up, angles; trace_t tr; // zucc compensate for weapon ride up VectorAdd(self->owner->client->v_angle, self->owner->client->kick_angles, angles); AngleVectors(angles, forward, right, up); VectorSet(offset, 24, 8, self->owne...
false
false
false
false
false
0
port_power(struct sl811 *sl811, int is_on) { struct usb_hcd *hcd = sl811_to_hcd(sl811); /* hub is inactive unless the port is powered */ if (is_on) { if (sl811->port1 & USB_PORT_STAT_POWER) return; sl811->port1 = USB_PORT_STAT_POWER; sl811->irq_enable = SL11H_INTMASK_INSRMV; } else { sl811->port1 = 0; ...
false
false
false
false
false
0
tia_detect(const GwyFileDetectInfo *fileinfo, gboolean only_name) { gint score = 0; if (only_name) return g_str_has_suffix(fileinfo->name_lowercase, EXTENSION) ? 20 : 0; if (fileinfo->buffer_len > MAGIC_SIZE && memcmp(fileinfo->head, MAGIC1, MAGIC_SIZE) == 0) score = 100; if (...
false
false
false
false
false
0
kvaser_usb_reset_tx_urb_contexts(struct kvaser_usb_net_priv *priv) { int i, max_tx_urbs; max_tx_urbs = priv->dev->max_tx_urbs; priv->active_tx_contexts = 0; for (i = 0; i < max_tx_urbs; i++) priv->tx_contexts[i].echo_index = max_tx_urbs; }
false
false
false
false
false
0
translateXCoords(int &x, ReferenceCorner dir) const { int head = getOnHead(), bw = 2 * frame().window().borderWidth(), left = screen().maxLeft(head), right = screen().maxRight(head); if (dir == LEFTTOP || dir == LEFT || dir == LEFTBOTTOM) x += left; if (dir == RIGHTTOP || dir == RIGHT || di...
false
false
false
false
false
0
boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type) { Glib::Threads::Mutex::Lock guard (the_lock()); pair<void*,const char*> newpair (ptr, type); interesting_pointers().insert (newpair); if (debug_out) { cerr << "Interesting object @ " << ptr << " of type " << type << endl; } }
false
false
false
false
false
0
spy_sabotage_request(struct widget *pWidget) { if (NULL != game_unit_by_number(pDiplomat_Dlg->diplomat_id) && NULL != game_city_by_number(pDiplomat_Dlg->diplomat_target_id)) { request_diplomat_answer(DIPLOMAT_SABOTAGE, pDiplomat_Dlg->diplomat_id, pDiplomat_Dlg->diplomat_target_id...
false
false
false
false
false
0
fill_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration (uint8_t set_selector, uint8_t option_12, uint8_t option_60_with_option_43, uint8_t random_back_off, fiid_obj_t obj_cmd_rq) { if (IPMI_DCMI_DHCP_INCLUDE_OPTION_VALID (option_12) || IPMI_DCMI_DHCP_INCL...
false
false
false
false
false
0
test_properties (Test *test, gconstpointer unused) { gchar *directory; g_object_get (test->collection, "directory", &directory, NULL); g_assert_cmpstr (directory, ==, test->directory); g_free (directory); }
false
false
false
false
false
0
soap_wsse_element_end_in(struct soap *soap, const char *tag1, const char *tag2) { if (soap->event == SOAP_SEC_DECRYPT && soap->dom && soap->dom->elts && !soap_match_tag(soap, tag1, ":CipherValue")) { struct soap_dom_element *dom = soap->dom->elts; soap->event = 0; /* disable DOM */ soap->dom = NU...
false
false
false
false
false
0
determine_online_status(xmlNode * node_state, node_t * this_node, pe_working_set_t * data_set) { gboolean online = FALSE; const char *shutdown = NULL; const char *exp_state = crm_element_value(node_state, XML_NODE_EXPECTED); if (this_node == NULL) { crm_config_err("No node to check"); r...
false
false
false
false
false
0
GetCTestCommand() { if ( this->CTestCommand.empty() ) { this->CTestCommand = this->FindCMakeProgram("ctest"); } if ( this->CTestCommand.empty() ) { cmSystemTools::Error("Cannot find the CTest executable"); this->CTestCommand = "CTEST-COMMAND-NOT-FOUND"; } return this->CTestCommand.c_st...
false
false
false
false
false
0
H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int fwidth, haddr_t heap_addr) { H5G_node_t *sn = NULL; H5HL_t *heap = NULL; unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ ...
false
false
false
false
false
0
__Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t < '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; }
false
false
false
false
false
0
ni(A a){I i;for(*--Y=(I)a;a->n!=1||a->t&&!(a=ci(0));a=(A)*Y)aplus_err(9,(A)MN(*K));R i=*a->p,dc((A)*Y++),i;}
false
false
false
false
false
0
native_unsafe_object_field_offset(struct vm_object *this, struct vm_object *field) { struct vm_field *vmf; if (vm_java_lang_reflect_VMField != NULL) { /* Classpath 0.98 */ field = field_get_object(field, vm_java_lang_reflect_Field_f); } vmf = vm_object_to_vm_field(field); if (!vmf) return 0; return vm...
false
false
false
false
false
0
ls_lop(p_ls) p_ls_t p_ls; { /* p_node_t p_targ; ONLY NEEDED IF DEALLOCATING */ AS_HCODE(ls_check(p_ls);) as_cold(p_ls->length>0,"ls_lop: List is empty."); /* Make a note of the node being deleted. */ /* p_targ=p_ls->p_tail; ONLY NEEDED IF DEALLOCATED. */ /* If the target node was the only node, stitch up the ...
false
false
false
false
false
0
coloredName() const { return QString("<font color=\"%1\">%2</font>").arg(m_color.name(), m_name); }
false
false
false
false
false
0
gda_mysql_provider_close_connection (GdaServerProvider *provider, GdaConnection *cnc) { MysqlConnectionData *cdata; g_return_val_if_fail (GDA_IS_CONNECTION (cnc), FALSE); g_return_val_if_fail (gda_connection_get_provider (cnc) == provider, FALSE); /* Close the connection using the C API */ cdata =...
false
false
false
false
false
0
RCS_valid_rev (const char *rev) { char last, c; last = *rev++; if (!isdigit ((unsigned char) last)) return 0; while ((c = *rev++)) /* Extra parens placate -Wall gcc option */ { if (c == '.') { if (last == '.') return 0; continue; } ...
false
false
false
false
false
0
fullscreen_cb(Fl_Object *, void *arg) { static bool save_hidemenu_status = false; static double save_zoomfactor = 1.0; if (!fullScreen) { // coming into fullscreen, hide the main menu regardless of user preference save_hidemenu_status = hideMainMenu; hidemainmenu_cb(0,0); } else { if (!save_hidemen...
false
false
false
false
false
0
clear( bool createMainViewport ) { m_viewports.clear(); if (createMainViewport) createViewport("main"); }
false
false
false
false
false
0
m_initgrp(struct monst *mtmp, int x, int y, int n) /* make a group just like mtmp */ { coord mm; int cnt = rnd(n); struct monst *mon; #if defined(__GNUC__) && (defined(HPUX) || defined(DGUX)) /* There is an unresolved problem with several people finding that * the game hangs eating CPU; if interrup...
false
false
false
false
false
0
mpn_fft_fftinv (mp_ptr *Ap, mp_size_t K, mp_size_t omega, mp_size_t n, mp_ptr tp) { if (K == 2) { mp_limb_t cy; #if HAVE_NATIVE_mpn_add_n_sub_n cy = mpn_add_n_sub_n (Ap[0], Ap[1], Ap[0], Ap[1], n + 1) & 1; #else MPN_COPY (tp, Ap[0], n + 1); mpn_add_n (Ap[0], Ap[0], Ap[1], n + 1); cy ...
false
false
false
false
false
0
nbt_parse_compressed(const void* chunk_start, size_t length) { struct buffer decompressed = __decompress(chunk_start, length); if(decompressed.data == NULL) return NULL; nbt_node* ret = nbt_parse(decompressed.data, decompressed.len); buffer_free(&decompressed); return ret; }
false
false
false
false
false
0
output_queue(size_t line, ssize_t max) { ssize_t i, j; struct task *tasks = global.tasks; struct task *filtered_tasks = calloc(global.n, sizeof(*filtered_tasks)); OOM_CHECK(filtered_tasks); for (i=0,j=0;i<global.n;i++) { if (detail_selected == -1 || detail_is_selected(tasks[i].clamd_no-1)) { filtered_tasks[j+...
false
false
false
false
false
0
gf_seng_get_stream_config(GF_SceneEngine *seng, u32 idx, u16 *ESID, char * * const config, u32 *config_len, u32 *streamType, u32 *objectType, u32 *timeScale) { GF_StreamContext *sc = gf_list_get(seng->ctx->streams, idx); if (!sc || !ESID || !config || !config_len) return GF_BAD_PARAM; *ESID = sc->ESID; *config = sc...
false
false
false
false
false
0
add_keys_and_lengths(String *key_names, String *used_lengths) { bool first= TRUE; QUICK_SELECT_I *quick; List_iterator_fast<QUICK_SELECT_I> it(quick_selects); while ((quick= it++)) { if (first) first= FALSE; else { used_lengths->append(...
false
false
false
false
false
0
guild_getexp(struct map_session_data *sd, int exp) { struct guild_expcache *c; atn_bignumber tmp; nullpo_retv(sd); if (sd->status.guild_id == 0 || guild_search(sd->status.guild_id) == NULL) return; if ((c = (struct guild_expcache *)numdb_search(guild_expcache_db,sd->status.char_id)) == NULL) { c = (struct g...
false
false
false
false
false
0
gnac_ui_trayicon_menu_stop(gpointer data, gpointer user_data) { GtkWidget *main_window = gnac_ui_get_widget("main_window"); if (!gnac_ui_main_window_is_visible()) { gtk_window_move(GTK_WINDOW(main_window), root_x, root_y); gtk_widget_show_all(main_window); } gnac_ui_hide_tra...
false
false
false
false
false
0
be_openssl_outbuf_cb(struct evbuffer *buf, const struct evbuffer_cb_info *cbinfo, void *arg) { struct bufferevent_openssl *bev_ssl = arg; int r = 0; /* XXX need to hold a reference here. */ if (cbinfo->n_added && bev_ssl->state == BUFFEREVENT_SSL_OPEN) { if (cbinfo->orig_size == 0) r = bufferevent_add_eve...
false
false
false
false
false
0
Curl_ssl_shutdown(struct connectdata *conn, int sockindex) { if(curlssl_shutdown(conn, sockindex)) return CURLE_SSL_SHUTDOWN_FAILED; conn->ssl[sockindex].use = FALSE; /* get back to ordinary socket usage */ conn->ssl[sockindex].state = ssl_connection_none; conn->recv[sockindex] = Curl_recv_plain; conn->...
false
false
false
false
false
0
vxml_token_to_string(enum vxml_parser_token_value token) { static bool inited; if (!inited) { vxml_token_to_string_load(vxml_declaration_tokens, G_N_ELEMENTS(vxml_declaration_tokens)); vxml_token_to_string_load(vxml_misc_tokens, G_N_ELEMENTS(vxml_misc_tokens)); vxml_token_to_string_load(vxml_immediate_to...
false
false
false
false
false
0
del_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, bool pairwise, const u8 *mac_addr) { struct wilc_priv *priv; struct wilc *wl; perInterface_wlan_t *nic; priv = wiphy_priv(wiphy); nic = netdev_priv(netdev); wl = nic->wilc; /*delete saved keys, if any*/ if (netdev == wl->vif[...
false
false
false
false
false
0
WriteMII (char byMIISetByte, char byMIISetBit, char byMIIOP, int ioaddr) { int ReadMIItmp; int MIIMask; char byMIIAdrbak; char byMIICRbak; char byMIItemp; unsigned long ct; byMIIAdrbak = inb (byMIIAD); byMIICRbak = inb (byMIICR); outb (byMIICRbak & 0x7f, byMIICR); MIIDelay ();...
false
false
false
false
false
0
OTF_MasterControl_getValues( OTF_MasterControl* mc, uint32_t argument ) { uint32_t i; uint32_t last; uint32_t middle; if ( mc->n == 0 ) { return NULL; } i = 0; last = mc->n-1; while ( i < last+1 ) { middle = ( i + last ) / 2; if( mc->map[middle].argument < argument ) { i = middle + 1; }...
false
false
false
false
false
0
cfg_set_sflags(char *dname, char *sname, unsigned int mask, unsigned int bits) { struct cfg_section *section; section = cfg_get_sec(dname, sname); if (NULL == section) return 0; section->flags &= ~mask; section->flags |= bits; return section->flags; }
false
false
false
false
false
0
clip_buffer (GstTheoraDec * dec, GstBuffer * buf) { gboolean res = TRUE; GstClockTime in_ts, in_dur, stop; gint64 cstart, cstop; in_ts = GST_BUFFER_TIMESTAMP (buf); in_dur = GST_BUFFER_DURATION (buf); GST_LOG_OBJECT (dec, "timestamp:%" GST_TIME_FORMAT " , duration:%" GST_TIME_FORMAT, GST_TIME_...
false
false
false
false
false
0
model_get_rotating_submodel_axis(vec3d *model_axis, vec3d *world_axis, int modelnum, int submodel_num, object *obj) { polymodel *pm = model_get(modelnum); bsp_info *sm = &pm->submodel[submodel_num]; Assert(sm->movement_type == MOVEMENT_TYPE_ROT); if (sm->movement_axis == MOVEMENT_AXIS_X) { vm_vec_make(model_axi...
false
false
false
false
false
0
bgav_video_stream_keyframe_after(bgav_stream_t * s, int64_t time) { int pos; if(s->demuxer->index_mode == INDEX_MODE_SI_SA) { pos = s->first_index_position; while(pos <= s->last_index_position) { if((s->demuxer->si->entries[pos].stream_id == s->stream_id) && (s->demuxer->si->entri...
false
false
false
false
false
0
setTabMode(TabMode tabmode) { if (m_tabmode == tabmode) return false; bool ret = true; // setting tabmode to notset forces it through when // something is likely to change if (tabmode == NOTSET) tabmode = m_tabmode; m_tabmode = tabmode; // reparent tab container if (t...
false
false
false
false
false
0
gtk_plot_canvas_child_draw(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { if(canvas->freeze_count > 0) return; gtk_plot_pc_gsave(canvas->pc); GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->draw(canvas, child); gtk_plot_pc_grestore(canvas->pc); }
false
false
false
false
false
0
dstr(char* str, const char* src, int len) { int i; strncpy(str, src, len); str[len] = '\0'; for(i = len - 1; i >= 0; --i) { if(str[i] == '\0' || str[i] == ' ' || str[i] == '\t' || str[i] == '\r' || str[i] == '\n') { str[i] = '\0'; } else { return str; }; ...
false
false
false
false
false
0
SUBR_stat(ushort code) { const char *path; CSTAT *cstat; FILE_STAT info; bool follow = FALSE; SUBR_ENTER(); path = get_path(PARAM); if (NPARAM == 2) follow = SUBR_get_boolean(&PARAM[1]); FILE_stat(path, &info, follow); cstat = OBJECT_new(CLASS_Stat, NULL, NULL); OBJECT_UNREF_KEEP(cstat, "SUBR_stat"); ...
false
false
false
true
false
1
monster_use_bow(object *head, object *part, object *pl, int dir) { object *owner; rv_vector rv; sint16 x, y; mapstruct *map; if (!get_rangevector(part, pl, &rv, 1)) return 0; if (rv.distance > 100) /* Too far */ return 0; if (rv.distance_x != 0 && rv.distance_y != 0 ...
false
false
false
false
false
0
Add_Str_Stream(char *buff, int prop_other) { int stm; StmInf *pstm; StmProp prop; StrSInf *str_stream; str_stream = (buff) ? &static_str_stream_rd : &static_str_stream_wr; if (str_stream->ptr != NULL) /* in use ? */ { str_stream = (StrSInf *) Malloc(sizeof(StrSInf)); str_stream->buff_alloc_...
false
false
false
false
false
0
LruInsert(File file) { Vfd *vfdP; Assert(file != 0); DO_DB(elog(LOG, "LruInsert %d (%s)", file, VfdCache[file].fileName)); vfdP = &VfdCache[file]; if (FileIsNotOpen(file)) { while (nfile + numAllocatedDescs >= max_safe_fds) { if (!ReleaseLruFile()) break; } /* * The open could sti...
false
false
false
false
false
0
ps_setpaint (int rgb[]) { if (rgb[0] < 0) return; /* Some rgb's indicate no fill */ if (rgb[0] == PSL->current.rgb[0] && rgb[1] == PSL->current.rgb[1] && rgb[2] == PSL->current.rgb[2]) return; /* Same color as already set */ ps_place_color (rgb); fprintf (PSL->internal.fp, "\n"); /* Update the current color info...
false
false
false
false
false
0
jp_delete_record(const char *DB_name, buf_rec *br, int flag) { FILE *pc_in; PC3RecordHeader header; char PC_name[FILENAME_MAX]; if (br==NULL) { return EXIT_FAILURE; } g_snprintf(PC_name, sizeof(PC_name), "%s.pc3", DB_name); if ((br->rt==DELETED_PALM_REC) || (br->rt==MODIFIED_PALM_REC)) { ...
false
false
false
false
false
0
gda_sql_builder_get_property (GObject *object, guint param_id, G_GNUC_UNUSED GValue *value, GParamSpec *pspec) { GdaSqlBuilder *builder; builder = GDA_SQL_BUILDER (object); if (builder->priv) { switch (param_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); ...
false
false
false
false
false
0
Execute() { vtkErrorMacro(<< "Definition of Execute() method should be in subclass and you should really use the ExecuteData(vtkInformation *request,...) signature instead"); }
false
false
false
false
false
0
t1_hinter__dotsection(t1_hinter * self) { if (self->pole_count == 0 || self->pole[self->pole_count - 1].type != moveto) return 0; /* We store beginning dotsection hints only. */ if (self->disable_hinting) return 0; return t1_hinter__stem(self, dot, 0, 0, 0, 0); }
false
false
false
false
false
0
parse_token_request(struct webauth_context *ctx, const char *data, struct wai_webkdc_login_state *state) { struct webauth_keyring *ring; struct webauth_token *token; int s; /* * Decrypt the request token. * * FIXME: Move token_max_ttl processing here. */ if (...
false
false
false
false
false
0
rotate(float angle) { dirty |= DrtTransform; bool& infinityTransform = activeState().infinityTransform; infinityTransform |= isInfArg(angle); if (infinityTransform) return; activeState().transform.rotateRadians(angle); }
false
false
false
false
false
0
maze_solver_vi_pi_perform_results( struct maze_markov_decision_process *mdp, struct maze_markov_bellman_policy *policy ) { struct maze_markov_bellman_vlist *ret; unsigned int t; float maxs, tmpf; struct maze_markov_bellman_vlist *node, *nodenew; struct maze_solver_vi_list *tlist, *prectlist; struct maze_markov_...
false
false
false
false
false
0
sirdev_put_dongle(struct sir_dev *dev) { const struct dongle_driver *drv = dev->dongle_drv; if (drv) { if (drv->close) drv->close(dev); /* close this dongle instance */ dev->dongle_drv = NULL; /* unlink the dongle driver */ module_put(drv->owner);/* decrement driver's module refcount */ } return 0; }
false
false
false
false
false
0
putback_zspage(struct zs_pool *pool, struct size_class *class, struct page *first_page) { enum fullness_group fullness; BUG_ON(!is_first_page(first_page)); fullness = get_fullness_group(first_page); insert_zspage(first_page, class, fullness); set_zspage_mapping(first_page, class->index, fullness); if (fu...
false
false
false
false
false
0
update() { if(_active == false) return false; Timespan now = Clock::getSystemTicks(); return this->update(now); }
false
false
false
false
false
0
correlate( bool use_all, // if false, use only those equivalent to most capable vector<int>& ignore_devs ) { unsigned int i; if (!nvidia_gpus.size()) return; // identify the most capable non-ignored instance // bool first = true; for (i=0; i<nvidia_gpus.size(); i++) { if...
false
false
false
false
false
0
compute(int eflag, int vflag) { int i1,i2,i3,i4,n,type; double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z; if (eflag || vflag) ev_setup(eflag,vflag); else evflag = 0; double **x = atom->x; int **improperlist = neighbor->improperlist; int nimproperlist = neighbor->nimproperlist; for (n = 0; n < nimp...
false
false
false
false
false
0
ExecuteDoStmt(DoStmt *stmt) { InlineCodeBlock *codeblock = makeNode(InlineCodeBlock); ListCell *arg; DefElem *as_item = NULL; DefElem *language_item = NULL; char *language; char *languageName; Oid laninline; HeapTuple languageTuple; Form_pg_language languageStruct; /* Process options we got f...
false
false
true
true
false
1
mount_nodev(struct file_system_type *fs_type, int flags, void *data, int (*fill_super)(struct super_block *, void *, int)) { int error; struct super_block *s = sget(fs_type, NULL, set_anon_super, flags, NULL); if (IS_ERR(s)) return ERR_CAST(s); error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); if (erro...
false
false
false
false
false
0
DXInsertHashElement( HashTable hashTable, void *data ) { PseudoKey pseudoKey; int status; PseudoKey ( *hash ) (); #ifdef STATS hashTable->nInserts ++; #endif if ( NULL == ( hash = hashTable->hash ) ) pseudoKey = *( PseudoKey * ) data; else pseudoKey = ( *hash ) ( ( Key ) data )...
false
false
false
false
false
0
xsh_set_image_cpl_bpmap(cpl_image * image, cpl_image * bpmap,const int decode_bp) { int *bppix = NULL; assure( bpmap != NULL, CPL_ERROR_NULL_INPUT, "BpMap is NULL pointer" ); check(bppix = cpl_image_get_data_int (bpmap)); /* Set the bad pixel map array for the image */ xsh_flag_ima_bad_pix(&image,bppi...
false
false
false
false
false
0
check_duplicate_entry(struct mlx4_dev *dev, u8 port, enum mlx4_steer_type steer, unsigned int index, u32 qpn) { struct mlx4_steer *s_steer; struct mlx4_steer_index *tmp_entry, *entry = NULL; struct mlx4_promisc_qp *dqp, *tmp_dqp; if (port < 1 || port > dev->caps.num_ports) return NULL; s_steer = &m...
false
false
false
false
false
0
field_length(DB_RESULT result, int field) { int len; len = ((Dataset *) result)->fieldSize(field); GB_TYPE type = conv_type(((Dataset *) result)->fieldType(field)); //fprintf(stderr, "field_length: field = %d len = %d\n", field, len); if (type != GB_T_STRING) return 0; else return len; }
false
false
false
false
false
0
cmd_mktag(int argc, const char **argv, const char *prefix) { struct strbuf buf = STRBUF_INIT; unsigned char result_sha1[20]; if (argc != 1) usage("git mktag < signaturefile"); if (strbuf_read(&buf, 0, 4096) < 0) { die_errno("could not read from stdin"); } /* Verify it for some basic sanity: it needs to sta...
true
true
false
false
false
1
intel_crt_detect(struct drm_connector *connector, bool force) { struct drm_device *dev = connector->dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_crt *crt = intel_attached_crt(connector); struct intel_encoder *intel_encoder = &crt->base; enum intel_display_power_domain power_domain; enum...
false
false
false
false
false
0
http_init(Http_version *version) { Http *h; h = ALLOC(Http); h->sd = -1; if ((h->version = version) == NULL) { h->version = ALLOC(Http_version); h->version->major = HTTP_VERSION_MAJOR; h->version->minor = HTTP_VERSION_MINOR; } h->fp = NULL; h->message_headers = NULL; h->message_body = NULL; h->c...
false
false
false
false
false
0
b43_destroy_dmaring(struct b43_dmaring *ring, const char *ringname) { if (!ring) return; #ifdef CONFIG_B43_DEBUG { /* Print some statistics. */ u64 failed_packets = ring->nr_failed_tx_packets; u64 succeed_packets = ring->nr_succeed_tx_packets; u64 nr_packets = failed_packets + succeed_packets; u64 pe...
false
false
false
false
false
0
softing_enable_irq(struct softing *card, int enable) { int ret; if (!card->irq.nr) { return 0; } else if (card->irq.requested && !enable) { free_irq(card->irq.nr, card); card->irq.requested = 0; } else if (!card->irq.requested && enable) { ret = request_threaded_irq(card->irq.nr, (card->pdat->generatio...
false
false
false
false
false
0
IntrRefLVar ( UInt lvar ) { Obj val; /* ignore */ if ( IntrReturning > 0 ) { return; } if ( IntrIgnoring > 0 ) { return; } /* otherwise must be coding */ if ( IntrCoding > 0...
false
false
false
false
false
0
tmp421_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; struct device *hwmon_dev; struct tmp421_data *data; int err; data = devm_kzalloc(dev, sizeof(struct tmp421_data), GFP_KERNEL); if (!data) return -ENOMEM; mutex_init(&data->update_lock); data->chan...
false
false
false
false
false
0
gt_ranges_show(GtArray *ranges, GtFile *outfp) { GtRange *range; unsigned long i; gt_assert(ranges); for (i = 0; i < gt_array_size(ranges); i++) { range = gt_array_get(ranges, i); gt_file_xprintf(outfp, "(%lu,%lu)", range->start, range->end); } gt_file_xfputc('\n', outfp); }
false
false
false
false
false
0
gst_camera_bin_src_notify_zoom_cb (GObject * self, GParamSpec * pspec, gpointer user_data) { GstCameraBin2 *camera = (GstCameraBin2 *) user_data; g_object_get (self, "zoom", &camera->zoom, NULL); GST_DEBUG_OBJECT (camera, "Zoom updated to %f", camera->zoom); g_object_notify (G_OBJECT (camera), "zoom"); }
false
false
false
false
false
0
__ath9k_hw_def_fill_eeprom(struct ath_hw *ah) { u16 *eep_data = (u16 *)&ah->eeprom.def; int addr, ar5416_eep_start_loc = 0x100; for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { if (!ath9k_hw_nvram_read(ah, addr + ar5416_eep_start_loc, eep_data)) return false; eep_data++; } return true; }
false
false
false
false
false
0
gst_riff_parse_chunk (GstElement * element, GstBuffer * buf, guint * _offset, guint32 * _fourcc, GstBuffer ** chunk_data) { guint size, bufsize; guint32 fourcc; guint8 *ptr; GstMapInfo info; guint offset = *_offset; g_return_val_if_fail (element != NULL, FALSE); g_return_val_if_fail (buf != NULL, FAL...
false
false
false
false
false
0
CBScopeCompare(CCTreeCtrlData* lhs, CCTreeCtrlData* rhs) { if (!lhs || !rhs) return 1; if (lhs->m_SpecialFolder != sfToken || rhs->m_SpecialFolder != sfToken) return -1; if (lhs->m_Token->m_Scope == rhs->m_Token->m_Scope) return CBKindCompare(lhs, rhs); return rhs->m_Token->m_S...
false
false
false
false
false
0
setPlaying( bool playing ) { if ( m_isPlaying == playing ) return; setToolTip( playing ? i18n( "Pause" ) : i18n( "Play" ) ); m_isPlaying = playing; setIcon( m_isPlaying ? m_icon.pause[underMouse()] : m_icon.play[underMouse()], 4 ); }
false
false
false
false
false
0
cfread_string(char *buf, int n, CFILE *file) { char c; do { c = cfread_char(file); if ( n > 0 ) { *buf++ = c; n--; } } while (c != 0 ); }
false
false
false
false
false
0
dib807x_set_param_override(struct dvb_frontend *fe) { struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct dvb_usb_adapter *adap = fe->dvb->priv; struct dib0700_adapter_state *state = adap->priv; u16 offset = dib0070_wbd_offset(fe); u8 band = BAND_OF_FREQUENCY(p->frequency/1000); switch (band) { ...
false
false
false
false
false
0
pop_elem_from_buffer_list(stun_buffer_list *bufs) { if(bufs && bufs->head && bufs->tsz) { stun_buffer_list_elem *ret = bufs->head; bufs->head=ret->next; --bufs->tsz; turn_free(ret,sizeof(stun_buffer_list_elem)); } }
false
false
false
false
false
0
ast_category_delete(struct ast_config *cfg, const char *category) { struct ast_category *prev=NULL, *cat; cat = cfg->root; while (cat) { if (cat->name == category) { if (prev) { prev->next = cat->next; if (cat == cfg->last) cfg->last = prev; } else { cfg->root = cat->next; if (cat == cf...
false
false
false
false
false
0
ahci_scr_offset(struct ata_port *ap, unsigned int sc_reg) { static const int offset[] = { [SCR_STATUS] = PORT_SCR_STAT, [SCR_CONTROL] = PORT_SCR_CTL, [SCR_ERROR] = PORT_SCR_ERR, [SCR_ACTIVE] = PORT_SCR_ACT, [SCR_NOTIFICATION] = PORT_SCR_NTF, }; struct ahci_host_priv *hpriv = ap->host->private_data; i...
false
false
false
false
false
0
get_real_time() { double result = ((double)((m_timeOfDay2.tv_sec*1000000 + m_timeOfDay2.tv_usec)-(m_timeOfDay1.tv_sec*1000000 + m_timeOfDay1.tv_usec)))/1000.0; if (result < get_sys_time() + get_user_time()) return get_sys_time()+get_user_time(); return result; }
false
false
false
false
false
0
IrregexpExec(Handle<JSRegExp> jsregexp, Handle<String> subject, int previous_index, Handle<JSArray> last_match_info) { ASSERT_EQ(jsregexp->TypeTag(), JSRegExp::IRREGEXP); // Prepare space for the...
false
false
false
false
false
0
ladish_command_remove_app(void * call_ptr, struct ladish_cqueue * queue_ptr, const char * opath, uint64_t id) { struct ladish_command_remove_app * cmd_ptr; char * opath_dup; if (!ladish_command_change_app_state(call_ptr, queue_ptr, opath, id, LADISH_APP_STATE_STOPPED)) { goto fail; } opath_dup = strdu...
false
false
false
false
false
0