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
nonDestructiveBasicTest() { Q_ASSERT ( model->buddy ( QModelIndex() ) == QModelIndex() ); model->canFetchMore ( QModelIndex() ); Q_ASSERT ( model->columnCount ( QModelIndex() ) >= 0 ); Q_ASSERT ( model->data ( QModelIndex() ) == QVariant() ); fetchingMore = true; model->fetchMore ( QModelIndex()...
false
false
false
false
false
0
gnc_commodity_set_mnemonic(gnc_commodity * cm, const char * mnemonic) { CommodityPrivate* priv; if (!cm) return; priv = GET_PRIVATE(cm); if (priv->mnemonic == mnemonic) return; gnc_commodity_begin_edit(cm); CACHE_REMOVE (priv->mnemonic); priv->mnemonic = CACHE_INSERT(mnemonic); mark_c...
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &MF) { DEBUG(dbgs() << "******** Machine Sinking ********\n"); const TargetMachine &TM = MF.getTarget(); TII = TM.getInstrInfo(); TRI = TM.getRegisterInfo(); MRI = &MF.getRegInfo(); DT = &getAnalysis<MachineDominatorTree>(); LI = &getAnalysis<MachineLoopInfo>(); AA ...
false
false
false
false
false
0
gfilechooser_mouse(GGadget *g, GEvent *event) { GFileChooser *gfc = (GFileChooser *) g; if (( event->type==et_mouseup || event->type==et_mousedown ) && (event->u.mouse.button>=4 && event->u.mouse.button<=7) ) { if ( gfc->files->vsb!=NULL ) return( GGadgetDispatchEvent(&gfc->files->vsb->g,event)); else r...
false
false
false
false
false
0
fc_exch_mgr_add(struct fc_lport *lport, struct fc_exch_mgr *mp, bool (*match)(struct fc_frame *)) { struct fc_exch_mgr_anchor *ema; ema = kmalloc(sizeof(*ema), GFP_ATOMIC); if (!ema) return ema; ema->mp = mp; ema->match = match; /* add EM anchor to EM anchors list */ list_add_tail(&ema->ema_l...
false
false
false
false
false
0
open(const char *filename) { if (Generator::open(filename) != 0) { return -1; } fprintf(out, ".tms9900\n"); // Set where RAM starts / ends //Generator *generator = this; //if (dynamic_cast<TMS9900 *>(this) == NULL) if (typeid(this) == typeid(TMS9900 *)) { // FIXME //fprintf(out, "free_ram equ 0\...
false
false
false
false
false
0
init_test(hid_t file_id) { const char* f_to_c = "(5/9.0)*(x-32)"; /* utrans is a transform for unsigned types: no negative numbers involved and results are < 255 to fit into uchar */ const char* utrans = "((x+100)/4)*3"; hid_t dataspace = -1; hid_t dxpl_id_f_to_c = -1; hid_t dxpl_id_utran...
false
false
false
false
false
0
prepare_generic(EncdescWriteInfo *info, unsigned length, GtBitsequence code) { EncdescCode *this_code; GT_GETNEXTFREEINARRAY(this_code, info->codes, EncdescCode, GT_ENCDESC_ARRAY_RESIZE); this_code->length = length; ...
false
false
false
false
false
0
do_one_keyinfo (ctrl_t ctrl, const unsigned char *grip, assuan_context_t ctx, int data, int with_ssh_fpr, int in_ssh, int ttl, int disabled, int confirm) { gpg_error_t err; char hexgrip[40+1]; char *fpr = NULL; int keytype; unsigned char *shadow_info = NULL; char *serialno = ...
true
true
false
false
false
1
dialog_response_callback (GtkDialog *dialog, gint response_id, TotemGalleryProgress *self) { if (response_id != GTK_RESPONSE_OK) { /* Cancel the operation by killing the process */ kill (self->priv->child_pid, SIGINT); /* Unlink the output file, just in case (race condition) it's already been created */ g_unl...
false
false
false
false
false
0
GenerateRepresentation(int *regions, int len, vtkPolyData *pd) { int i; vtkPoints *pts; vtkCellArray *polys; if ( this->Top == NULL ) { vtkErrorMacro(<<"vtkKdTree::GenerateRepresentation no tree"); return; } int npoints = 8 * len; int npolys = 6 * len; pts = vtkPoints::New(); pts->Al...
false
false
false
false
false
0
nv_addsub(cap) cmdarg_T *cap; { if (!checkclearopq(cap->oap) && do_addsub((int)cap->cmdchar, cap->count1) == OK) prep_redo_cmd(cap); }
false
false
false
false
false
0
glusterd_volume_compute_cksum (glusterd_volinfo_t *volinfo) { int32_t ret = -1; glusterd_conf_t *priv = NULL; char path[PATH_MAX] = {0,}; char cksum_path[PATH_MAX] = {0,}; char filepath[PATH_MAX] = ...
false
false
false
true
false
1
xfermem_get_freespace (txfermem *xf) { size_t freeindex, readindex; if(!xf) return 0; if ((freeindex = xf->freeindex) < 0 || (readindex = xf->readindex) < 0) return (0); if (readindex > freeindex) return ((readindex - freeindex) - 1); else return ((xf->size - (freeindex - readindex)) - 1); }
false
false
false
false
false
0
vertexInferiorDreta(){ QPointF verInferiorDreta(0.0,0.0); QVector<QPointF> pSolucio; for(int i=0;i<=arrayPeces.size()-1;i++){ arrayPeces[i]->puntsSolucio(pSolucio,1.0); for(int j=0;j<=pSolucio.size()-1;j++){ verInferiorDreta.setX(qMax(pSolucio[j].x(), verInferi...
false
false
false
false
false
0
xm_envelope_calculate_value(IT_ENVELOPE *envelope, IT_PLAYING_ENVELOPE *pe) { if (pe->next_node <= 0) pe->value = envelope->node_y[0] << IT_ENVELOPE_SHIFT; else if (pe->next_node >= envelope->n_nodes) pe->value = envelope->node_y[envelope->n_nodes-1] << IT_ENVELOPE_SHIFT; else { int ys = envelope->node_y[pe->n...
false
false
false
false
false
0
addMAC(pMAC_t pMAC, unsigned char* mac) { pMAC_t cur = pMAC; if(mac == NULL) return -1; if(pMAC == NULL) return -1; while(cur->next != NULL) cur = cur->next; //alloc mem cur->next = (pMAC_t) malloc(sizeof(struct MAC_list)); cur = cur->next; //set mac memc...
false
true
false
false
false
1
glade_widget_get_pack_property (GladeWidget *widget, const gchar *id_property) { GladeProperty *property; g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL); g_return_val_if_fail (id_property != NULL, NULL); if (widget->pack_props_hash && (property = g_hash_table_lookup (widget->pack_props_hash, id_prope...
false
false
false
false
false
0
sky2_rx_start(struct sky2_port *sky2) { struct sky2_hw *hw = sky2->hw; struct rx_ring_info *re; unsigned rxq = rxqaddr[sky2->port]; unsigned i, size, thresh; sky2->rx_put = sky2->rx_next = 0; sky2_qset(hw, rxq); /* On PCI express lowering the watermark gives better performance */ if (pci_find_capability(hw->p...
false
false
false
false
false
0
cqueue_list_add_cqueue(lList *this_list, lListElem *queue) { bool ret = false; static lSortOrder *so = NULL; DENTER(TOP_LAYER, "cqueue_list_add_cqueue"); if (queue != NULL) { if (so == NULL) { so = lParseSortOrderVarArg(CQ_Type, "%I+", CQ_name); } lInsertSorted(so, queue, this_...
false
false
false
false
false
0
save_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); n = alloc_instruction(ctx, OPCODE_COPY_TEX_IMAGE1D, 7); if (n) { n[1].e = targ...
false
false
false
false
false
0
watcher_below_green(const tenm_object *my) { /* sanity check */ if (my == NULL) return 0; if ((my->count[2] == 1) && (my->count[4] >= 3) && (my->count[3] <= 4100)) return 1; if ((my->count[2] == 2) && (my->count[8] != 0)) return 1; return 0; }
false
false
false
false
false
0
dump_invalid_creds(const struct cred *cred, const char *label, const struct task_struct *tsk) { printk(KERN_ERR "CRED: %s credentials: %p %s%s%s\n", label, cred, cred == &init_cred ? "[init]" : "", cred == tsk->real_cred ? "[real]" : "", cred == tsk->cred ? "[eff]" : ""); pri...
false
false
false
false
false
0
fat32_fs_info_verbose_info(const struct fat32_fs_info_t *fs_info) { CHECK_NN( log_debug("FSInfo verbose info: ") ); CHECK_NN( log_debug("\tLead signature: %#" PRIx32, fs_info->lead_signature) ); CHECK_NN( log_debug("\tStruct signature: %#" PRIx32, fs_info->struct_signa...
false
false
false
false
false
0
soup_multipart_input_stream_constructed (GObject *object) { SoupMultipartInputStream *multipart; SoupMultipartInputStreamPrivate *priv; GInputStream *base_stream; const char* boundary; GHashTable *params = NULL; multipart = SOUP_MULTIPART_INPUT_STREAM (object); priv = multipart->priv; base_stream = G_FILTER_I...
false
false
false
false
false
0
get_expected_token(const string& raw) { TokenType p = peek_token().type; string s = peek_token().as_string(); if (s != raw) { string msg = "expected `" + raw + "'"; throw_syntax_error(p == kTokenNop ? msg : msg + " instead of `" + s + "'"); } ...
false
false
false
false
false
0
qp_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, u64 in_param) { int err; int count; int base; int qpn; switch (op) { case RES_OP_RESERVE: base = get_param_l(&in_param) & 0x7fffff; count = get_param_h(&in_param); err = rem_res_range(dev, slave, base, count, RES_QP, 0); if (err) b...
false
false
false
false
false
0
QRinput_encodeModeKanji(QRinput_List *entry, BitStream *bstream, int version, int mqr) { int ret, i; unsigned int val, h; if(mqr) { if(version < 2) { errno = EINVAL; return -1; } ret = BitStream_appendNum(bstream, version - 1, MQRSPEC_MODEID_KANJI); if(ret < 0) return -1; ret = BitStream_appendNum(b...
false
false
false
false
false
0
get_node_attribute_value(const xmlpp::Element* node, const Glib::ustring& strAttributeName) { if(node) { const xmlpp::Attribute* attribute = node->get_attribute(strAttributeName); if(attribute) { Glib::ustring value = attribute->get_value(); //Success. return value; } } return ""; /...
false
false
false
false
false
0
run_test_loop(struct options *opts) { parameters parms; int i; size_t buf_bytes; /* load options into parameter structure */ parms.num_files = opts->num_files; parms.num_dsets = opts->num_dsets; parms.num_iters = opts->num_iters; parms.rank = opts->dset_rank; parms.h5_align = op...
false
false
false
false
false
0
qlcnic_82xx_read_phys_port_id(struct qlcnic_adapter *adapter) { u8 mac[ETH_ALEN]; int ret; ret = qlcnic_get_mac_address(adapter, mac, adapter->ahw->physical_port); if (ret) return ret; memcpy(adapter->ahw->phys_port_id, mac, ETH_ALEN); adapter->flags |= QLCNIC_HAS_PHYS_PORT_ID; return 0; }
false
false
false
false
false
0
prefs_set_dialog_to_default(PrefParam *param) { gint i; PrefParam tmpparam; gchar *str_data = NULL; gint int_data; gushort ushort_data; gboolean bool_data; DummyEnum enum_data; for (i = 0; param[i].name != NULL; i++) { if (!param[i].widget_set_func) continue; tmpparam = param[i]; switch ...
false
false
false
false
false
0
xsh_spectrum_integrate(double* pif, double* piw, int i1_inf, int i1_sup, int i2_inf, int i2_sup, double wave, double wstep) { double sum1=0; double su...
false
false
false
false
false
0
sendquery(isc_task_t *task, isc_event_t *event) { struct in_addr inaddr; isc_sockaddr_t address; isc_region_t r; isc_result_t result; dns_fixedname_t keyname; dns_fixedname_t ownername; isc_buffer_t namestr, keybuf; unsigned char keydata[9]; dns_message_t *query; dns_request_t *request; static char keystr[] ...
true
true
false
false
false
1
tcp_checksum(uint16_t *data, size_t n, struct iphdr *ip) { uint32_t sum = uint16_checksum(data, n); uint16_t sum2; sum += uint16_checksum((uint16_t *)(void *)&ip->saddr, sizeof(ip->saddr)); sum += uint16_checksum((uint16_t *)(void *)&ip->daddr, sizeof(ip->daddr)); sum += ip->protocol + n; sum = (sum & 0xF...
false
false
false
false
false
0
p7_hmm_CreateBody(P7_HMM *hmm, int M, const ESL_ALPHABET *abc) { int k; int status; hmm->abc = abc; hmm->M = M; /* level 1 */ ESL_ALLOC(hmm->t, (M+1) * sizeof(float *)); ESL_ALLOC(hmm->mat, (M+1) * sizeof(float *)); ESL_ALLOC(hmm->ins, (M+1) * sizeof(float *)); hmm->t[0] = NULL; hmm->mat...
false
true
false
false
false
1
process_aliases(World *world, const char *cmdline, int start, int end) { char cmd[MAX_BUFFER + 1]; int len = end - start; char *result; if (len >= MAX_BUFFER) { ansitextview_append_string_nl(world->gui, _("Warning: Trying to send a very long command line. Perhaps a recu...
true
true
false
false
false
1
iwl_drv_stop(struct iwl_drv *drv) { wait_for_completion(&drv->request_firmware_complete); _iwl_op_mode_stop(drv); iwl_dealloc_ucode(drv); mutex_lock(&iwlwifi_opmode_table_mtx); /* * List is empty (this item wasn't added) * when firmware loading failed -- in that * case we can't remove it from any list. ...
false
false
false
false
false
0
netsnmp_arch_ipaddress_container_load(netsnmp_container *container, u_int load_flags) { int rc = 0, idx_offset = 0; if (0 == (load_flags & NETSNMP_ACCESS_IPADDRESS_LOAD_IPV6_ONLY)) { rc = _netsnmp_ioctl_ipaddress_container_load_v4(container, idx_offset); if...
false
false
false
false
false
0
netcgi2_apache_table_get_all(value tv, value str) { CAMLparam2(tv, str); CAMLlocal1(res); /* list */ table *t = Table_val(tv); char *key = String_val(str); res = Val_int(0); /* empty list [] */ /* Only iterates over values associated with [key]. */ apr_table_do(&netcgi2_apache_table_get_loop, &res, t, ke...
false
false
false
false
false
0
ossl_ec_key_set_group(VALUE self, VALUE group_v) { VALUE old_group_v; EC_KEY *ec; EC_GROUP *group; Require_EC_KEY(self, ec); SafeRequire_EC_GROUP(group_v, group); old_group_v = rb_iv_get(self, "@group"); if (!NIL_P(old_group_v)) { ossl_ec_group *old_ec_group; SafeGet_ec_gro...
false
false
false
false
false
0
select_container (MonoGenericContainer *gc, MonoTypeEnum type) { gboolean is_var = (type == MONO_TYPE_VAR); if (!gc) return NULL; g_assert (is_var || type == MONO_TYPE_MVAR); if (is_var) { if (gc->is_method || gc->parent) /* * The current MonoGenericContainer is a generic method -> its `parent' * p...
false
false
false
false
false
0
Clear() { m_pText->Clear(); m_LastRowStartingAddress = 0; m_ByteCounter = 0; for (int i = 0; i < 67; ++i) m_LineText[i] = _T(' '); }
false
false
false
false
false
0
_e_fileman_dbus_daemon_open_directory_cb(E_DBus_Object *obj __UNUSED__, DBusMessage *message) { DBusMessageIter itr; const char *directory = NULL, *p; char *dev, *to_free = NULL; E_Zone *zone; dbus_message_iter_init(message, &itr); dbus_message_iter_get_...
false
false
false
false
false
0
gtkpod_get_registered_track_commands() { g_return_val_if_fail(GTKPOD_IS_APP(gtkpod_app), NULL); GtkPodAppInterface *gp_iface = GTKPOD_APP_GET_INTERFACE (gtkpod_app); return g_list_copy(gp_iface->track_commands); }
false
false
false
false
false
0
send_dtmf(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) { char dtmfstr[80], *a; int bytes = 0; if (!(a = get_token(&args, script, lineno))) { ast_log(LOG_WARNING, "Expecting something to send for SENDDTMF at line %d of %s\n", lineno, script); return 0; } ...
true
true
false
false
false
1
sge_ls_stop_ls(lListElem *this_ls, int send_no_quit_command) { int ret, exit_status; struct timeval t; DENTER(TOP_LAYER, "sge_ls_stop_ls"); if (sge_ls_get_pid(this_ls) == -1) { DRETURN_VOID; } if (!send_no_quit_command) { ls_send_command(this_ls, "quit\n"); ret = sge_ls_status(thi...
false
false
false
false
false
0
bfa_fcpim_get_throttle_cfg(struct bfa_s *bfa, u16 drv_cfg_param) { u16 tmp; struct bfa_fcp_mod_s *fcp = BFA_FCP_MOD(bfa); /* * If throttle value from flash is already in effect after driver is * loaded then until next load, always return current value instead * of actual flash value */ if (!fcp->throttle_u...
false
false
false
false
false
0
gmm_calc_mix(GMMCalc *gc, HTK_HMM_State *state) { int i; LOGPROB logprob, logprobsum; int s; PROB stream_weight; /* compute Gaussian set */ logprobsum = 0.0; for(s=0;s<gc->OP_nstream;s++) { /* set stream weight */ if (state->w) stream_weight = state->w->weight[s]; else stream_weight = 1.0; ...
false
false
false
false
false
0
check(const QString &checkFilename, const QString &exe, const QByteArray &catalogs) { const QString pwd_buffer = QDir::currentPath(); const QFileInfo file( checkFilename ); setenv( "XML_CATALOG_FILES", catalogs.constData(), 1 ); if ( QFileInfo( exe ).isExecutable() ) { QDir::setCurrent( file.ab...
false
false
false
false
false
0
PKIX_CertSelector_Create( PKIX_CertSelector_MatchCallback callback, PKIX_PL_Object *certSelectorContext, PKIX_CertSelector **pSelector, void *plContext) { PKIX_CertSelector *selector = NULL; PKIX_ENTER(CERTSELECTOR, "PKIX_CertSelector_Create"); PKIX_NULLCHECK_ONE...
false
false
false
false
false
0
alloc_mem(size_t siz, CVmObject *) { CVmVarHeapHybrid_head **subheap; size_t i; /* scan for a cell-based subheap that can handle the request */ for (i = 0, subheap = cell_heaps_ ; i < cell_heap_cnt_ ; ++i, ++subheap) { /* * If it will fit in this one's cell size, al...
false
false
false
false
false
0
max_min(argvars, rettv, domax) typval_T *argvars; typval_T *rettv; int domax; { long n = 0; long i; int error = FALSE; if (argvars[0].v_type == VAR_LIST) { list_T *l; listitem_T *li; l = argvars[0].vval.v_list; if (l != NULL) { li = l->lv_first; if (li != NULL) {...
false
false
false
false
false
0
rawgraph_parse(gchar *buffer, RawGraphArgs *args, GError **error) { GwyGraphModel *gmodel; GwyGraphCurveModel *gcmodel; GArray *data = NULL; guint i, ncols = 0; gchar *line, *end; for (line = gwy_str_next_line(&buffer); line; line = gwy_str_next_l...
false
false
false
false
false
0
_sock_buffer_maximize(int s, int optname, const char *buftype, int size) { int curbuf = 0; socklen_t curbuflen = sizeof(int); int lo, mid, hi; /* * First we need to determine our current buffer */ if ((getsockopt(s, SOL_SOCKET, optname, (void *) &curbuf, ...
false
false
false
false
false
0
missing_tail (const double *x, int n) { int i, nmiss = 0; for (i=n-1; i>=0; i--) { if (na(x[i])) { nmiss++; } else { break; } } return nmiss; }
false
false
false
false
false
0
test_config_rename__prevent_overwrite(void) { const git_config_entry *ce; cl_git_pass(git_config_set_string( g_config, "branch.local-track.remote", "yellow")); cl_git_pass(git_config_get_entry( &ce, g_config, "branch.local-track.remote")); cl_assert_equal_s("yellow", ce->value); cl_git_pass(git_config_renam...
false
false
false
false
false
0
IsEndpointStart(const std::string &line, int &endpoint) { if( strncmp(line.c_str(), "sep: ", 5) == 0 || strncmp(line.c_str(), "rep: ", 5) == 0 ) { endpoint = atoi(line.c_str() + 5); return true; } return false; }
false
false
false
false
false
0
e1000_check_fiber_options(struct e1000_adapter *adapter) { int bd = adapter->bd_number; if (num_Speed > bd) { e_dev_info("Speed not valid for fiber adapters, parameter " "ignored\n"); } if (num_Duplex > bd) { e_dev_info("Duplex not valid for fiber adapters, parameter " "ignored\n"); } if ((num_A...
false
false
false
false
false
0
diplomat_sabotage_callback(struct widget *pWidget) { if (Main.event.button.button == SDL_BUTTON_LEFT) { if (NULL != game_unit_by_number(pDiplomat_Dlg->diplomat_id) && NULL != game_city_by_number(pDiplomat_Dlg->diplomat_target_id)) { request_diplomat_action(DIPLOMAT_SABOTAGE, pDiplomat_Dlg->diplomat_...
false
false
false
false
false
0
makeabs(const char *basepath) { int namelen; char *ret; if(!(ret = malloc(PATH_MAX + 1))) { logg("^Can't make room for fullpath.\n"); return NULL; } if(!cli_is_abspath(basepath)) { if(!getcwd(ret, PATH_MAX)) { logg("^Can't get absolute pathname of current working directory.\n"); free(r...
false
false
false
false
false
0
squaretrans_pow2(mpd_uint_t *matrix, mpd_size_t size) { mpd_uint_t buf1[SIDE*SIDE]; mpd_uint_t buf2[SIDE*SIDE]; mpd_uint_t *to, *from; mpd_size_t b = size; mpd_size_t r, c; mpd_size_t i; while (b > SIDE) b >>= 1; for (r = 0; r < size; r += b) { for (c = r; c < size; c += b) { ...
false
true
false
false
false
1
addLine() { int line_no = getNbLines() + 1; GLESourceLine* line = new GLESourceLine(); line->setLineNo(line_no); line->setSource(this); m_Code.push_back(line); return line; }
false
false
false
false
false
0
sqliteBeginTransaction(Parse *pParse, int onError){ sqlite *db; if( pParse==0 || (db=pParse->db)==0 || db->aDb[0].pBt==0 ) return; if( pParse->nErr || sqlite_malloc_failed ) return; if( sqliteAuthCheck(pParse, SQLITE_TRANSACTION, "BEGIN", 0, 0) ) return; if( db->flags & SQLITE_InTrans ){ sqliteErrorMsg(p...
false
false
false
false
false
0
find_first_and_last(const unsigned char *line, int length, int *first, int *last) { int i; int found_first = 0; if (!first || !last) return; *first = 0; *last = 0; for (i = 0; i < length; i++) { if (line[i] == 0) { if (!found_first) (*first)++; } else { *last = i; ...
false
false
false
false
false
0
DSDPIndexView(DSDPIndex IS){ int i; DSDPFunctionBegin; printf("Index Set with %d indices.\n",IS.indx[0]); for (i=0;i<IS.indx[0];i++){ printf(" %d",IS.indx[i+1]); } printf(" \n"); DSDPFunctionReturn(0); }
false
false
false
false
false
0
chksuser(uid,gid,hostname,ptrcode,permstr) int uid; /* uid of caller */ int gid; /* gid of caller */ char *hostname ; /* caller's host name */ int *ptrcode ; /* Return code */ char *permstr; /* permission string for the request */ { int found = 0 ; char *cp , *p; char hostname1[MAXHOSTNAMELEN]; int l;...
false
false
false
false
false
0
nemo_column_new (const char *name, const char *attribute, const char *label, const char *description) { NemoColumn *column; g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (attribute != NULL, NULL); g_return_val_if_fail (label != NULL, NULL); g_return_val_if_fail (description ...
false
false
false
false
false
0
resetContext(int width, int height) { // ### FIXME FIXME: use khtmlImLoad's limit policy // for physical canvas and transform painter to match logical resolution if (workPainter.isActive()) workPainter.end(); if (canvasImage) canvasImage->resizeImage(width, height); else can...
false
false
false
false
false
0
AddVisualScene() { FCDSceneNode* visualScene = visualSceneLibrary->AddEntity(); if (visualSceneRoot->GetEntity() == NULL) visualSceneRoot->SetEntity(visualScene); return visualScene; }
false
false
false
false
false
0
PLDataCreate() { PLData *PL = OOGLNewE(PLData, "PLData"); if(toPLsel == 0) initmethods(); PL->maxdim = 0; PL->some = 0; PL->all = PL_HASVC|PL_HASPC|PL_HASVN; VVINIT(PL->faces, Face, 1000); vvzero(&PL->faces); VVINIT(PL->verts, Vert, 1000); vvzero(&PL->faces); VVINIT(PL->vtable, int, 4000); PL->...
false
false
false
false
false
0
ssl_sock_infocbk(const SSL *ssl, int where, int ret) { struct connection *conn = (struct connection *)SSL_get_app_data(ssl); (void)ret; /* shut gcc stupid warning */ BIO *write_bio; if (where & SSL_CB_HANDSHAKE_START) { /* Disable renegotiation (CVE-2009-3555) */ if (conn->flags & CO_FL_CONNECTED) { conn->f...
false
false
false
false
false
0
sdmmc_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios) { struct rtsx_usb_sdmmc *host = mmc_priv(mmc); struct rtsx_ucr *ucr = host->ucr; int err = 0; dev_dbg(sdmmc_dev(host), "%s: signal_voltage = %d\n", __func__, ios->signal_voltage); if (host->host_removal) return -ENOMEDIUM; if (ios->signal_vol...
false
false
false
false
false
0
init_status_reason(void) { int i; for(i = 0; i < 600; i++) { status_reason[i] = "(Unknown)"; page_text[i] = NULL; } status_reason[100] = "Continue"; status_reason[101] = "Switching Protocols"; status_reason[200] = "OK"; status_reason[201] = "Created"; status_reason[202] = "Accepted"; status...
false
false
false
false
false
0
_delete_records (ipmi_sel_state_data_t *state_data) { struct ipmi_sel_arguments *args; unsigned int i; assert (state_data); args = state_data->prog_data->args; for (i = 0; i < args->delete_record_list_length; i++) { if (_delete_entry (state_data, args->delete_record_list[...
false
false
false
false
false
0
addEvidParams(qs,v) /* overwrite VARID/OPCELL v with */ List qs; /* application of variable to evid. */ Cell v; { /* parameters given by qs */ if (nonNull(qs)) { Cell nv; if (!isVar(v)) internal("addEvidParams"); for (nv=mkVar(textOf(v)); nonNull(tl(qs)); qs=tl(qs)) nv = ap(n...
false
false
false
false
false
0
awe_match_preset(SFPatchRec *rec, SFPatchRec *pat) { if (rec->preset != -1 && pat->preset != -1 && rec->preset != pat->preset) return FALSE; if (rec->bank != -1 && pat->bank != -1 && rec->bank != pat->bank) return FALSE; if (rec->keynote != -1 && pat->keynote != -1 && rec->keynote != pat->keynote)...
false
false
false
false
false
0
probe_by_scheme (ProbeState * state) { const char * s = strstr (state->filename, "://"); if (s == NULL) return; AUDDBG ("Probing by scheme.\n"); char buf[s - state->filename + 1]; memcpy (buf, state->filename, s - state->filename); buf[s - state->filename] = 0; input_plugin_for_ke...
true
true
false
false
false
1
de_set_rx_mode (struct net_device *dev) { unsigned long flags; struct de_private *de = netdev_priv(dev); spin_lock_irqsave (&de->lock, flags); __de_set_rx_mode(dev); spin_unlock_irqrestore (&de->lock, flags); }
false
false
false
false
false
0
pdfwrite_pdf_open_document(gx_device_pdf * pdev) { if (!is_in_page(pdev) && pdf_stell(pdev) == 0) { stream *s = pdev->strm; int level = (int)(pdev->CompatibilityLevel * 10 + 0.5); pdev->binary_ok = !pdev->params.ASCII85EncodePages; if (pdev->ForOPDFRead) { int code, stat...
false
false
false
false
false
0
traverse(void*top){ /*22:*/ #line 472 "./critbit.w" uint8*p= top; if(1&(intptr_t)p){ critbit0_node*q= (void*)(p-1); traverse(q->child[0]); traverse(q->child[1]); free(q); }else{ free(p); } /*:22*/ #line 457 "./critbit.w" }
false
false
false
false
false
0
_pager_window_cb_drag_finished(E_Drag *drag, int dropped) { Pager_Win *pw; E_Container *cont; E_Zone *zone; E_Desk *desk; int x, y, dx, dy; pw = drag->data; if (!pw) return; evas_object_show(pw->o_window); if (!dropped) { int zx, zy, zw, zh; /* wasn't dropped (on pager)...
false
false
false
false
false
0
FLAC__stream_encoder_get_resolved_state_string(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__ASSERT(0 != encoder->protected_); if(encoder->protected_->state != FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR) return FLAC__StreamEncoderStateString[encoder->...
false
false
false
false
false
0
ast_say_datetime_from_now_en(struct ast_channel *chan, time_t t, const char *ints, const char *lang) { int res=0; struct timeval nowtv = ast_tvnow(), when = { t, 0 }; int daydiff; struct ast_tm tm; struct ast_tm now; char fn[256]; ast_localtime(&when, &tm, NULL); ast_localtime(&nowtv, &now, NULL); daydiff = n...
true
true
false
false
false
1
getExternalStorageFileAbsolutePath(std::string &out_path) const { ASSERT_(m_externalFile.size()>2); if (m_externalFile[0]=='/' || ( m_externalFile[1]==':' && m_externalFile[2]=='\\' ) ) { out_path= m_externalFile; } else { out_path = IMAGES_PATH_BASE; size_t N=IMAGES_PATH_BASE.size()-1; if (IMAGES_PATH_...
false
false
false
false
false
0
movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) { // If there is no relocation info, emit the value of the handle efficiently // (possibly using less that 8 bytes for the value). if (mode == RelocInfo::NONE) { // There is no possible reason to store a heap pointer without relocation // info...
false
false
false
false
false
0
rt61pci_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant) { const struct antenna_sel *sel; unsigned int lna; unsigned int i; u32 reg; /* * We should never come here because rt2x00lib is supposed * to catch this and send us the correct antenna explicitely. */ BUG_ON(ant->rx == AN...
false
false
false
false
false
0
ios_fd(ios_t *s, long fd, int isfile, int own) { _ios_init(s); s->fd = fd; if (isfile) s->rereadable = 1; _buf_init(s, bm_block); s->ownfd = own; if (fd == STDERR_FILENO) s->bm = bm_none; return s; }
false
false
false
false
false
0
find_unaggregated_cols_walker(Node *node, Bitmapset **colnos) { if (node == NULL) return false; if (IsA(node, Var)) { Var *var = (Var *) node; /* setrefs.c should have set the varno to OUTER_VAR */ Assert(var->varno == OUTER_VAR); Assert(var->varlevelsup == 0); *colnos = bms_add_member(*colnos, var-...
false
false
false
false
false
0
findRandomFreeSector() { foreach (const QList<Sector> &i, m_grid) { foreach (const Sector &j, i) { if (!j.hasPlanet()) { goto freesectorexists; } } } return NULL; freesectorexists: Coordinate c; do { c = Game::generatePlanetCoordin...
false
false
false
false
false
0
bsc_skip_to(Scorer *self, int doc_num) { Scorer *cnt_sum_sc = BSc(self)->counting_sum_scorer; if (!BSc(self)->counting_sum_scorer) { cnt_sum_sc = bsc_init_counting_sum_scorer(BSc(self)); } if (cnt_sum_sc->skip_to(cnt_sum_sc, doc_num)) { self->doc = cnt_sum_sc->doc; return true; ...
false
false
false
false
false
0
nonmodal_keypress_cb ( GtkWidget * /*wid*/, GdkEventKey * event, XAP_Dialog * pDlg ) { // propegate keypress up if not F1 if ( event->keyval == GDK_KEY_F1 || event->keyval == GDK_KEY_Help ) { sDoHelp( pDlg ) ; return TRUE ; } return FALSE ; }
false
false
false
false
false
0
select_dlg_create( SDL_Surface *lbox_frame, SDL_Surface *lbox_buttons, int lbox_button_w, int lbox_button_h, int lbox_cell_count, int lbox_cell_w, int lbox_cell_h, void (*lbox_render_cb)(void*, SDL_Surface*), SDL_Surface *conf_frame, SDL_Surface *conf_buttons, int conf_button_w, int conf_button_h, int id_ok, ...
false
false
false
false
false
0
gwy_brick_multiply(GwyBrick *brick, gdouble value) { gint i; g_return_if_fail(GWY_IS_BRICK(brick)); for (i = 0; i < (brick->xres*brick->yres*brick->zres); i++) brick->data[i] *= value; }
false
false
false
false
false
0
dup_NC_attr(const NC_attr *rattrp) { NC_attr *attrp = new_NC_attr(rattrp->name->cp, rattrp->type, rattrp->nelems); if(attrp == NULL) return NULL; (void) memcpy(attrp->xvalue, rattrp->xvalue, rattrp->xsz); return attrp; }
false
false
false
false
false
0
mxf_primer_pack_reset (MXFPrimerPack * pack) { g_return_if_fail (pack != NULL); if (pack->mappings) g_hash_table_destroy (pack->mappings); if (pack->reverse_mappings) g_hash_table_destroy (pack->reverse_mappings); memset (pack, 0, sizeof (MXFPrimerPack)); pack->next_free_tag = 0x8000; }
false
false
false
false
false
0
table_primary_key(DB_DATABASE *db, char *table, char ***primary) { #ifdef ODBC_DEBUG_HEADER fprintf(stderr,"[ODBC][%s][%d]\n",__FILE__,__LINE__); fprintf(stderr,"\ttable_primary_key\n"); fflush(stderr); #endif SQLHSTMT statHandle; SQLRETURN retcode; //SQLRETURN V_OD_erg; SQLRETURN nReturn = -1; SQLCHAR szKeyName[1...
false
true
false
false
false
1
set_packet_list_mode( int mode ) { int old = list_mode; list_mode = mode; mpi_print_mode = DBG_MPI; /* We use stdout print only if invoked by the --list-packets command but switch to stderr in all otehr cases. This breaks the previous behaviour but that seems to be more of a bug than ...
false
false
false
false
false
0
release_card(struct l1oip *hc) { int ch; if (timer_pending(&hc->keep_tl)) del_timer(&hc->keep_tl); if (timer_pending(&hc->timeout_tl)) del_timer(&hc->timeout_tl); cancel_work_sync(&hc->workq); if (hc->socket_thread) l1oip_socket_close(hc); if (hc->registered && hc->chan[hc->d_idx].dch) mISDN_unregist...
false
false
false
false
false
0
execute(Environment &env, const Arguments &args) const { calc::Lexer *l = env.getReadLexer(); if (!l) { return 0; } yy::Parser::semantic_type value; yy::location location; bool minus = false; for(;;) { int token = l->nextToken(value, location); switch (token) { case yy::Parser::token::NUMBER: return m...
false
false
false
false
false
0