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
Output(FILE *Out, const char *Fmt, ...) { static unsigned Indent = 0; static int AtBOL = 1; unsigned n; va_list Args; if (NULL != strchr(Fmt, '{') && 0 != Indent) { Indent += 2; } else if (NULL != strchr(Fmt, '}')) { Indent -= 2; } if (AtBOL) { for (n = 0; n < Indent...
false
false
false
false
true
1
Server_bytesinfloodinterval() { int i, tot = 0; for(i=0; i<FLOOD_INTERVAL; i++) tot += Server->q_sent[i]; return tot; }
false
false
false
false
false
0
do_small_deletion( void ) { ae_mutation* mut = NULL; // Determine the position and size of the small deletion int32_t pos = _indiv->_mut_prng->random( _length ); int16_t nb_del; if ( _indiv->get_max_indel_size() == 1 ) { nb_del = 1; } else { nb_del = 1 + _indiv->_mut_prng->random( _indiv->g...
false
false
false
false
false
0
double_int_setbit (double_int a, unsigned bitpos) { if (bitpos < HOST_BITS_PER_WIDE_INT) a.low |= (unsigned HOST_WIDE_INT) 1 << bitpos; else a.high |= (HOST_WIDE_INT) 1 << (bitpos - HOST_BITS_PER_WIDE_INT); return a; }
false
false
false
false
false
0
createWriteFile(const io::path& fileName, bool append) { CWriteFile* file = new CWriteFile(fileName, append); if (file->isOpen()) return file; file->drop(); return 0; }
false
false
false
false
false
0
GOUse_go_barov_journal(Player* pPlayer, GameObject* /*pGo*/) { if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !pPlayer->HasSpell(SPELL_TAILOR_FELCLOTH_BAG)) { pPlayer->CastSpell(pPlayer, SPELL_LEARN_FELCLOTH_BAG, false); } return true; }
false
false
false
false
false
0
saveHeader(QDataStream &str) { KSycocaFactory::saveHeader(str); str << (qint32) m_propertyTypeDict.count(); for (QMap<QString, int>::ConstIterator it = m_propertyTypeDict.constBegin(); it != m_propertyTypeDict.constEnd(); ++it) { str << it.key() << (qint32)it.value(); } }
false
false
false
false
false
0
SetSize(int width,int height) { if ((this->Size[0] != width)||(this->Size[1] != height)) { this->Size[0] = width; this->Size[1] = height; if (this->Interactor) { this->Interactor->SetSize( width, height ); } if(this->OffScreenRendering) { this->ResizeOffScreenWindow...
false
false
false
false
false
0
R_FindPlane ( fixed_t height, int picnum, int lightlevel ) { visplane_t* check; if (picnum == skyflatnum) { height = 0; // all skys map together lightlevel = 0; } for (check=visplanes; check<lastvisplane; check++) { if (height == check->height && picnum == check->picnum ...
false
false
false
false
false
0
keyCopy (Key *dest, const Key *source) { size_t destref = 0; if (!dest) return -1; destref = dest->ksReference; /* free everything in dest */ keySetName (dest, 0); keySetComment (dest,0); keySetOwner (dest, 0); keySetRaw (dest, 0, 0); keyClear (dest); if (!source) return 0; /* copy all data of structure...
false
false
false
false
false
0
backendForUDI(const QString& udi, bool create) { DeviceBackend *backend = 0; if (udi.isEmpty()) { return backend; } if (s_backends.contains(udi)) { backend = s_backends.value(udi); } else if (create) { backend = new DeviceBackend(udi); s_backends.insert(udi, backend)...
false
false
false
false
false
0
bw_transform(const sauchar_t *T, sauchar_t *U, saidx_t *SA, saidx_t n, saidx_t *idx) { saidx_t *A, i, j, p, t; saint_t c; /* Check arguments. */ if((T == NULL) || (U == NULL) || (n < 0) || (idx == NULL)) { return -1; } if(n <= 1) { if(n == 1) { U[0] = T[0]; } *idx = n; return 0; } ...
false
false
false
false
false
0
set_device (const std::string& device_string) { PWaitAndSignal m(core_mutex); std::vector<AudioInputDevice> devices; AudioInputDevice device; bool found = false; get_devices (devices); for (std::vector<AudioInputDevice>::iterator it = devices.begin (); it < devices.end (); it++) if ((*it...
false
false
false
false
false
0
main() { const unsigned int pmax = 1000; // (a = 3, b = 4, c = 5) is the smallest integer right angle trangle. unsigned int sols, solsbest = 1, pbest = 12; for (unsigned int p = 3; p < pmax + 1; ++p) { sols = 0; for (unsigned int c = 5; c < p; ++c) { for (unsigned int b = 4;...
false
false
false
false
false
0
GetTime(framepos_t pos) const { //printf("GET TIME %d %f %d\n", pos, m_dLastTime, m_iId); if (pos == ERR) { if (!m_pStrPacket) ReadPacketInternal(); return m_dLastTime; } if (m_pSeekInfo && pos < m_pSeekInfo->size()) return (*m_pSeekInfo)[pos].object_start_time / 1000.; //AVM_WRITE(...
false
false
false
false
false
0
dessert_msg_resizeext(dessert_msg_t *msg, dessert_ext_t *ext, size_t new_len) { int old_len = ext->len; /* check ext */ if (new_len > DESSERT_MAXFRAMELEN - ntohs(msg->hlen) - ntohs(msg->plen) - old_len) { dessert_debug("message would be too large after adding extension!"); return -2; /* too big */ } else if ...
false
false
false
false
false
0
authident(hbaPort *port) { char ident_user[IDENT_USERNAME_MAX + 1]; if (get_role_line(port->user_name) == NULL) return STATUS_ERROR; switch (port->raddr.addr.ss_family) { case AF_INET: #ifdef HAVE_IPV6 case AF_INET6: #endif if (!ident_inet(port->raddr, port->laddr, ident_user)) return STATUS_ERROR; ...
false
false
false
false
false
0
command_abil(object *op, const char *params) { char thing[20], thing2[20]; int iii; player *pl; iii = 0; thing[0] = '\0'; thing2[0] = '\0'; if (*params == '\0' || sscanf(params, "%s %s %d", thing, thing2, &iii) != 3 || thing[0] == '\0') { draw_ext_info(NDI_UNIQUE, 0, op, MSG...
true
true
true
false
true
1
undo() { /* restore to tree before last rearrangement */ long temp; boolean btemp; node *q; switch (lastop) { case rearr: restoring = true; oldleft = wasleft; re_move2(&treenode[what - 1], &q, &root, &wasleft, treenode); btemp = wasleft; wasleft = oldleft; add2(treenode[fromwhere -...
false
false
false
false
false
0
get_next_line(char *gets_char) { char *temp = NULL; int len; char gc; flush_append(); /* will be returned if last line in the file * doesn't end with either '\n' or '\0' */ gc = NO_EOL_CHAR; while (G.current_input_file < G.input_file_count) { FILE *fp = G.input_file_list[G.current_input_file]; /* Read li...
false
false
false
false
false
0
vfs_put(Vfs_handle *handle, char *key, void *buffer, size_t length) { int do_free, st; void *buf, *outbuf; size_t len, outbuf_length; handle->error_msg = NULL; handle->error_num = 0; buf = buffer; len = length; do_free = 0; if (handle->put_filter != NULL) { log_msg((LOG_TRACE_LEVEL, "put_filter(%s...
false
false
false
false
false
0
api_set_api_errnum_by_fiid_object (ipmi_ctx_t ctx, fiid_obj_t obj) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); if (fiid_obj_errnum (obj) == FIID_ERR_SUCCESS) ctx->errnum = IPMI_ERR_SUCCESS; else if (fiid_obj_errnum (obj) == FIID_ERR_OUT_OF_MEMORY) ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; else if (fiid...
false
false
false
false
false
0
get_lh_mspec (parser *p) { parser *subp = p->subp; #if LHDEBUG fprintf(stderr, "get_lh_mspec: %s\n", (p->flags & P_COMPILE)? "compiling" : "running"); #endif if (subp != NULL) { /* executing a previously compiled parser */ parser_free_aux_nodes(subp); parser_aux_init(subp); parser_reinit(subp, p-...
false
true
false
false
false
1
BSAM_SeedSet_empty_current(BSAM_SeedSet *seedset){ register gint i, j; gint qpos, tpos; if(seedset->query_pos_list->len){ if(seedset->target_pos_list->len){ for(i = 0; i < seedset->query_pos_list->len; i++){ qpos = g_array_index(seedset->query_pos_list, ...
false
false
false
false
false
0
netxen_nic_test_link(struct net_device *dev) { struct netxen_adapter *adapter = netdev_priv(dev); u32 val, port; port = adapter->physical_port; if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { val = NXRD32(adapter, CRB_XG_STATE_P3); val = XG_LINK_STATE_P3(adapter->ahw.pci_func, val); return (val == XG_LINK...
false
false
false
false
false
0
do_act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) { struct cxgbi_sock *csk = ctx; struct cpl_act_open_rpl *rpl = cplhdr(skb); pr_info("csk 0x%p,%u,0x%lx,%u, status %u, %pI4:%u-%pI4:%u.\n", csk, csk->state, csk->flags, csk->atid, rpl->status, &csk->saddr.sin_addr.s_addr, ntohs(csk->saddr.sin_p...
false
false
false
false
false
0
queue_local_notify(xmlNode * notify_src, const char *client_id, gboolean sync_reply, gboolean from_peer) { cib_local_notify_t *notify = calloc(1, sizeof(cib_local_notify_t)); notify->notify_src = notify_src; notify->client_id = strdup(client_id); notify->sync_reply = sync_reply; ...
false
false
false
false
false
0
sig_nick_changed(MUC_REC *channel) { if (!IS_MUC(channel)) return; if (MUC(active_win->active) == channel) update_nick_statusbar(channel->server, channel, TRUE); }
false
false
false
false
false
0
selinux_sk_getsecid(struct sock *sk, u32 *secid) { if (!sk) *secid = SECINITSID_ANY_SOCKET; else { struct sk_security_struct *sksec = sk->sk_security; *secid = sksec->sid; } }
false
false
false
false
false
0
default_debuglog_handler(dc1394log_t type, const char *message, void* user) { static int log_enabled = -1; if (log_enabled == -1) { if (getenv("DC1394_DEBUG") == NULL ) log_enabled = 0; else log_enabled = 1; } if (log_enabled == 1) fprintf(stderr, "libdc1...
false
false
false
false
true
1
nfs4_update_delay(long *timeout) { long ret; if (!timeout) return NFS4_POLL_RETRY_MAX; if (*timeout <= 0) *timeout = NFS4_POLL_RETRY_MIN; if (*timeout > NFS4_POLL_RETRY_MAX) *timeout = NFS4_POLL_RETRY_MAX; ret = *timeout; *timeout <<= 1; return ret; }
false
false
false
false
false
0
acl_add4(dns_acl_t *acl, uint32_t addr, uint32_t mask) { dns_acl_entry4_t *entry; if (acl->acl_count == acl->acl_entry_max) { if (acl_extend_addr4(acl) < 0) return -1; } entry = &acl->acl_entry[acl->acl_count]; entry->ae4_addr = addr; entry->ae4_mask = mask; acl->acl_co...
false
false
false
false
false
0
show_grid() { SHOW_ALL_NL; if (! some_grid_selected()) { fputs("\tgrid is OFF\n", stderr); return; } /* HBB 20010806: new storage method for grid options: */ fprintf(stderr, "\t%s grid drawn at", (polar_grid_angle != 0) ? "Polar" : "Rectangular"); #define SHOW_GRID(axis) \ if (axis...
false
false
false
false
false
0
parse_http_status(const std::string& str) { // HTTP/1.1 200 OK std::vector<std::string> tokens; tokenize(str, tokens); if(tokens.size() < 2) return 0; unsigned int code; if(!stringto(tokens[1],code)) return 0; return code; }
false
false
false
false
false
0
ftp_nb_type(struct connectdata *conn, bool ascii, ftpstate newstate) { struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result; char want = (char)(ascii?'A':'I'); if(ftpc->transfertype == want) { state(conn, newstate); return ftp_state_type_resp(conn, 200, newstate); } ...
false
false
false
false
false
0
gs_lock_plug_finalize (GObject *object) { GSLockPlug *plug; g_return_if_fail (object != NULL); g_return_if_fail (GS_IS_LOCK_PLUG (object)); plug = GS_LOCK_PLUG (object); g_return_if_fail (plug->priv != NULL); if (plug->priv->input_sources != NULL) g_pt...
false
false
false
false
false
0
mpcandi_t_addfoundfactor (mpcandi_t *n, mpz_t f, int displaywarning) { #if defined (CANDI_DEBUG) Candi_Validate("Pre mpcandi_t_addfoundfactor_d", n); #endif char *cp, *cp1; if (!mpz_divisible_p (n->n, f)) { /* ERROR was not a factor NOTE however, that this is "valid" for the ui() function to ...
false
false
false
false
false
0
CVGridFitChar(CharView *cv) { void *single_glyph_context; SplineFont *sf = cv->b.sc->parent; int layer = CVLayer((CharViewBase *) cv); SplinePointListsFree(cv->b.gridfit); cv->b.gridfit = NULL; FreeType_FreeRaster(cv->raster); cv->raster = NULL; single_glyph_context = _FreeTypeFontContext(sf,c...
false
false
false
false
false
0
policy_view_display_avrule_results(policy_view_t * pv, apol_vector_t * results, int is_syn_rules) { apol_policy_t *policy = toplevel_get_policy(pv->top); qpol_policy_t *qp = apol_policy_get_qpol(policy); GtkTextIter start, end; char *string, buf[64]; size_t i; gtk_text_buffer_get_start_iter(pv->rules_text, &star...
true
true
false
false
false
1
fill_store (XAP_UnixDialog_ClipArt *self) { gboolean ret = self->fillStore(); if (!ret) { GtkWidget *dlg = self->getDialog (); const XAP_StringSet *pSS = XAP_App::getApp()->getStringSet (); std::string s; pSS->getValueUTF8(XAP_STRING_ID_DLG_CLIPART_Error, s); GtkWidget *err = gtk_message_dialog_new (GTK_WI...
false
false
false
false
false
0
prepare_nic_thread(nic_t *nic) { pthread_attr_t attr; int rc; pthread_mutex_lock(&nic->nic_mutex); if (nic->thread == INVALID_THREAD) { struct timespec ts; struct timeval tp; LOG_INFO(PFX "%s: spinning up thread for nic", nic->log_name); /* Try to spin up the nic thread */ pthread_attr_init(&attr); ...
false
false
false
false
false
0
bnx2x_sriov_configure(struct pci_dev *dev, int num_vfs_param) { struct bnx2x *bp = netdev_priv(pci_get_drvdata(dev)); if (!IS_SRIOV(bp)) { BNX2X_ERR("failed to configure SR-IOV since vfdb was not allocated. Check dmesg for errors in probe stage\n"); return -EINVAL; } DP(BNX2X_MSG_IOV, "bnx2x_sriov_configure c...
false
false
false
false
false
0
watch_thumbnailer_cb (GPid pid, int status, gpointer user_data) { LoadData *load_data = user_data; GthThumbLoader *self = load_data->thumb_loader; GdkPixbuf *pixbuf; if (load_data->thumbnailer_timeout != 0) { g_source_remove (load_data->thumbnailer_timeout); load_data->thumb...
false
false
false
false
false
0
tracker_tags_get_filter_string (GStrv files, const gchar *tag) { GString *filter; gint i, len; if (!files) { return NULL; } len = g_strv_length (files); if (len < 1) { return NULL; } filter = g_string_new (""); g_string_append_printf (filter, "FILTER ("); if (t...
false
false
false
false
false
0
getlangs(void) { char *p; langs=getenv("w_wims_site_languages"); if(langs==NULL) langs=""; for(p=langs;strlen(p)>=2 && languagecnt<MAX_LANGS; p=find_word_start(find_word_end(p))) { if(!isalpha(*p) || !isalpha(*(p+1))) continue; memmove(language[languagecnt],p,2); language[languagecnt][2]=0; langua...
false
false
false
false
false
0
closeTagNoBreak() { char buf[256]; iLvl--; snprintf(buf, 256, "</%s>\n", openTags.pop()); file->writeStr(buf); }
false
false
false
false
false
0
mvumi_complete_internal_cmd(struct mvumi_hba *mhba, struct mvumi_cmd *cmd, struct mvumi_rsp_frame *ob_frame) { if (atomic_read(&cmd->sync_cmd)) { cmd->cmd_status = ob_frame->req_status; if ((ob_frame->req_status == SAM_STAT_CHECK_CONDITION) && (ob_frame->rsp_flag & CL_RSP_FLAG_SENSEDATA) && cmd...
false
true
false
false
false
1
dpd_exit(struct dfs_pattern_detector *dpd) { struct channel_detector *cd, *cd0; if (!list_empty(&dpd->channel_detectors)) list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) channel_detector_exit(dpd, cd); kfree(dpd); }
false
false
false
false
false
0
alloc_reserved_file_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, u64 flags, u64 owner, u64 offset, struct btrfs_key *ins, int ref_mod) { int ret; struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_extent_item *extent...
false
false
false
false
false
0
gimmix_path_get_parent_dir (gchar *path) { gchar *p, buf[128]; gchar *ret; strcpy (buf, path); p = strrchr (buf, '/'); if (p) { *p = 0; ret = g_strdup (buf); } else ret = g_strdup ("/"); return ret; }
false
false
false
false
false
0
write_track(smf_track_t *track) { int ret; smf_event_t *event; ret = write_mtrk_header(track); if (ret) return (ret); while ((event = smf_track_get_next_event(track)) != NULL) { ret = write_event(event); if (ret) return (ret); } ret = write_mtrk_length(track); if (ret) return (ret); return (0); ...
false
false
false
false
false
0
fold_case() const { typedef std::map<value_type, vtkUnicodeString> map_t; static map_t map; if(map.empty()) { #include <vtkUnicodeCaseFoldData.h> for(value_type* i = &vtkUnicodeCaseFoldData[0]; *i; ++i) { const value_type code = *i; vtkUnicodeString mapping; for(++i; *i; ++i)...
false
false
false
false
false
0
go_option_menu_position (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) { GOOptionMenu *option_menu; GtkWidget *active; GtkWidget *child; GtkWidget *widget; GtkRequisition requisition; GList *children; gint screen_width; gint menu_xpos; gint menu_...
false
false
false
false
false
0
AddDefaultCommands() { std::list<cmCommand*> commands; GetBootstrapCommands(commands); GetPredefinedCommands(commands); for(std::list<cmCommand*>::iterator i = commands.begin(); i != commands.end(); ++i) { this->AddCommand(*i); } }
false
false
false
false
false
0
get_qam_signal_to_noise(struct drxk_state *state, s32 *p_signal_to_noise) { int status = 0; u16 qam_sl_err_power = 0; /* accum. error between raw and sliced symbols */ u32 qam_sl_sig_power = 0; /* used for MER, depends of QAM modulation */ u32 qam_sl_mer = 0; /* QAM MER */ dprintk(1, "\n"); ...
false
false
false
false
false
0
dpixWriteStream(FILE *fp, DPIX *dpix) { l_int32 w, h, nbytes, xres, yres; l_float64 *data; DPIX *dpixt; PROCNAME("dpixWriteStream"); if (!fp) return ERROR_INT("stream not defined", procName, 1); if (!dpix) return ERROR_INT("dpix not defined", procName, 1); ...
false
false
false
false
false
0
overlay( Glyph* g1, Glyph* g2, Glyph* g3, Glyph* g4, Glyph* g5, Glyph* g6, Glyph* g7, Glyph* g8, Glyph* g9, Glyph* g10 ) const { return LayoutKitImpl::add( new Box( new Superpose(new Align(Dimension_X), new Align(Dimension_Y)), 10 ), g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 ); }
false
false
false
false
false
0
send_message(const std::string &msg) { if(!client_socket) return; client_socket->send( msg.c_str(), msg.size() ); client_socket->send("\n\r> ", 4); }
false
false
false
false
false
0
ufshcd_exception_event_handler(struct work_struct *work) { struct ufs_hba *hba; int err; u32 status = 0; hba = container_of(work, struct ufs_hba, eeh_work); pm_runtime_get_sync(hba->dev); err = ufshcd_get_ee_status(hba, &status); if (err) { dev_err(hba->dev, "%s: failed to get exception status %d\n", __fu...
false
false
false
false
false
0
raw_open(const char *filename) { FILE *f = sci_fopen(filename, "rb"); exe_handle_t *handle; if (!f) return NULL; handle = (exe_handle_t*)sci_malloc(sizeof(exe_handle_t)); handle->f = f; return handle; }
false
false
false
false
false
0
xml_create_command (ClientData dummy, Tcl_Interp *interp, int argc, char *argv[]) { int flag; char *version = "1.0"; char **argp; xmlDocPtr doc; if (argc < 2) { Tcl_AppendResult(interp, "bad # of args", NULL); return TCL_ERROR; } flag = ENTER_TRANSIENT; argp = &argv[2]; while (argc >= ...
false
false
false
false
false
0
main_test( int argc, char **argv ) { int iret = 0; set_log_file((char *)"tempcflog.txt",false); //test_sleeps(); verbosity = 2; #ifdef USE_WHOLE_READ iret = open_raw_log_whole(); if (iret == 0) { show_packets(); } #else iret = open_raw_log(); if (iret == 0) { size_t c...
false
false
false
false
false
0
consys_getrow_ex (consys_struct *consys, int rowndx, double **vec) /* This routine copies a row out of the constraint matrix into the vector vec (creating a vector if needed). Parameters: consys: constraint system rowndx: row to be fetched vec: (i) vector (if NULL, one will be created) (o) vector ...
false
false
false
false
false
0
tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) { struct tuner *t = to_tuner(sd); struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; if (check_mode(t, vt->type) == -EINVAL) return 0; if (vt->type == t->mode && analog_ops->get_afc)...
false
false
false
false
false
0
kmod_config_iter_new(const struct kmod_ctx* ctx, enum config_type type) { struct kmod_config_iter *iter = calloc(1, sizeof(*iter)); const struct kmod_config *config = kmod_get_config(ctx); if (iter == NULL) return NULL; iter->type = type; switch (type) { case CONFIG_TYPE_BLACKLIST: iter->list = conf...
false
false
false
false
false
0
A_QuestMsg(mobj_t* actor) { char* name; int quest; int i; // get name name = DEH_String(mobjinfo[(MT_TOKEN_QUEST1 - 1) + actor->info->speed].name); strcpy(pmsgbuffer, name); // inlined in asm // give quest and display message to players for(i = 0; i < MAXPLAYERS; i++) { q...
false
false
false
false
false
0
thermal_release(struct device *dev) { struct thermal_zone_device *tz; struct thermal_cooling_device *cdev; if (!strncmp(dev_name(dev), "thermal_zone", sizeof("thermal_zone") - 1)) { tz = to_thermal_zone(dev); kfree(tz); } else if(!strncmp(dev_name(dev), "cooling_device", sizeof("cooling_device") - 1)...
false
false
false
false
false
0
key_action_scroll_page (GtkWidget * wid, GdkEventKey * evt, char *d1, char *d2, struct session *sess) { int value, end; GtkAdjustment *adj; enum scroll_type { PAGE_TOP, PAGE_BOTTOM, PAGE_UP, PAGE_DOWN, LINE_UP, LINE_DOWN }; int type = PAGE_DOWN; if (d1) { if (!g_ascii_strcasecmp (d1, "top")) type = ...
false
false
false
false
false
0
sci_phy_starting_await_sig_fis_uf_substate_enter(struct sci_base_state_machine *sm) { struct isci_phy *iphy = container_of(sm, typeof(*iphy), sm); if (sci_port_link_detected(iphy->owning_port, iphy)) { /* * Clear the PE suspend condition so we can actually * receive SIG FIS * The hardware will not respon...
false
false
false
false
false
0
insertItem(FXint index,FXIconItem* item,FXbool notify){ register FXint old=current; // Must have item if(!item){ fxerror("%s::insertItem: item is NULL.\n",getClassName()); } // Must be in range if(index<0 || items.no()<index){ fxerror("%s::insertItem: index out of range.\n",getClassName()); } // Add item...
false
false
false
false
false
0
BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; uint8 *dstp; uint8 *patp; uint16 color16; uint16 *dstp16; if(hdcDest->brush->style == GDI_BS_SOLID) { color16 = gdi_get_color_16bpp(hdcDest, hdcDest->brush->color); for (y = 0; y < nHeight; y++) { dstp16...
false
false
false
false
false
0
channels() { PodcastChannelList list; QListIterator<SqlPodcastChannelPtr> i( m_channels ); while( i.hasNext() ) { list << PodcastChannelPtr::dynamicCast( i.next() ); } return list; }
false
false
false
false
false
0
iwlagn_disable_bss(struct iwl_priv *priv, struct iwl_rxon_context *ctx, struct iwl_rxon_cmd *send) { __le32 old_filter = send->filter_flags; int ret; send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; ret = iwl_dvm_send_cmd_pdu(priv, ctx->rxon_cmd, 0, sizeof(*send), send); send->filter_flags = o...
false
false
false
false
false
0
nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl, struct posix_acl **dpacl, unsigned int flags) { struct posix_acl_state effective_acl_state, default_acl_state; struct nfs4_ace *ace; int ret; ret = init_state(&effective_acl_state, acl->naces); if (ret) return ret; ret = init_state(&def...
false
false
false
false
false
0
setIncrement(FXdouble inc){ if(inc<=0.0){ fxerror("%s::setIncrement: negative or zero increment specified.\n",getClassName()); } incr=inc; }
false
false
false
false
false
0
f_isident(VALUE *vp) { VALUE result; /* initialize VALUEs */ result.v_type = V_NUM; result.v_subtype = V_NOSUBTYPE; if (vp->v_type == V_MAT) { result.v_num = itoq((long) matisident(vp->v_mat)); } else { result.v_num = itoq(0); } return result; }
false
false
false
false
false
0
Cvar_Describe_ByName(const char *var_name, const char *description_string) { cvar_t *var; if (var_name == NULL) return; var = Cvar_Get (var_name, 0, 0); Cvar_Describe (var, description_string); }
false
false
false
false
false
0
fs_multicast_transmitter_udpsock_dec_sending (UdpSock *udpsock) { if (g_atomic_int_dec_and_test (&udpsock->sendcount)) { if (udpsock->udpsink_recvonly_filter) g_object_set (udpsock->udpsink_recvonly_filter, "sending", FALSE, NULL); else g_signal_emit_by_name (udpsock->udpsink, "remove", udpsock-...
false
false
false
false
false
0
__lambda71_ (GmpcBrowsersMetadata* self, GmpcWidgetsSonglist* source, mpd_Song* song) { mpd_Song* _tmp0_; const gchar* _tmp1_; g_return_if_fail (source != NULL); g_return_if_fail (song != NULL); _tmp0_ = song; _tmp1_ = _tmp0_->artist; if (_tmp1_ != NULL) { mpd_Song* _tmp2_; const gchar* _tmp3_; _tmp2_ = so...
false
false
false
false
false
0
DSDPYStepLineSearch2(DSDP dsdp, double mutarget, double dstep0, DSDPVec dy){ /* The merit function is the objective (DD) plus the barrier function */ /* This line search is used in the corrector steps */ int info, attempt, maxattempts=10; double dstep,newpotential,bdotdy,oldpotential,logdet; double maxmaxstep...
false
false
false
false
false
0
deselectAll() // //////////////////////////////////////////////////////////////////////// { for(int i = selectionList.getLength() - 1; i >= 0; i--) deselect(i); }
false
false
false
false
false
0
_lvmcache_update_pvid(struct lvmcache_info *info, const char *pvid) { /* * Nothing to do if already stored with same pvid. */ if (((dm_hash_lookup(_pvid_hash, pvid)) == info) && !strcmp(info->dev->pvid, pvid)) return 1; if (*info->dev->pvid) dm_hash_remove(_pvid_hash, info->dev->pvid); strncpy(info->d...
false
true
false
false
false
1
snd_dummy_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol); int change, addr = kcontrol->private_value; int left, right; left = ucontrol->value.integer.value[0]; if (left < -50) left = -50; if (left > 100) left = 100; ...
false
false
false
false
false
0
gkm_transaction_real_complete (GkmTransaction *self) { GList *l; g_return_val_if_fail (!self->completed, FALSE); self->completed = TRUE; g_object_notify (G_OBJECT (self), "completed"); for (l = self->completes; l; l = g_list_next (l)) { complete_invoke (self, l->data); complete_destroy (l->data); } g_list...
false
false
false
false
false
0
vpdma_create_desc_list(struct vpdma_desc_list *list, size_t size, int type) { int r; r = vpdma_alloc_desc_buf(&list->buf, size); if (r) return r; list->next = list->buf.addr; list->type = type; return 0; }
false
false
false
false
false
0
Extension(const char *path) { const char *cp = path; cp = strrchr(path, '.'); if (cp == NULL) return (""); // printf("Extension='%s'\n", cp); return (cp); }
false
false
false
false
false
0
num_nonzero_p(num) VALUE num; { if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) { return Qnil; } return num; }
false
false
false
false
false
0
setCoupling(Energy2 q2,tcPDPtr a,tcPDPtr b, tcPDPtr c) { int ihiggs=c->id(); int id(abs(a->id())); Complex output(1.); // neutral Higgs if(ihiggs==25||ihiggs==35||ihiggs==45||ihiggs==36||ihiggs==46) { if(_idlast.first!=id||q2!=_q2last) { _idlast.first=id; _masslast.first = _theSM->mass(q2,a); ...
false
false
false
false
false
0
parse_comment (void) { int state = 0; if (this->get () != '-' || // Skip the opening "<!--" this->get () != '-' || // completely. this->get () == '-') // and at least something not '-'. return -1; while (state < 3) // Waiting for the trailing three character '-->'. Notice that ...
false
false
false
false
false
0
git__strncmp(const char *a, const char *b, size_t sz) { while (sz && *a && *b && *a == *b) --sz, ++a, ++b; if (!sz) return 0; return (int)(*(const unsigned char *)a) - (int)(*(const unsigned char *)b); }
false
false
false
false
false
0
extractpat(char *s, char **r, char *term, char *end) { int save; char *cp; Word *w; cp = shellt->charin(s, term); if(cp){ *r = cp; if(cp == s) return 0; save = *cp; *cp = 0; w = stow(s); *cp = save; } else { *r = end; w = stow(s); } return w; }
false
false
false
false
false
0
lookup_word_docs(SquatSearchIndex* index, char const* data, int* invalid_file) { int i; char const* s = index->word_list; for (i = 0; i < SQUAT_WORD_SIZE; i++) { char p; char ch = data[i]; char const* branch_start = s; int skip; /* decode 'present' bits to see if ch is present at this leve...
false
false
false
false
false
0
get_all_file_versions(DBId_t pathid, DBId_t fnid, const char *client) { Dmsg3(dbglevel, "get_all_file_versions(%lld, %lld, %s)\n", (uint64_t)pathid, (uint64_t)fnid, client); char ed1[50], ed2[50]; POOL_MEM q; if (see_copies) { Mmsg(q, " AND Job.Type IN ('C', 'B') "); } else { Mmsg(q,...
false
false
false
false
false
0
gck_session_derive_key_async (GckSession *self, GckObject *base, GckMechanism *mechanism, GckAttributes *attrs, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { DeriveKey *args = _gck_call_async_prep (self, self, perform_derive...
false
true
false
false
false
1
incomingUploadData(HttpQueue *q, HttpPacket *packet) { HttpConn *conn; HttpRx *rx; MprBuf *content; Upload *up; char *line, *nextTok; ssize count; int done, rc; mprAssert(packet); conn = q->conn; rx = conn->rx; up = q->queueDat...
false
false
false
false
false
0
SSL_RevealCert(PRFileDesc * fd) { CERTCertificate * cert = NULL; sslSocket * sslsocket = NULL; sslsocket = ssl_FindSocket(fd); /* CERT_DupCertificate increases reference count and returns pointer to * the same cert */ if (sslsocket && sslsocket->sec.peerCert) cert = CERT_DupCertificate(sslsocke...
false
false
false
false
false
0
writechannel(struct Channel* channel, int fd, circbuffer *cbuf) { int len, maxlen; TRACE(("enter writechannel fd %d", fd)) maxlen = cbuf_readlen(cbuf); /* Write the data out */ len = write(fd, cbuf_readptr(cbuf, maxlen), maxlen); if (len <= 0) { TRACE(("errno %d len %d", errno, len)) if (len < 0 && errno ...
false
false
false
false
false
0
sbp2_clamp_management_orb_timeout(struct sbp2_target *tgt) { unsigned int timeout = tgt->mgt_orb_timeout; if (timeout > 40000) dev_notice(tgt_dev(tgt), "%ds mgt_ORB_timeout limited to 40s\n", timeout / 1000); tgt->mgt_orb_timeout = clamp_val(timeout, 5000, 40000); }
false
false
false
false
false
0
xen_pcibk_mmio_enabled(struct pci_dev *dev) { struct pcistub_device *psdev; pci_ers_result_t result; result = PCI_ERS_RESULT_RECOVERED; dev_dbg(&dev->dev, "xen_pcibk_mmio_enabled(bus:%x,devfn:%x)\n", dev->bus->number, dev->devfn); down_write(&pcistub_sem); psdev = pcistub_device_find(pci_domain_nr(dev->bus), ...
false
false
false
false
false
0
mtcp_strstartswith (const char *s1, const char *s2) { if (mtcp_strlen(s1) >= mtcp_strlen(s2)) { return mtcp_strncmp(s1, s2, mtcp_strlen(s2)) == 0; } return 0; }
false
false
false
false
false
0