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
H5A_rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_name, const char *new_attr_name, hid_t lapl_id, hid_t dxpl_id) { H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_lo...
false
false
false
false
false
0
capab_search(const char *key, const struct capabilities *cap) { const char *rb = cap->name; while (ToLower(*key) == ToLower(*rb)) /* walk equivalent part of strings */ if (!*key++) /* hit the end, all right... */ return 0; else /* OK, let's move on... */ rb++; /* If the character they differ ...
false
false
false
false
false
0
snd_ftu_create_volume_ctls(struct usb_mixer_interface *mixer) { char name[64]; unsigned int control, cmask; int in, out, err; const unsigned int id = 5; const int val_type = USB_MIXER_S16; for (out = 0; out < 8; out++) { control = out + 1; for (in = 0; in < 8; in++) { cmask = 1 << in; snprintf(name, s...
false
false
false
false
false
0
glade_gtk_button_set_property (GladeWidgetAdaptor * adaptor, GObject * object, const gchar * id, const GValue * value) { GladeWidget *widget = glade_widget_get_from_gobject (object); GladeProperty *property = glade_widget_get_property (widget, id); if...
false
false
false
false
false
0
config_set_sizelimit( const char *attrname, char *value, char *errorbuf, int apply ) { int retVal = LDAP_SUCCESS; long sizelimit; char *endp = NULL; Slapi_Backend *be; char *cookie; slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); if ( config_value_is_null( attrname, value, errorbuf, ...
false
false
false
false
false
0
sig_idle_timeout(void) { GSList *tmp; /* Scan through every server */ for (tmp = servers; tmp != NULL; tmp = tmp->next) { IRC_SERVER_REC *rec = tmp->data; if (IS_IRC_SERVER(rec) && rec->idles != NULL && rec->cmdcount == 0) { /* We're idling and we have idle commands to run! */ server_idle_next(rec)...
false
false
false
false
false
0
close_system_prompt (GoaIdentityManager *manager, GoaIdentity *identity, SystemPromptRequest *data) { GError *error; /* Only close the prompt if the identity we're * waiting on got refreshed */ if (data->identity != identity) return; g_signal_handle...
false
false
false
false
false
0
set_thread_id(void (*arg)(DbEnv *, pid_t *, db_threadid_t *)) { DB_ENV *dbenv = unwrap(this); int ret; thread_id_callback_ = arg; if ((ret = dbenv->set_thread_id(dbenv, arg == 0 ? 0 : _thread_id_intercept_c)) != 0) DB_ERROR(this, "DbEnv::set_thread_id", ret, error_policy()); return (ret); }
false
false
false
false
false
0
send_bucket_downstream(ap_filter_t *f, apr_bucket *b) { charset_filter_ctx_t *ctx = f->ctx; apr_status_t rv; APR_BRIGADE_INSERT_TAIL(ctx->tmpbb, b); rv = ap_pass_brigade(f->next, ctx->tmpbb); if (rv != APR_SUCCESS) { ctx->ees = EES_DOWNSTREAM; } apr_brigade_cleanup(ctx->tmpbb); ...
false
false
false
false
false
0
point( double yy, /* raw data */ double lo, double hi, /* limits: both ends of the plot */ int scale, /* length of scale in pixels */ int offset, /* pixel offset of start of plot area */ int linswp) /* flag: linear scale (else log scale) */ { int place; if (linswp) { place = round_to_int( scale*(yy-lo)...
false
false
false
false
false
0
check_same_host_or_net(SockAddr *raddr, IPCompareMethod method) { check_network_data cn; cn.method = method; cn.raddr = raddr; cn.result = false; errno = 0; if (pg_foreach_ifaddr(check_network_callback, &cn) < 0) { elog(LOG, "error enumerating network interfaces: %m"); return false; } return cn.result; ...
false
false
false
false
false
0
square_clear(board_t * board, int square, int piece) { int pos, piece_12, colour; int sq, size; ASSERT(board!=NULL); ASSERT(square_is_ok(square)); ASSERT(piece_is_ok(piece)); // init pos = board->pos[square]; ASSERT(pos>=0); colour = piece_colour(piece); piece_12 = piece_to_12(piece);...
false
false
false
false
false
0
rb_io_check_closed(fptr) OpenFile *fptr; { rb_io_check_initialized(fptr); if (!fptr->f && !fptr->f2) { rb_raise(rb_eIOError, "closed stream"); } }
false
false
false
false
false
0
corr(double dist, double b, double & sigma){ const double eps = 0.01; double ar = 1.0 - dist/b; sigma = 1000.0; if (ar< eps) return 3.0; sigma = b/ar; return - b * log(1-dist/b); }
false
false
false
false
false
0
copy_main(const char *src, const char *dest) { char dest_path[1024]; if (strcmp(src, dest) == 0) { println("source file \"%s\" and dest file \"%s\" arm same files", src, dest); return 0; } if (file_test(dest, "d") == 0) { text_path_cat(dest_path, sizeof(dest_path), dest, text_basename(src)); } else { ...
true
true
false
false
false
1
infd_directory_set_communication_manager(InfdDirectory* directory, InfCommunicationManager* manager) { InfdDirectoryPrivate* priv; priv = INFD_DIRECTORY_PRIVATE(directory); /* construct/only */ g_assert(priv->communication_manager == NULL); priv->communication_manage...
false
false
false
false
false
0
SDPConeAddIdentity(SDPCone sdpcone, int blockj,int vari, int n, double val){ int info; char UPLQ; struct DSDPDataMat_Ops* identitymatops=0; void* imat=0; DSDPFunctionBegin; DSDPLogInfo(0,20,"Set identity matrix: Block: %d, Variable %d, size: %d, Multiple: %4.4e .\n",blockj,vari,n,val); info=SDP...
false
false
false
false
false
0
dev_deactivate(struct fp_img_dev *dev) { struct sonly_dev *sdev = dev->priv; if (!sdev->capturing) { deactivate_done(dev); return; } sdev->deactivating = TRUE; sdev->killing_transfers = ITERATE_SSM; sdev->kill_ssm = sdev->loopsm; cancel_img_transfers(dev); }
false
false
false
false
false
0
nibble(int tool) { int i; int x[NIBBLE_TILES]; int y[NIBBLE_TILES]; mode(DASHBOARD_OFF); if(tool < 0) tool = (pubrand.get(20) + SDL_GetTicks()) % 5; /* Clear */ for(i = 0; i < NIBBLE_TILES; ++i) x[i] = y[i] = -1; /* Fill in */ int ind = 0; int xx = -NIBBLE_W / 2; int yy = -NIBBLE_H / 2; for(i = 0; i...
false
false
false
false
false
0
handle_deferred_full_frames(struct iax2_thread *thread) { struct iax2_pkt_buf *pkt_buf; ast_mutex_lock(&thread->lock); while ((pkt_buf = AST_LIST_REMOVE_HEAD(&thread->full_frames, entry))) { ast_mutex_unlock(&thread->lock); thread->buf = pkt_buf->buf; thread->buf_len = pkt_buf->len; thread->buf_size = pkt...
false
false
false
false
false
0
get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen) { u16 index; index = TAG_PARAM_OFFSET; while (index < (u16RxLen - FCS_LEN)) { if (pu8msa[index] == IDSPARMS) return pu8msa[index + 2]; /* Increment index by length information and header */ index += pu8msa[index + 1] + IE_HDR_LEN; } /* Return current...
false
false
false
false
false
0
search_delete_previous_characters(int num) { if (search_filter_len == 0) { change_mode(MODE_NORMAL); return; } if (num > search_filter_pos) { num = search_filter_pos; } search_filter_pos -= num; search_filter_len -= num; int move_chars = search_filter_len-search_filter_pos; for(int i = 0; ...
false
false
false
false
false
0
report_dummy_row_deleted (FMTreeModel *model, TreeNode *parent) { GtkTreeIter iter; GtkTreePath *path; if (parent->inserted) { make_iter_for_node (parent, &iter, model->details->stamp); path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter); gtk_tree_path_append_index (path, 0); gtk_tree_model_row_d...
false
false
false
false
false
0
dlm_query_region_handler(struct o2net_msg *msg, u32 len, void *data, void **ret_data) { struct dlm_query_region *qr; struct dlm_ctxt *dlm = NULL; char *local = NULL; int status = 0; qr = (struct dlm_query_region *) msg->buf; mlog(0, "Node %u queries hb regions on domain %s\n", qr->qr_node, qr->qr_...
false
false
false
false
false
0
SetNewTransform(RefX,RefY,NewX,NewY) int RefX,RefY,NewX,NewY; { TTranslate(-RefX,-RefY); if (Parameters.kpMX) TMX(); if (Parameters.kpMY) TMY(); if (Parameters.kpRotationAngle != 0) { if (Parameters.kpRotationAngle == 90) TRotate(0L,1L); elif (Parameters.kpRotationAngle == 180) TRota...
false
false
false
false
false
0
empty_alloc_pool (alloc_pool pool) { alloc_pool_list block, next_block; gcc_checking_assert (pool); /* Free each block allocated to the pool. */ for (block = pool->block_list; block != NULL; block = next_block) { next_block = block->next; free (block); } if (GATHER_STATISTICS) { ...
false
false
false
false
false
0
git_config_find_global(char *global_config_path, size_t length) { git_buf path = GIT_BUF_INIT; int ret = git_config_find_global_r(&path); if (ret < 0) { git_buf_free(&path); return ret; } if (path.size >= length) { git_buf_free(&path); giterr_set(GITERR_NOMEMORY, "Path is to long to fit on the gi...
false
false
false
false
false
0
DeleteNote(void) { static GtkWidget *dialog = NULL; GtkWidget *button, *hbox, *label, *pixmap; if (dialog == NULL) { dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Delete calendar note")); gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(dia...
false
false
false
false
false
0
L2() {register object *base=vs_base; register object *sup=base+VM2; VC2 vs_reserve(VM2); check_arg(2);vs_top=sup; {object V6=base[0]->c.c_cdr; if(endp(V6))invalid_macro_call(); base[2]= (V6->c.c_car); V6=V6->c.c_cdr; if(endp(V6))invalid_macro_call(); base[3]= (V6->c.c_car); V6=V6->c.c_cdr; if(endp(V6)){ bas...
false
false
false
false
false
0
sios_param_set_float(const char *val, struct sios_param *p) { char *endp; double tmp; if (!val) return -1; tmp = strtod(val, &endp); if (endp == val || (float)tmp != tmp) return -1; *((float *)p->arg) = tmp; return 0; }
false
false
false
false
false
0
gst_rtp_buffer_get_header_len (GstBuffer * buffer) { guint len; guint8 *data; data = GST_BUFFER_DATA (buffer); len = GST_RTP_HEADER_LEN + GST_RTP_HEADER_CSRC_SIZE (data); if (GST_RTP_HEADER_EXTENSION (data)) len += GST_READ_UINT16_BE (data + len + 2) * 4 + 4; return len; }
false
false
false
false
false
0
normalizeSecondAndAppend(const UNormalizer2 *norm2, UChar *first, int32_t firstLength, int32_t firstCapacity, const UChar *second, int32_t secondLength, UBool doNormalize, UErrorCode *pErrorCode) { if(U_FAILURE(*pErr...
false
false
false
false
false
0
get_binding_frame(ScmObj var, ScmObj env) { ScmObj frame, fp; SCM_FOR_EACH(frame, env) { if (!SCM_PAIRP(SCM_CAR(frame))) continue; SCM_FOR_EACH(fp, SCM_CDAR(frame)) { if (SCM_CAAR(fp) == var) return frame; } } return SCM_NIL; }
false
false
false
false
false
0
validateCfg(const std::string &code, const std::string &cfg) { // fill up "macros" with empty configuration macros std::set<std::string> macros; for (std::string::size_type pos = 0; pos < cfg.size();) { const std::string::size_type pos2 = cfg.find_first_of(";=", pos); if (pos2 == std::string...
false
false
false
false
false
0
butLnet_destroy(ButLnet *net) { assert(MAGIC(net)); if (net->valid) { close(net->fd); butEnv_rmFile(net->env, BUT_READFILE, net->fd); } MAGIC_UNSET(net); wms_free(net); }
false
false
false
false
false
0
IMGcopy(char* imageBuf, int imgPitch, char* backBuf, int backPitch, int x1, int y1, int x2, int y2) { int width = x2 - x1 + 1; int height = y2 - y1 + 1; int dest = y1*imgPitch + x1; int src = y1*backPitch + x1; for (int j=0; j<height; ++j, dest+=imgPitch, src+=backPitch) { memcpy( &imageBuf[ dest ], &backBuf[ s...
false
true
false
false
false
1
est_mtdb_set_informer(ESTMTDB *db, void (*func)(const char *, void *), void *opaque){ assert(db && func); if(!est_mtdb_lock(db)) return; est_db_set_informer(db->db, func, opaque); est_mtdb_unlock(db); }
false
false
false
false
false
0
emblock(MMIOT *f, int first, int last) { int i; for ( i = first; i <= last; i++ ) if ( T(f->Q)[i].b_type != bTEXT ) emmatch(f, i, last); emclose(f, first, last); }
false
false
false
false
false
0
H5O_sdspace_copy(const void *_mesg, void *_dest) { const H5S_extent_t *mesg = (const H5S_extent_t *)_mesg; H5S_extent_t *dest = (H5S_extent_t *)_dest; void *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(mesg); if(!dest && N...
false
false
false
false
false
0
kaiser_flush_tlb_on_return_to_user(void) { if (this_cpu_has(X86_FEATURE_PCID)) this_cpu_write(x86_cr3_pcid_user, X86_CR3_PCID_USER_FLUSH | KAISER_SHADOW_PGD_OFFSET); }
false
false
false
false
false
0
printLastLoopLevelScheduler(int n, int lnum, const lset& L, ostream& fout) { if (nonRecursiveLevel(L) && L.size() == 1 && !(*L.begin())->isEmpty()) { lset::const_iterator p =L.begin(); tab(n, fout); fout << "case " << gTaskCount++ << ": { "; (*p)->println(n+1, fout); tab(n+1, fout);...
false
false
false
false
false
0
resize() { bool oldDisabledRedisplay = DisabledRedisplay; int oldILI = ILI, oldCO = CO; DisabledRedisplay = YES; /* prevent tragedy */ ResizePending = NO; /* early & safe */ ttsize(); /* update line (LI and ILI) and col (CO) info. */ if (oldILI != ILI || oldCO != CO) { register int total; register Windo...
false
false
false
false
false
0
qvector_popat(qvector_t *vector, int index) { vector->lock(vector); void *data = get_at(vector, index, true); if (data == NULL) { return NULL; } bool result = remove_at(vector, index); if (result == false) { free(data); vector->unlock(vector); return NULL; } ...
false
false
false
false
false
0
orion_spi_wait_till_ready(struct orion_spi *orion_spi) { int i; for (i = 0; i < ORION_SPI_WAIT_RDY_MAX_LOOP; i++) { if (readl(spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG))) return 1; udelay(1); } return -1; }
false
false
false
false
false
0
enchant_pwl_suggest(EnchantPWL *pwl,const char *const word, size_t len, const char*const*const suggs, size_t* out_n_suggs) { EnchantTrieMatcher* matcher; EnchantSuggList sugg_list; int max_dist; max_dist = suggs? best_distance(suggs, word, len) : ENCHANT_PWL_MAX_ERRORS; if(max_dist > ENCHANT_PWL_MAX_ERRORS)...
false
false
false
false
false
0
bet_data_transfert_remove_line ( gint account_number, gint number ) { GHashTableIter iter; gpointer key, value; g_hash_table_iter_init ( &iter, bet_transfert_list ); while (g_hash_table_iter_next ( &iter, &key, &value ) ) { struct_transfert_data *transfert = ( struct_transfert_data *) valu...
false
false
false
false
false
0
_ecore_getopt_help_desc_setup_metavar(const Ecore_Getopt_Desc *desc, char *metavar, int *metavarlen, int maxsize) { if (desc->metavar) { ...
false
true
false
false
false
1
ews_backend_child_removed (ECollectionBackend *backend, ESource *child_source) { const gchar *extension_name; /* We track EWS folders in a hash table by folder ID. */ extension_name = E_SOURCE_EXTENSION_EWS_FOLDER; if (e_source_has_extension (child_source, extension_name)) { ESourceEws...
false
false
false
false
false
0
localfs_seek(localfs_interface_t *this, UINTN fd, UINT64 newpos) { localfs_priv_state_t *lfs; if (this == NULL || fd == 0) return EFI_INVALID_PARAMETER; lfs = FS_PRIVATE(this); return uefi_call_wrapper(lfs->volume->SetPosition, 2, LOCALFS_FD2F(fd), newpos); }
false
false
false
false
false
0
rn5t618_i2c_remove(struct i2c_client *i2c) { struct rn5t618 *priv = i2c_get_clientdata(i2c); if (priv == rn5t618_pm_power_off) { rn5t618_pm_power_off = NULL; pm_power_off = NULL; } mfd_remove_devices(&i2c->dev); return 0; }
false
false
false
false
false
0
row_get_prebuilt_update_vector( /*===========================*/ row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in MySQL handle */ { dict_table_t* table = prebuilt->table; upd_node_t* node; ut_ad(prebuilt && table && prebuilt->trx); if (prebuilt->upd_node == NULL) { /* Not called before for this handl...
false
false
false
false
false
0
fits_unencode_url(char *inpath, /* I input URL with encoding */ char *outpath, /* O unencoded URL */ int *status) /* unencode all URL "unsafe" and "reserved" characters to their actual ASCII representation. All tokens of the form "%XX" where XX is the...
false
false
false
false
false
0
getTertiaries(uint32_t variableTop, UBool withCaseBits, uint32_t pair) { if(pair <= 0xffff) { // one mini CE if(pair >= MIN_SHORT) { // A high secondary weight means we really have two CEs, // a primary CE and a secondary CE. uint32_t ce = pair; if(wit...
false
false
false
false
false
0
rfft( FFT_Tables *fft_tables, double *x, int logm) { double xi[1 << MAXLOGR]; if (logm > MAXLOGR) { fprintf(stderr, "rfft size too big\n"); exit(1); } memset(xi, 0, (1 << logm) * sizeof(xi[0])); fft( fft_tables, x, xi, logm); memcpy(x + (1 << (logm - 1)), xi, (1 << (logm - 1)) * sizeof(*x)); }
false
false
false
false
false
0
pcx_load (const char *file, a_pcx_image *image) { unsigned long compteur; FILE *fptr; int nbrbytes, i; a_u8 data; dmsg (D_FILE, "opening image file: %s", file); if ((fptr = fopen (file, "rb")) == NULL) { emsg (_("Cannot open %s"), file); } fread (&(image->header), sizeof (a_pcx_header), 1, fptr);...
false
false
false
false
false
0
net_can_howl_core_second_form(tenm_object *my) { int i; int n; /* sanity check */ if (my == NULL) return; if (my->count[8] != 1) return; my->count_d[0] = 0.0; my->count_d[1] = 0.0; tenm_table_apply_all((int (*)(tenm_object *, int)) (&delete_enemy_shot), 0); tenm_table_apply_all((int (*)(te...
false
false
false
false
false
0
hasOrderedMemoryRef() const { // An instruction known never to access memory won't have a volatile access. if (!mayStore() && !mayLoad() && !isCall() && !hasUnmodeledSideEffects()) return false; // Otherwise, if the instruction has no memory reference information, // conservatively assume...
false
false
false
false
false
0
gnc_import_new_account_picker(void) { AccountPickerDialog* picker = g_new(AccountPickerDialog, 1); picker->dialog = NULL; picker->assistant = NULL; picker->account_tree = NULL; picker->account_tree_sw = NULL; picker->auto_create = TRUE; picker->account_human_description = NULL; picker->a...
false
false
false
false
false
0
level_message_handler_cb (GstBus * bus, GstMessage * message, GSRWindow *window) { GSRWindowPrivate *priv = window->priv; if (message->type == GST_MESSAGE_ELEMENT) { const GstStructure *s = gst_message_get_structure (message); const gchar *name = gst_structure_get_name (s); if (g_str_equal (name, "lev...
false
false
false
false
false
0
__bld_pb_fifo(struct net_t *np, int32 *pbfi, int32 *pbfo, int32 *pbtcfo, int32 ii) { register struct net_pin_t *npp; register int32 bi; register struct npaux_t *npauxp; word32 *wp; memset(pbfi, 0, sizeof(int32)*np->nwid); memset(pbfo, 0, sizeof(int32)*np->nwid); memset(pbtcfo, 0, sizeof(int32)*np->nwid); for...
false
false
false
false
false
0
bnx2x_dcbx_update_tc_mapping(struct bnx2x *bp) { u8 prio, cos; for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) { for (prio = 0; prio < BNX2X_MAX_PRIORITY; prio++) { if (bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask & (1 << prio)) { bp->prio_to_cos[prio] = cos; DP(BNX2X_MSG_D...
false
false
false
false
false
0
split_for_stmt(chunk_t *start) { int count = 0; int max_cnt = cpd.settings[UO_ls_for_split_full].b ? 2 : 1; chunk_t *st[2]; chunk_t *pc; chunk_t *open_paren = NULL; int nl_cnt = 0; LOG_FMT(LSPLIT, "%s: starting on %.*s, line %d\n", __func__, start->len, start->str, st...
false
false
false
false
false
0
gfx_v8_0_rlc_load_microcode(struct amdgpu_device *adev) { const struct rlc_firmware_header_v2_0 *hdr; const __le32 *fw_data; unsigned i, fw_size; if (!adev->gfx.rlc_fw) return -EINVAL; hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; amdgpu_ucode_print_rlc_hdr(&hdr->header); fw_data = ...
false
false
false
false
false
0
handle_com_interface_attribute (tree* node, tree name, tree args ATTRIBUTE_UNUSED , int flags ATTRIBUTE_UNUSED , bool* no_add_attrs) { static int warned; *no_add_attrs = true; if (...
false
false
false
false
false
0
hb_freetype_font_metric_get(HB_Font font, HB_FontMetric metric) { FT_Face face = (FT_Face) font->userData; switch (metric) { case HB_FontAscent: // Note that we aren't scanning the VDMX table which we probably would in // an ideal world. return face->ascender; default: return 0; } }
false
false
false
false
false
0
ValidateInput() { wxString type = _T(""); if(this->FindFocus()) { type = cbC2U(typeid(*(this->FindFocus())).name()); } if (type.Find(_T("wxTextCtrl")) != wxNOT_FOUND) { ForceValidation:; //To force validation when the user clicks the Accept buttom or other control not of type w...
false
false
false
false
false
0
buildAttributeMapRest(MetaMap &map, const AttributeList &atts, const AttributeList *linkAtts, const Vector<PackedBoolean> &attRenamed) { ConstPtr<AttributeDefinitionList> metaAttDef = map.attributed->attributeDef(); if (metaAttDef.isNull()) return; for (unsigned i = 0; i < metaAttDef->si...
false
false
false
false
false
0
skipspace(const char *whence) { while (1) { switch (*whence) { case ' ': case '\b': case '\t': case '\n': case '\v': case '\f': case '\r': whence++; break; case '#': /* comment: skip to end of string */ while (*whence != '\0') whence++; /* FALLTHROUGH */ default: return whence; ...
false
false
false
false
false
0
layout_bars_new_image(LayoutWindow *lw) { layout_bar_new_image(lw); if (lw->exif_window) advanced_exif_set_fd(lw->exif_window, layout_image_get_fd(lw)); /* this should be called here to handle the metadata edited in bars */ if (options->metadata.confirm_on_image_change) metadata_write_queue_confirm(FALSE, NULL,...
false
false
false
false
false
0
num_worms_cb (GtkWidget * widget, gpointer data) { gint human, ai; if (!pref_dialog) return; human = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (num_human)); ai = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (num_ai)); if (!ai && !human) { human = 1; } else if (data == num_human && ai...
false
false
false
false
false
0
decl_class_context (decl) tree decl; { tree context = NULL_TREE; if (TREE_CODE (decl) != FUNCTION_DECL || ! DECL_VINDEX (decl)) context = DECL_CONTEXT (decl); else context = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl))))); if (context && !TYPE_P (context)) ...
false
false
false
false
false
0
any_predicted_circuits(time_t now) { return smartlist_len(predicted_ports_list) || predicted_internal_time + PREDICTED_CIRCS_RELEVANCE_TIME >= now; }
false
false
false
false
false
0
mousePressEvent(QGraphicsSceneMouseEvent* event) { if (event->button() == Qt::LeftButton) { event->accept(); emit moveStarted(); } }
false
false
false
false
false
0
heading_cell_renderer_func (GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { PlaceType type; gtk_tree_model_get (model, iter, PLACES_SIDEBAR_COLUMN_ROW_TYPE, &type, -1); if (type == PLACES_HEADING) { g_object...
false
false
false
false
false
0
pixReadMemPng(const l_uint8 *cdata, size_t size) { FILE *fp; PIX *pix; PROCNAME("pixReadMemPng"); if (!cdata) return (PIX *)ERROR_PTR("cdata not defined", procName, NULL); #if HAVE_FMEMOPEN if ((fp = fmemopen((void *)cdata, size, "r")) == NULL) return (PIX *)ERR...
false
false
false
false
true
1
prep_bm(Pattern, m) unsigned char *Pattern; register m; { int i; unsigned hash; unsigned char lastc; for (i = 0; i < MAXSYM; i++) SHIFT[i] = m; for (i = m-1; i>=0; i--) { hash = TR[Pattern[i]]; if((int)(SHIFT[hash]) >= (int)(m - 1)) SHIFT[hash] = m-1-i; } shift_1 = m-1; /* shift_1 records the previous...
false
false
false
false
false
0
free_handicap_remaining_stones() { gg_assert(remaining_handicap_stones >= 0); return remaining_handicap_stones; }
false
false
false
false
false
0
bnx2x_get_drv_version(bnx2x_t *bp) { nic_t *nic = bp->parent; int fd, rc; struct ifreq ifr; struct ethtool_drvinfo drvinfo; char *tok, *save_ptr = NULL; /* Setup our control structures. */ memset(&ifr, 0, sizeof(ifr)); strcpy(ifr.ifr_name, nic->eth_device_name); /* Open control socket. */ fd = socket(AF_INE...
false
false
false
false
false
0
modsin_identifier( xml *node, fields *info, int level ) { convert ids[] = { { "citekey", "REFNUM" }, { "issn", "ISSN" }, { "isbn", "ISBN" }, { "doi", "DOI" }, { "url", "URL" }, { "uri", "URL" }, { "pmid...
false
false
false
false
false
0
gfs2_rgrp_congested(const struct gfs2_rgrpd *rgd, int loops) { const struct gfs2_glock *gl = rgd->rd_gl; const struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; struct gfs2_lkstats *st; u64 r_dcount, l_dcount; u64 l_srttb, a_srttb = 0; s64 srttb_diff; u64 sqr_diff; u64 var; int cpu, nonzero = 0; preempt_disable(); ...
false
false
false
false
false
0
room_appeared(const char * opath, const char * name, const char * template) { graph_view_handle graph_view; log_info("room \"%s\" appeared (%s). template is \"%s\"", name, opath, template); if (!create_view(name, SERVICE_NAME, opath, true, true, true, false, &graph_view)) { log_error("create_view() failed...
false
false
false
false
false
0
writeZonePropsByDOW_GEQ_DOM(VTZWriter& writer, UBool isDst, const UnicodeString& zonename, int32_t fromOffset, int32_t toOffset, int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UDate startTime, UDa...
false
false
false
false
false
0
dwc2_hsotg_set_ep_maxpacket(struct dwc2_hsotg *hsotg, unsigned int ep, unsigned int mps, unsigned int dir_in) { struct dwc2_hsotg_ep *hs_ep; void __iomem *regs = hsotg->regs; u32 mpsval; u32 mcval; u32 reg; hs_ep = index_to_ep(hsotg, ep, dir_in); if (!hs_ep) return; if (ep == 0) { /* EP0 is a special c...
false
false
false
false
false
0
window_at_point (WnckPager *pager, WnckWorkspace *space, GdkRectangle *space_rect, int x, int y) { WnckWindow *window; GList *windows; GList *tmp; window = NULL; windows = get_windows_for_workspace_in_bottom_to_to...
false
false
false
false
false
0
gen_delay (rtx def, int lineno) { struct delay_desc *delay; int i; if (XVECLEN (def, 1) % 3 != 0) { error_with_line (lineno, "number of elements in DEFINE_DELAY must" " be multiple of three"); return; } for (i = 0; i < XVECLEN (def, 1); i += 3) { if (XVECEXP (de...
true
true
false
false
false
1
scsifront_do_lun_hotplug(struct vscsifrnt_info *info, int op) { struct xenbus_device *dev = info->dev; int i, err = 0; char str[64]; char **dir; unsigned int dir_n = 0; unsigned int device_state; unsigned int hst, chn, tgt, lun; struct scsi_device *sdev; dir = xenbus_directory(XBT_NIL, dev->otherend, "vscsi-d...
true
true
false
false
false
1
binheap_update(const struct binheap *bh, unsigned u) { assert(bh->magic == BINHEAP_MAGIC); assert(u < bh->next); assert(A(bh, u) != NULL); if (bh->update == NULL) return; bh->update(bh->priv, A(bh, u), u); }
false
false
false
false
false
0
FlushCache() { GDALDataset::FlushCache(); if( nPamFlags & GPF_DIRTY ) TrySaveXML(); }
false
false
false
false
false
0
Jim_DictPairs(Jim_Interp *interp, Jim_Obj *dictPtr, Jim_Obj ***objPtrPtr, int *len) { if (SetDictFromAny(interp, dictPtr) != JIM_OK) { return JIM_ERR; } *objPtrPtr = JimDictPairs(dictPtr, len); return JIM_OK; }
false
false
false
false
false
0
store_array(apr_file_t *fd, apr_array_header_t* arr) { int i; apr_status_t rv; struct iovec iov[2]; apr_size_t amt; const char **elts; elts = (const char **) arr->elts; for (i = 0; i < arr->nelts; i++) { iov[0].iov_base = (char*) elts[i]; iov[0].iov_len = strlen(elts[i]); ...
false
false
false
false
false
0
rep_hist_note_router_reachable(const char *id, const tor_addr_t *at_addr, const uint16_t at_port, time_t when) { or_history_t *hist = get_or_history(id); int was_in_run = 1; char tbuf[ISO_TIME_LEN+1]; int addr_changed, port_changed; tor_assert(hist); tor_assert((!at_addr && !...
false
false
false
false
false
0
verify_gimple_phi (gimple phi) { bool err = false; unsigned i; tree phi_result = gimple_phi_result (phi); bool virtual_p; if (!phi_result) { error ("invalid PHI result"); return true; } virtual_p = virtual_operand_p (phi_result); if (TREE_CODE (phi_result) != SSA_NAME || (virtu...
false
false
false
false
false
0
aufs_remount_fs(struct super_block *sb, int *flags, char *data) { int err, do_dx; unsigned int mntflags; struct au_opts opts = { .opt = NULL }; struct dentry *root; struct inode *inode; struct au_sbinfo *sbinfo; err = 0; root = sb->s_root; if (!data || !*data) { err = si_write_lock(sb, AuLock_FLUSH | AuL...
false
false
false
false
false
0
lad_sm_get_mod_semnode(Block *src_block, Array_table *ldm) { Array_def_use_table_semnode *aduts, *mod; Array_table *mod_ldm; mod = (Array_def_use_table_semnode *)get_array_maymod(src_block); for (aduts = mod; aduts != NULL; aduts = aduts->next) { mod_ldm = lad_sm_change_csm_to_lm(src_block->module, ad...
false
false
false
false
false
0
ath5k_rfkill_enable(struct ath5k_hw *ah) { ATH5K_DBG(ah, ATH5K_DEBUG_ANY, "rfkill enable (gpio:%d polarity:%d)\n", ah->rf_kill.gpio, ah->rf_kill.polarity); ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio); ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, ah->rf_kill.polarity); }
false
false
false
false
false
0
SaveCStr( const Char * str) { do { SAVE_BYTE( (UInt1) *str); } while (*(str++)); }
false
false
false
false
false
0
fix_screen(void) { oflush(); if (keypad && keypad_off) tp(keypad_off); if (screen_mode <= 0) { clear_line(); #ifdef SCREEN } else { top_margin = bottom_margin = -1; /* force scroll region reset */ setscroll(1, lines); clear_lines(stat_top, lines); xy(1, stat_top); ...
false
false
false
false
false
0
jpeg_write_marker (j_compress_ptr cinfo, int marker, const JOCTET *dataptr, unsigned int datalen) { JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val)); if (cinfo->next_scanline != 0 || (cinfo->global_state != CSTATE_SCANNING && cinfo->global_state != CSTATE_RAW_OK && cinfo->g...
false
false
false
false
false
0
_equalGrantRoleStmt(const GrantRoleStmt *a, const GrantRoleStmt *b) { COMPARE_NODE_FIELD(granted_roles); COMPARE_NODE_FIELD(grantee_roles); COMPARE_SCALAR_FIELD(is_grant); COMPARE_SCALAR_FIELD(admin_opt); COMPARE_NODE_FIELD(grantor); COMPARE_SCALAR_FIELD(behavior); return true; }
false
false
false
false
false
0
AskForMultiBuildTargetIndex(cbProject* project) { wxArrayInt indices; cbProject* prj = project; if (!prj) prj = Manager::Get()->GetProjectManager()->GetActiveProject(); if (!prj) return indices; // ask for target wxArrayString array; int count = prj->GetBuildTargetsCount(); ...
false
false
false
false
false
0