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
mprCloneList(MprList *src) { MprList *lp; if ((lp = mprCreateList(src->capacity, src->flags)) == 0) { return 0; } if (mprCopyListContents(lp, src) < 0) { return 0; } return lp; }
false
false
false
false
false
0
pk_client_signal_finished (PkClientState *state, PkExitEnum exit_enum, guint runtime) { GError *error = NULL; PkError *error_code = NULL; /* yay */ pk_results_set_exit_code (state->results, exit_enum); /* failed */ if (exit_enum == PK_EXIT_ENUM_FAILED) { /* get error code and error message */ e...
false
false
false
false
false
0
wnck_tasklist_free_skipped_windows (WnckTasklist *tasklist) { GList *l; l = tasklist->priv->skipped_windows; while (l != NULL) { skipped_window *skipped = (skipped_window*) l->data; g_signal_handler_disconnect (skipped->window, skipped->tag); g_object_unref (skipped->window); g_free...
false
false
false
false
false
0
nexusNotesDel(AjPNexusNotes* pthys) { AjPNexusNotes thys; if (!*pthys) return; thys = *pthys; nexusArrayDel(&thys->Text); nexusArrayDel(&thys->Picture); AJFREE(*pthys); return; }
false
false
false
false
false
0
atspi_state_set_set_by_name (AtspiStateSet *set, const gchar *name, gboolean enabled) { GTypeClass *type_class; GEnumValue *value; type_class = g_type_class_ref (ATSPI_TYPE_STATE_TYPE); if (set->accessible && !(set->accessible->cached_properties & ATSPI_CACHE_STATES)) return; value = g_enum_get_v...
false
false
false
true
false
1
ast_for_classdef(struct compiling *c, const node *n, asdl_seq *decorator_seq) { /* classdef: 'class' NAME ['(' testlist ')'] ':' suite */ PyObject *classname; asdl_seq *bases, *s; REQ(n, classdef); if (!forbidden_check(c, n, STR(CHILD(n, 1)))) return NULL; if (NCH(n) == 4) { ...
false
false
false
false
false
0
z_ucs_cmp_latin1(z_ucs *s1, char *s2) { while ( (*s1 != 0) || (*s2 != 0) ) { if ((char)*s1 != *s2) return -1; if ((*s1 & 0xffffff00) != 0) return -1; s1++; s2++; } if (*s2 != '\0') return -1; else return 0; }
false
false
false
false
false
0
b43_gphy_op_radio_read(struct b43_wldev *dev, u16 reg) { /* Register 1 is a 32-bit register. */ B43_WARN_ON(reg == 1); /* G-PHY needs 0x80 for read access. */ reg |= 0x80; b43_write16f(dev, B43_MMIO_RADIO_CONTROL, reg); return b43_read16(dev, B43_MMIO_RADIO_DATA_LOW); }
false
false
false
false
false
0
acyclic (vtx_data* graph, int nv, int mode, node_t* nodes[]) { int i; node_t* np; for (i = 0; i < nv; i++) { np = nodes[i]; ND_mark(np) = FALSE; ND_onstack(np) = FALSE; } for (i = 0; i < nv; i++) { if (ND_mark(nodes[i])) continue; dfsCycle (graph, i, mode, nodes); } }
false
false
false
false
false
0
tp_serial_read (int fd, unsigned char *bytes, size_t count) { struct timeval tv; fd_set rfds; int num_read = 0; int read_count; FD_ZERO (&rfds); FD_SET (fd, &rfds); tv.tv_sec = 1; tv.tv_usec = 0; while ((select (fd+1, &rfds, NULL, NULL, &tv) == 1) && (num_read < count)) { read_c...
false
true
false
false
true
1
set_state(State state) { if(m_state == state) return; m_state = state; signal_state_changed().emit(); }
false
false
false
false
false
0
invalidatepage_can_drop(struct inode *inode, struct buffer_head *bh) { int ret = 1; struct reiserfs_journal *j = SB_JOURNAL(inode->i_sb); lock_buffer(bh); spin_lock(&j->j_dirty_buffers_lock); if (!buffer_mapped(bh)) { goto free_jh; } /* * the page is locked, and the only places that log a data buffer * al...
false
false
false
false
false
0
gdict_window_definition_cb (GdictContext *context, GdictDefinition *definition, GdictWindow *window) { gint total, n; gdouble fraction; g_assert (GDICT_IS_WINDOW (window)); total = gdict_definition_get_total (definition); n = window->current_definition + 1; fraction = CLAMP (((gdoubl...
false
false
false
false
false
0
arglist_parser_clone (struct arglist_parser *ap) { struct arglist_parser *copy = (struct arglist_parser *) xmalloc (xsum (sizeof (struct arglist_parser) - sizeof (struct partial_call), xtimes (ap->nalternatives, sizeof (struct partial_call)))); size_t i; copy->mlp = ap->mlp; copy->ke...
false
false
false
false
false
0
soap_out__wsrm__SequenceAcknowledgement_AcknowledgementRange(struct soap *soap, const char *tag, int id, const struct _wsrm__SequenceAcknowledgement_AcknowledgementRange *a, const char *type) { soap_set_attr(soap, "Upper", soap_ULONG642s(soap, a->Upper), 1); soap_set_attr(soap, "Lower", soap_ULONG642s(soap, a->Lower)...
false
false
false
false
false
0
LineInsert() { if (InsLine(VToR(CP.Row), 0)) return 1; return 0; }
false
false
false
false
false
0
key_decode(uint8 *key, bool *pressed) { uint8 c; uint32 ringoldstart = ringstart; *key='x'; *pressed=false; if (ringstart == ringend) return; c=ringbuf[ringstart++]; if (ringstart==ringsize) ringstart=0; if (c == 0xe0) { if (ringstart == ringend) { ringstart = ringoldstart; return...
false
false
false
false
false
0
settings(int narg, char **arg) { if (narg < 1 || narg > 2) error->all(FLERR,"Incorrect args in pair_style command"); if (strcmp(update->unit_style,"electron") == 0) error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles"); cut_lj_global = force->numeric(FLERR,arg[0]); if (narg == 1) cut_coul...
false
false
false
false
false
0
branch_has_merge_config(struct branch *branch) { return branch && !!branch->merge; }
false
false
false
false
false
0
gtk_placer_move_internal (GtkPlacer *placer, GtkWidget *widget, gboolean change_x, gint x, gboolean change_y, gint y, gboolean change_wid...
false
false
false
false
false
0
main(int argc, char* argv[]) { int count = 1; int sockets[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockets) < 0) { perror("socketpair()"); return -1; } const char* me; int fd; char buf[32]; if(fork()>0){ //parent // close(sockets[1]); <= forgot to do this me = "parent"; fd =...
false
false
false
false
false
0
loadCover( const QString &artist, const QString &album ) { foreach( QListWidgetItem *item, m_coverItems ) { CoverViewItem *coverItem = static_cast<CoverViewItem*>(item); if ( album == coverItem->album() && ( artist == coverItem->artist() || ( artist.isEmpty() && coverItem->artist().isEmpty() ) )...
false
false
false
false
false
0
diff_line_fn( void *cb_data, const git_diff_delta *delta, const git_diff_range *range, char line_origin, const char *content, size_t content_len) { diff_expects *e = cb_data; GIT_UNUSED(delta); GIT_UNUSED(range); GIT_UNUSED(content); GIT_UNUSED(content_len); e->lines++; switch (line_origin) { case GIT_D...
false
false
false
false
false
0
AddExternalAddress(const ProtocolAddress& addr) { std::string proto_name = ProtoToString(addr.proto); for (std::vector<Candidate>::const_iterator it = candidates().begin(); it != candidates().end(); ++it) { if ((it->address() == addr.address) && (it->protocol() == proto_name)) { LOG(INFO) << "Redun...
false
false
false
false
false
0
write_functionTable(fstream& tex, struct AllData& alldata) { int mapSize = alldata.functionMapGlobal.size(); int max = FUNC_TABLE_LEN; int count = 0; /* sort by exclusive time (key) into multimap */ std::multimap<double, itFunc_t> sortedMap; { itFunc_t it = alldata.functionMapGlobal.be...
false
false
false
false
false
0
getRSFFeature(char* line, vector<char>& secStructMask, int length) { char c, s; char str1[MAXLINE + 1], str2[MAXLINE + 1], feature[MAXLINE + 1]; int i, tmp, startPos, endPos; try { if (sscanf(line, "%d%d%d%s%s%s", &startPos, &endPos, &tmp, str1, str2, feature) != 6) { ...
false
false
false
false
false
0
IoOggStreamState_clear(IoOggStreamState *self, IoObject *locals, IoMessage *m) { /*doc OggStreamState clear Clears the storage within the Ogg stream. */ int ret = ogg_stream_clear(DATA(self)); IOASSERT(ret == 0, "ogg_stream_clear returned non-zero value"); return self; }
false
false
false
false
false
0
expand_indexqual_opclause(RestrictInfo *rinfo, Oid opfamily, Oid idxcollation) { Expr *clause = rinfo->clause; /* we know these will succeed */ Node *leftop = get_leftop(clause); Node *rightop = get_rightop(clause); Oid expr_op = ((OpExpr *) clause)->opno; Oid expr_coll = ((OpExpr *) clause)->inputc...
false
false
false
false
false
0
get_str_motions( const int id ) { std::string motions; std::vector< MouseKeyItem >::iterator it = m_vec_items.begin(); for( ; it != m_vec_items.end(); ++it ){ if( (*it).get_id() == id ){ if( ! motions.empty() ) motions += " "; motions += (*it).get_str_motion(); } ...
false
false
false
false
false
0
detach(){ FXWindow::detach(); font->detach(); if(icon) icon->detach(); }
false
false
false
false
false
0
SendRemoveWorldStates(Player* player) { player->SendUpdateWorldState(WORLD_STATE_HP_TOWER_DISPLAY_A, WORLD_STATE_REMOVE); player->SendUpdateWorldState(WORLD_STATE_HP_TOWER_DISPLAY_H, WORLD_STATE_REMOVE); for (uint8 i = 0; i < MAX_HP_TOWERS; ++i) player->SendUpdateWorldState(m_towerWorldState[i], WO...
false
false
false
false
false
0
Setup(intptr_t capacity, intptr_t capacity_executable) { capacity_ = RoundUp(capacity, Page::kPageSize); capacity_executable_ = RoundUp(capacity_executable, Page::kPageSize); ASSERT_GE(capacity_, capacity_executable_); // Over-estimate the size of chunks_ array. It assumes the expansion of old // space is a...
false
false
false
false
false
0
ares_strerror(int code) { /* Return a string literal from a table. */ const char *errtext[] = { "Successful completion", "DNS server returned answer with no data", "DNS server claims query was misformatted", "DNS server returned general failure", "Domain name not found", "DNS server does not...
false
false
false
false
false
0
clpreauth_gic_opts(krb5_context context, clpreauth_handle h, krb5_get_init_creds_opt *opt, const char *attr, const char *value) { if (h->vt.gic_opts == NULL) return 0; return h->vt.gic_opts(context, h->data, opt, attr, value); }
false
false
false
false
false
0
decode_nlm_testrply(struct xdr_stream *xdr, struct nlm_res *result) { int error; error = decode_nlm_stat(xdr, &result->status); if (unlikely(error)) goto out; if (result->status == nlm_lck_denied) error = decode_nlm_holder(xdr, result); out: return error; }
false
false
false
false
false
0
chess_scene_set_move_number (ChessScene* self, gint value) { gint _tmp0_; gint _tmp1_; gint _tmp2_; g_return_if_fail (self != NULL); _tmp0_ = self->priv->_move_number; _tmp1_ = value; if (_tmp0_ == _tmp1_) { return; } _tmp2_ = value; self->priv->_move_number = _tmp2_; chess_scene_update_board (self); g_ob...
false
false
false
false
false
0
cb_repeat_menu_toggled (GtkCheckMenuItem *item, gpointer data) { gboolean state; state = gtk_check_menu_item_get_active (item); if (state == TRUE) { mpd_player_set_repeat (gmo, true); } else if (state == FALSE) { mpd_player_set_repeat (gmo, false); } return; }
false
false
false
false
false
0
omap_hsmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq, bool is_first_req) { struct omap_hsmmc_host *host = mmc_priv(mmc); if (mrq->data->host_cookie) { mrq->data->host_cookie = 0; return ; } if (host->use_dma) { struct dma_chan *c = omap_hsmmc_get_dma_chan(host, mrq->data); if (omap_...
false
false
false
false
false
0
allocate_socket(struct fs_info *fs) { struct inode *inode = alloc_inode(fs, 0, sizeof(struct pxe_pvt_inode)); if (!inode) { malloc_error("socket structure"); } else { struct pxe_pvt_inode *socket = PVT(inode); socket->tftp_localport = get_port(); inode->mode = DT_REG; /* No other types relevant for PXE...
false
false
false
false
false
0
enumerate_maximal_cliques(int& pos, bool* label, OsiCuts& cs) { const fnode *nodes = fgraph.nodes; const int nodenum = fgraph.nodenum; int i, j, k, cnt; /* starting from position pos, find the first node in cl_indices that can be added to the clique, and label it with true */ while (pos < cl_leng...
false
false
false
false
false
0
modperl_perl_global_avcv_clear(pTHX_ modperl_modglobal_key_t *gkey, const char *package, I32 packlen) { AV *av = modperl_perl_global_avcv_fetch(aTHX_ gkey, package, packlen, FALSE); MP_TRACE_g(MP_FUNC, "clear PL_modglobal %s::%s (h...
false
false
false
false
false
0
is_legal_2ways_exit(object *op, object *exit) { object *tmp; object *exit_owner; player *pp; mapstruct *exitmap; if (exit->stats.exp != 1) return 1; /*This is not a 2 way, so it is legal*/ if (!has_been_loaded(EXIT_PATH(exit)) && exit->race) return 0; /* This is a reset town por...
false
false
false
false
false
0
juniper_atm2_print(const struct pcap_pkthdr *h, register const u_char *p) { u_int16_t extracted_ethertype; struct juniper_l2info_t l2info; l2info.pictype = DLT_JUNIPER_ATM2; if(juniper_parse_header(p, h, &l2info) == 0) return l2info.header_len; p+=l2info.header_len...
false
false
false
false
false
0
mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter) { struct cmd_ctrl_node *cmd_array; u32 i; /* Need to check if cmd pool is allocated or not */ if (!adapter->cmd_pool) { mwifiex_dbg(adapter, FATAL, "info: FREE_CMD_BUF: cmd_pool is null\n"); return 0; } cmd_array = adapter->cmd_pool; /* Relea...
false
false
false
false
false
0
print_cityresult(struct player *pplayer, const struct cityresult *cr) { int *city_map_reserved, *city_map_food, *city_map_shield, *city_map_trade; int tiles = city_map_tiles(cr->city_radius_sq); struct tile_data_cache *ptdc; fc_assert_ret(cr->tdc_hash != NULL); fc_assert_ret(tile...
false
false
false
false
false
0
qla82xx_minidump_process_queue(scsi_qla_host_t *vha, qla82xx_md_entry_hdr_t *entry_hdr, uint32_t **d_ptr) { struct qla_hw_data *ha = vha->hw; uint32_t s_addr, r_addr; uint32_t r_stride, r_value, r_cnt, qid = 0; uint32_t i, k, loop_cnt; struct qla82xx_md_entry_queue *q_hdr; uint32_t *data_ptr = *d_ptr; q_hdr = ...
false
false
false
false
false
0
snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name, unsigned char addr, struct snd_i2c_device **rdevice) { struct snd_i2c_device *device; *rdevice = NULL; if (snd_BUG_ON(!bus)) return -EINVAL; device = kzalloc(sizeof(*device), GFP_KERNEL); if (device == NULL) return -ENOMEM; device->addr = ...
false
false
false
false
false
0
push_file(int fd) { if (!sms_push(ST_FILE)) return; sms->infd = fd; read_from_file(); }
false
false
false
false
false
0
ftrace_event_write(struct file *file, const char __user *ubuf, size_t cnt, loff_t *ppos) { struct trace_parser parser; struct seq_file *m = file->private_data; struct trace_array *tr = m->private; ssize_t read, ret; if (!cnt) return 0; ret = tracing_update_buffers(); if (ret < 0) return ret; if (tra...
false
true
false
false
true
1
lis3lv02d_add(struct acpi_device *device) { int ret; if (!device) return -EINVAL; lis3_dev.bus_priv = device; lis3_dev.init = lis3lv02d_acpi_init; lis3_dev.read = lis3lv02d_acpi_read; lis3_dev.write = lis3lv02d_acpi_write; strcpy(acpi_device_name(device), DRIVER_NAME); strcpy(acpi_device_class(device), ACPI...
false
true
false
false
false
1
slotS5BServerGone () { d->s5bServer = 0L; if ( d->jabberClient ) d->jabberClient->s5bManager()->setServer( 0L ); }
false
false
false
false
false
0
test_refs_reflog_reflog__write_when_explicitly_active(void) { git_reference *ref; git_oid id; git_oid_fromstr(&id, current_master_tip); git_reference_ensure_log(g_repo, "refs/tags/foo"); cl_git_pass(git_reference_create(&ref, g_repo, "refs/tags/foo", &id, 1, NULL, NULL)); git_reference_free(ref); assert_has_re...
false
false
false
false
false
0
linear_transfer(struct snd_pcm_plugin *plugin, const struct snd_pcm_plugin_channel *src_channels, struct snd_pcm_plugin_channel *dst_channels, snd_pcm_uframes_t frames) { if (snd_BUG_ON(!plugin || !src_channels || !dst_channels)) return -ENXIO; if (frames == 0) return 0; #ifdef CONFI...
false
false
false
false
false
0
VB64_decode(char *d, unsigned dlen, const char *s) { unsigned u, v, l; int i; u = 0; l = 0; while (*s) { for (v = 0; v < 4; v++) { if (!*s) break; i = i64[(int)*s++]; if (i < 0) return (-1); u <<= 6; u |= i; } for (v = 0; v < 3; v++) { if (l >= dlen - 1) return (-1); *d = (u...
false
false
false
false
false
0
update_search_counts (GSearchWindow * gsearch) { gchar * title_bar_string = NULL; gchar * message_string = NULL; gchar * stopped_string = NULL; gchar * tmp; gint total_files; if (gsearch->command_details->command_status == ABORTED) { stopped_string = g_strdup (_("(stopped)")); } total_files = gtk_tree_model...
false
false
false
false
false
0
ProcessAssassinateOrder(Unit *u, AString *o, OrdersCheck *pCheck) { UnitId *id = ParseUnit(o); if (!id || id->unitnum == -1) { ParseError(pCheck, u, 0, "ASSASSINATE: No target given."); return; } if(!pCheck) { if (u->stealorders) delete u->stealorders; AssassinateOrder *ord = new AssassinateOrder; ord->ta...
false
false
false
false
false
0
load_module(void) { if (AST_RWLIST_WRLOCK(&odbc_tables)) { ast_log(LOG_ERROR, "Unable to lock column list. Load failed.\n"); return 0; } load_config(); AST_RWLIST_UNLOCK(&odbc_tables); ast_cdr_register(name, ast_module_info->description, odbc_log); return 0; }
false
false
false
false
false
0
vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *cap) { struct cx23885_dev *dev = video_drvdata(file); struct video_device *vdev = video_devdata(file); strcpy(cap->driver, "cx23885"); strlcpy(cap->card, cx23885_boards[dev->board].name, sizeof(cap->card)); sprintf(cap->bus_info, "PCIe:%s"...
false
false
false
false
false
0
icalcomponent_get_first_component (icalcomponent* c, icalcomponent_kind kind) { icalerror_check_arg_rz( (c!=0),"component"); for( c->component_iterator = pvl_head(c->components); c->component_iterator != 0; c->component_iterator = pvl_next(c->component_iterator)) { icalcomponent *p = (i...
false
false
false
false
false
0
stringCompareIgnoreCase( const char *inStringA, const char *inStringB ) { char *lowerA = stringToLowerCase( inStringA ); char *lowerB = stringToLowerCase( inStringB ); int returnVal = strcmp( lowerA, lowerB ); delete [] lowerB; delete [] lowerA; return returnVal;...
false
false
false
false
false
0
check_mouse_termcode() { # ifdef FEAT_MOUSE_XTERM if (use_xterm_mouse() # ifdef FEAT_GUI && !gui.in_use # endif ) { set_mouse_termcode(KS_MOUSE, (char_u *)(term_is_8bit(T_NAME) ? IF_EB("\233M", CSI_STR "M") : IF_EB("\033[M", ESC_STR "[M"))); if (*p_mouse != NUL) { /* force mouse ...
false
false
false
false
false
0
fm10k_ptp_enable(struct ptp_clock_info *ptp, struct ptp_clock_request *rq, int __always_unused on) { struct ptp_clock_time *t = &rq->perout.period; struct fm10k_intfc *interface; struct fm10k_hw *hw; u64 period; u32 step; /* we can only support periodic output */ if (rq->type != PTP_CLK_REQ_PEROUT...
false
false
false
false
false
0
handle_mpi_spawned() { /* set the start time */ if(CUR_TRACE->start == 0) CUR_TRACE->start_time = CUR_EV->time; CUR_TRACE->start = 1; int ppid = GET_PARAM(CUR_EV, 1); struct ezt_list_token_t *token = __find_matching_spawn(ppid); if(!token) { /* the MPI_Comm_spawn has not been handled yet. We have ...
false
false
false
false
false
0
xhci_print_command_reg(struct xhci_hcd *xhci) { u32 temp; temp = readl(&xhci->op_regs->command); xhci_dbg(xhci, "USBCMD 0x%x:\n", temp); xhci_dbg(xhci, " HC is %s\n", (temp & CMD_RUN) ? "running" : "being stopped"); xhci_dbg(xhci, " HC has %sfinished hard reset\n", (temp & CMD_RESET) ? "not " : ""); xhci...
false
false
false
false
false
0
check_quote_symetry(gchar *str) { const gchar *walk; int ret = 0; if (str == NULL) return TRUE; /* heh, that's symetric */ if (*str == '\0') return TRUE; for (walk = str; *walk; walk++) { if (*walk == '\"') { if (walk == str /* first char */ || *(walk - 1) != '\\') /* not escaped */ ret ++; } ...
false
false
false
false
false
0
replica_is_being_configured (const char *dn) { if (dn == NULL) { slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_is_dn_in_hash: " "NULL argument\n"); return 0; } if (s_hash == NULL || s_lock == NULL) { slapi_log_error(SLAPI_LOG_FATAL, re...
false
false
false
false
false
0
httpGetHostByName(const char *name) /* I - Hostname or IP address */ { const char *nameptr; /* Pointer into name */ unsigned ip[4]; /* IP address components */ _cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */ DEBUG_printf(("httpGetHostByName(name=\"%s\")", name)); /* * Avoi...
false
false
false
false
false
0
_mixer_popup_update(E_Mixer_Instance *inst) { E_Mixer_Channel_State *state; if (!inst->popup) return; state = &inst->mixer_state; if (inst->ui.left) e_slider_value_set(inst->ui.left, state->left); if (inst->ui.right) e_slider_value_set(inst->ui.right, state->right); if (inst->ui.mute) ...
false
false
false
false
false
0
put(ScriptableExtension*, quint64 objId, const QString& propName, const QVariant& value) { bool ok; QString val = toLC(value, &ok); if (!ok) return false; return wrapee->put((unsigned long)objId, propName, val); }
false
false
false
false
false
0
activateMapLayer( const ASCString& name, bool active ) { LayerMap::iterator i = layerMap.find( name ); if ( i != layerMap.end() ) { i->second->setActive( active ); layerChanged( active, name ); } }
false
false
false
false
false
0
input_grab_device(struct input_handle *handle) { struct input_dev *dev = handle->dev; int retval; retval = mutex_lock_interruptible(&dev->mutex); if (retval) return retval; if (dev->grab) { retval = -EBUSY; goto out; } rcu_assign_pointer(dev->grab, handle); out: mutex_unlock(&dev->mutex); return ret...
false
false
false
false
false
0
config_section_update_keyvalue_output (pstdout_state_t pstate, struct config_keyvalue *keyvalue, const char *value_output) { assert (keyvalue); assert (!keyvalue->value_output); if (value_output) { if (!(keyvalue->value_outpu...
false
false
false
false
false
0
getExitPoint(LEPoint &exitPoint) const { if (fFlags & EEF_HAS_EXIT_POINT) { exitPoint = fExitPoint; return &exitPoint; } return NULL; }
false
false
false
false
false
0
on_app_selected(GtkComboBox* cb, FmAppChooserComboBoxData* data) { GtkTreeIter it; GtkTreeModel* model; if( !gtk_combo_box_get_active_iter(cb, &it) ) return; model = gtk_combo_box_get_model(cb); /* if the user chooses "Customize..." */ if(it.user_data == data->other_apps_iter.user_data...
false
false
false
false
false
0
combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) { int x, y, s_idx, d_idx; int src_tl_x = 0, src_tl_y = 0; int src_br_x = src_w, src_br_y = src_h; int b; unsigned char src_alpha; unsigned char new_alpha; float ratio, compl_ratio; long...
false
false
false
false
false
0
xmlSecOpenSSLKWDes3Sha1(void * context, const xmlSecByte * in, xmlSecSize inSize, xmlSecByte * out, xmlSecSize outSize) { xmlSecOpenSSLKWDes3CtxPtr ctx = (xmlSecOpenSSLKWDes3CtxPtr)context; xmlSecAssert2(ctx != NULL, -1); xmlSecAssert2(in != NULL, -1); xml...
false
false
false
false
false
0
wordlist_confirm_single(u8* text, u8 is_ext, u8 class, u8 read_only, u32 add_hits, u32 total_age, u32 last_age) { u32 kh, i; if (!text || !text[0] || strlen((char*)text) > MAX_WORD) return; /* Check if this is a known keyword. */ kh = hash_word(text); for (i=0;i<keyword...
false
false
false
false
false
0
pattern_exec_match(struct pattern_head *head, struct sample *smp, int fill) { struct pattern_expr_list *list; struct pattern *pat; if (!head->match) { if (fill) { static_pattern.smp = NULL; static_pattern.ref = NULL; static_pattern.sflags = 0; static_pattern.type = SMP_T_UINT; static_pattern.val.i ...
false
false
false
false
false
0
pg_last_committed_xact(PG_FUNCTION_ARGS) { TransactionId xid; TimestampTz ts; Datum values[2]; bool nulls[2]; TupleDesc tupdesc; HeapTuple htup; /* and construct a tuple with our data */ xid = GetLatestCommitTsData(&ts, NULL); /* * Construct a tuple descriptor for the result row. This must match this ...
false
false
false
false
false
0
libmail_encode_autodetect(int use7bit, int (*func)(void *), void *arg, int *binaryflag) { int l=0; int longline=0; int c; size_t charcnt=0; size_t bit8cnt=0; if (binaryflag) *binaryflag=0; while ((c = (*func)(arg)) != EOF) { unsigned char ch= (unsigned char)c; ++charcnt; ++l; ...
false
false
false
false
false
0
sorttab_display_select_playlist_cb(GtkPodApp *app, gpointer pl, gpointer data) { Playlist *new_playlist = pl; /* Remove all data from tab */ sort_tab_widget_build(first_sort_tab_widget, -1); /* Add the tracks from the selected playlist to the sorttabs */ if (new_playlist && new_playlist->members) ...
false
false
false
false
false
0
memory_max_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { struct mem_cgroup *memcg = mem_cgroup_from_css(of_css(of)); unsigned int nr_reclaims = MEM_CGROUP_RECLAIM_RETRIES; bool drained = false; unsigned long max; int err; buf = strstrip(buf); err = page_counter_memparse(buf, "ma...
false
false
false
false
false
0
NSSCKFWC_UnwrapKey ( NSSCKFWInstance *fwInstance, CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hUnwrappingKey, CK_BYTE_PTR pWrappedKey, CK_ULONG ulWrappedKeyLen, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount, CK_OBJECT_HANDLE_PTR phKey ) { CK_RV error = CKR_OK; ...
false
false
false
false
false
0
gauche_glib_g_object_unref(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj instance_scm; ScmObj instance; ScmObj SCM_SUBRARGS[1]; int SCM_i; SCM_ENTER_SUBR("g-object-unref"); for (SCM_i=0; SCM_i<1; SCM_i++) { SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i); } instance_scm = SCM_SUBRARGS[0]; instance...
false
false
false
false
false
0
walk_net( fun, arg ) int (*fun)(); char *arg; { register int index; register nptr n; for( index = 0; index < HASHSIZE; index++ ) for( n = hash[index]; n; n = n->hnext ) if( (*fun)( n, arg ) ) return; }
false
false
false
false
false
0
BTDM_GetRxSS(struct rtw_adapter *padapter) { /*PMGNT_INFO pMgntInfo = &padapter->MgntInfo; */ struct mlme_priv *pmlmepriv; struct hal_data_8723a *pHalData; s32 UndecoratedSmoothedPWDB = 0; pmlmepriv = &padapter->mlmepriv; pHalData = GET_HAL_DATA(padapter); if (check_fwstate(pmlmepriv, _FW_LINKED)) { Undeco...
false
false
false
false
false
0
FlmCursorInit( HFDB hDb, FLMUINT uiContainer, HFCURSOR * phCursor) { RCODE rc = FERR_OK; CURSOR * pCursor = NULL; FDB * pDb = (FDB *)hDb; flmAssert( hDb != HFDB_NULL); flmAssert( uiContainer != 0); // See if the database is being forced to close if( RC_BAD( rc = flmCheckDatabaseState( pDb))) ...
false
false
false
false
false
0
InsertIntoTree(JSObjectsClusterTree* tree, HeapObject* obj, bool fine_grain) { JSObjectsCluster cluster = Clusterize(obj, fine_grain); if (cluster.is_null()) return; InsertIntoTree(tree, cluster, GetObjectSize(obj)); }
false
false
false
false
false
0
read (char* packet_, const unsigned int size_) { trace_with_mask("IPv4Socket::read",SOCKTRACE); register int len; register int sz = size_; char* tmp = packet_; if (!is_valid_handler (m_fd) < 0) { return -1; } len = 0; if (m_rdbuf->unbuffered ()) { /* --- This needs to be redesigned --- I should r...
false
false
false
false
false
0
bytearray_pop(PyByteArrayObject *self, PyObject *args) { int value; Py_ssize_t where = -1, n = Py_SIZE(self); char *buf; if (!PyArg_ParseTuple(args, "|n:pop", &where)) return NULL; if (n == 0) { PyErr_SetString(PyExc_IndexError, "pop from empty bytearray"); ...
false
false
false
false
false
0
IoLexer_readSlashSlashComment(IoLexer *self) { IoLexer_pushPos(self); if (IoLexer_nextChar(self) == '/') { if (IoLexer_nextChar(self) == '/') { while (IoLexer_readNonReturn(self)) { } //IoLexer_grabTokenType_(self, COMMENT_TOKEN); IoLexer_popPos(self); return 1; } } IoLexer_popPosBack(self); r...
false
false
false
false
false
0
fft2barkmx(int nfft, int *nbands) { int nfilts = (int)ceilf(hz2bark(Fs/2.)) + 1; *nbands = nfilts; float *matrix = (float *) MALLOC(nfilts * nfft * sizeof(float)); float min_bark = hz2bark(0); float nyqbark = hz2bark(Fs / 2) - min_bark; // bark per filter float step_barks = nyqbark / (nfilts...
false
false
false
false
false
0
getARMFixupKindMachOInfo(unsigned Kind, unsigned &RelocType, unsigned &Log2Size) { RelocType = unsigned(MachO::ARM_RELOC_VANILLA); Log2Size = ~0U; switch (Kind) { default: return false; case FK_Data_1: Log2Size = llvm::Log2_32(1); return true; case FK_Data_2: ...
false
false
false
false
false
0
ov965x_detect_sensor(struct v4l2_subdev *sd) { struct i2c_client *client = v4l2_get_subdevdata(sd); struct ov965x *ov965x = to_ov965x(sd); u8 pid, ver; int ret; mutex_lock(&ov965x->lock); __ov965x_set_power(ov965x, 1); usleep_range(25000, 26000); /* Check sensor revision */ ret = ov965x_read(client, REG_PID,...
false
false
false
false
false
0
mmo_get_object(const gbuint16 objid) { char key[16]; mmo_data_t* data; snprintf(key, sizeof(key), "%d", objid | 0x8000); if (! avltree_find(objects, key, (const void**)&data)) { #ifdef MMO_DBG gbfseek(fin, -2, SEEK_CUR); int ni, n; for (ni = 0; (n = gbfgetc(fin)) != EOF; ni++) { DBG(("mmo_get...
false
false
false
false
false
0
EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints, raw_ostream &OS) { OS << "// Intrinsic ID to overload table\n"; OS << "#ifdef GET_INTRINSIC_OVERLOAD_TABLE\n"; OS << " // Note that entry #0 is the invalid intrinsic!\n"; for (unsigned i = 0, e = Ints.size(); i !=...
false
false
false
false
false
0
___os_device_tcp_client_socket_info ___P((___SCMOBJ dev, ___SCMOBJ peer), (dev, peer) ___SCMOBJ dev; ___SCMOBJ peer;) { #ifndef USE_NETWORKING return ___FIX(___UNIMPL_ERR); #else ___device_tcp_client *d = ___CAST(___device_tcp_client*,___FIELD(dev,___FOREIGN_PTR)); struct socka...
false
false
false
false
false
0
__ca_export_private_pem (GtkTreeIter *iter, gint type) { GObject *widget = NULL; gchar * filename = NULL; GtkDialog * dialog = NULL; gint id; gchar * error_msg = NULL; widget = gtk_builder_get_object (main_window_gtkb, "main_window1"); dialog = GTK_DIALOG (gtk_file_chooser_dialog_new (_("Export uncrypt...
false
false
false
false
false
0
add_helpref(struct valname *vp, struct module *mp, unsigned flags) { struct program_list *pl; struct helpfile *hf; struct helpfile_list *hfl; /* * Find each program that the module appears in.... */ for (pl = mp->mod_pl; pl; pl = pl->pl_next) { hf = pl->pl_prog->prog_hf; /* Helpfile for the program */ ...
false
false
false
true
false
1
computeIptcDigest() { #ifdef EXV_HAVE_XMP_TOOLKIT std::ostringstream res; MD5_CTX context; unsigned char digest[16]; MD5Init(&context); DataBuf data = IptcParser::encode(*iptcData_); MD5Update(&context, data.pData_, data.size_); MD5Final(digest, &context); ...
false
false
false
false
false
0