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
wl3501_reset(struct net_device *dev) { struct wl3501_card *this = netdev_priv(dev); int rc = -ENODEV; wl3501_block_interrupt(this); if (wl3501_init_firmware(this)) { printk(KERN_WARNING "%s: Can't initialize Firmware!\n", dev->name); /* Free IRQ, and mark IRQ as unused */ free_irq(dev->irq, dev); ...
false
false
false
false
false
0
poldiff_type_remap_entry_create(poldiff_t * diff) { poldiff_type_remap_entry_t *e = NULL; if ((e = calloc(1, sizeof(*e))) == NULL || (e->orig_types = apol_vector_create_with_capacity(1, free)) == NULL || (e->mod_types = apol_vector_create_with_capacity(1, free)) == NULL || apol_vector_append(diff->type_map-...
false
false
false
false
false
0
search_gui_clear_queue(search_t *search) { struct result_data *rd; while (NULL != (rd = slist_shift(search->queue))) { result_data_free(search, rd); } }
false
false
false
false
false
0
proplist(const Path & path, const Revision & revision, bool recurse) { Pool pool; apr_array_header_t * props; svn_error_t * error = svn_client_proplist(&props, path.c_str(), revision.revision(), ...
false
false
false
false
false
0
bn_subtractmod(const bignum256 *a, const bignum256 *b, bignum256 *res, const bignum256 *prime) { int i; uint32_t temp = 0; for (i = 0; i < 9; i++) { temp += a->val[i] + 2u * prime->val[i] - b->val[i]; res->val[i] = temp & 0x3FFFFFFF; temp >>= 30; } }
false
false
false
false
false
0
setDialFailures(int v) { checkChanged(dialFailures, v); }
false
false
false
false
false
0
esl_scorematrix_SetFromProbs(ESL_SCOREMATRIX *S, double lambda, const ESL_DMATRIX *P, const double *fi, const double *fj) { int i,j; double sc; for (i = 0; i < S->abc_r->K; i++) for (j = 0; j < S->abc_r->K; j++) { sc = log(P->mx[i][j] / (fi[i] * fj[j])) / lambda; S->s[i][j] = (int) (sc + (sc>0 ?...
false
true
false
false
false
1
initmaclangs(void) { static int inited = false; int i; if ( !inited ) { inited = true; for ( i=0; maclanguages[i].text!=NULL; ++i ) maclanguages[i].text = (unichar_t *) S_( (char *) maclanguages[i].text); } }
false
false
false
false
false
0
__TeaCrypt(uint32_t *block, uint32_t len, uint32_t *key) { uint32_t z = block[len - 1], y = block[0], sum = 0, e, DELTA = 0x9e3779b9; int32_t p, q; q = 6 + 52 / len; while (q-- > 0) { sum += DELTA; e = (sum >> 2) & 3; for (p = 0; p < len - 1; p++) { y = block[p + 1]; ...
false
false
false
false
false
0
initialize(uint32_t * const array, size_t const len) { uint32_t i; for (i = 0; i < len; i += 1) { array[i] = i; } }
false
false
false
false
false
0
gee_hazard_pointer_node_get_next (GeeHazardPointerNode* self) { GeeHazardPointerNode* result = NULL; void* _tmp0_ = NULL; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = g_atomic_pointer_get ((volatile gpointer *) (&self->_next)); result = (GeeHazardPointerNode*) _tmp0_; return result; }
false
false
false
false
false
0
oid_rt_pro_reset_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv) { struct _adapter *Adapter = (struct _adapter *) (poid_par_priv->adapter_context); if (poid_par_priv->type_of_oid != SET_OID) return RNDIS_STATUS_NOT_ACCEPTED; Adapter->mppriv.tx_pktcount = 0; return RNDIS_STATUS_SUCCESS; }
false
false
false
false
false
0
r_attached_pronoun(struct SN_env * z) { int among_var; z->ket = z->c; /* [, line 87 */ if (!(find_among_b(z, a_2, 37))) return 0; /* substring, line 87 */ z->bra = z->c; /* ], line 87 */ among_var = find_among_b(z, a_3, 5); /* among, line 97 */ if (!(among_var)) return 0; { int ret = r_RV(z)...
false
false
false
false
false
0
profilesDir() { QString profiles_dir(homeDir() + "/profiles"); QDir d(profiles_dir); if(!d.exists()) { QDir d(homeDir()); d.mkdir("profiles"); } return profiles_dir; }
false
false
false
false
false
0
__i2400m_dev_reset_handle(struct work_struct *ws) { struct i2400m *i2400m = container_of(ws, struct i2400m, reset_ws); const char *reason = i2400m->reset_reason; struct device *dev = i2400m_dev(i2400m); struct i2400m_reset_ctx *ctx = i2400m->reset_ctx; int result; d_fnstart(3, dev, "(ws %p i2400m %p reason %s)\n...
false
false
false
false
false
0
file_set_load_from_crc_file(file_set *set, file_t* file) { FILE *fd; int line_num; char buf[2048]; hash_check hc; if ( !(fd = rsh_fopen_bin(file->path, "rb") )) { /* if file not exist, it will be created */ return (errno == ENOENT ? 0 : -1); } for (line_num = 0; fgets(buf, 2048, fd); line_num++) { char* l...
true
true
false
false
false
1
brasero_track_disc_get_size (BraseroTrack *track, goffset *blocks, goffset *block_size) { BraseroMedium *medium; goffset medium_size = 0; goffset medium_blocks = 0; BraseroTrackDiscPrivate *priv; priv = BRASERO_TRACK_DISC_PRIVATE (track); medium = brasero_drive_get_medium (priv->drive); if (!med...
false
false
false
false
false
0
NE_addr_to_segment(ht_ne_shared_data *NE_shared, NEAddress Addr, int *segment) { for (uint i = 0; i < NE_shared->segments.segment_count; i++) { NEAddress base = NE_get_seg_addr(NE_shared, i); uint evsize = MAX(NE_get_seg_vsize(NE_shared, i), NE_get_seg_psize(NE_shared, i)); if ((Addr >= base) && (Addr < base + e...
false
false
false
false
false
0
metadata_get_list(mpd_Song *song, MetaDataType type, void (*callback)(gpointer handle,const gchar *plugin_name, GList *list, gpointer data), gpointer data) { MLQuery *q = g_malloc0(sizeof(*q)); q->cancel =FALSE; q->index = 0; q->callback = callback; q->userdata = data; q->type = type; q->calls =1; /** * Crea...
false
false
false
false
false
0
__krealloc(const void *p, size_t new_size, gfp_t flags) { if (unlikely(!new_size)) return ZERO_SIZE_PTR; return __do_krealloc(p, new_size, flags); }
false
false
false
false
false
0
gst_rtcp_packet_move_to_next (GstRTCPPacket * packet) { g_return_val_if_fail (packet != NULL, FALSE); g_return_val_if_fail (packet->type != GST_RTCP_TYPE_INVALID, FALSE); g_return_val_if_fail (GST_IS_BUFFER (packet->buffer), FALSE); /* if we have a padding or invalid packet, it must be the last, * return F...
false
false
false
false
false
0
GetSystemAddressFromIndex( unsigned int index ) { // remoteSystemList in user thread //if ( index >= 0 && index < remoteSystemListSize ) if ( index < maximumNumberOfPeers ) if (remoteSystemList[index].isActive && remoteSystemList[ index ].connectMode==RakPeer::RemoteSystemStruct::CONNECTED) // Don't give the ...
false
false
false
false
false
0
function_attribute_inlinable_p (const_tree fndecl) { if (targetm.attribute_table) { const_tree a; for (a = DECL_ATTRIBUTES (fndecl); a; a = TREE_CHAIN (a)) { const_tree name = TREE_PURPOSE (a); int i; for (i = 0; targetm.attribute_table[i].name != NULL; i++) if (is_attribute_p (target...
false
false
false
false
false
0
geometry(const MSIndexVector& geometry_) { if (_geometry==0) _geometry=new MSIndexVector(geometry_); else *_geometry=geometry_; if (setPositions()==MSTrue) adjustSize(); }
false
false
false
false
false
0
local_getcwd (gftp_request * request) { #ifdef __GNU__ char *tempstr; #else char tempstr[PATH_MAX]; #endif char *utf8; size_t destlen; if (request->directory != NULL) g_free (request->directory); #ifdef __GNU__ tempstr = get_current_dir_name(); if (tempstr == NULL) #else if (getcwd (tempstr, siz...
true
true
false
false
false
1
createAndOpenFile(const io::path& filename) { s32 index = findFile(filename, false); if (index != -1) return createAndOpenFile(index); else return 0; }
false
false
false
false
false
0
M_ReadSaveStrings(void) { FILE *handle; int i; char name[256]; for (i = 0;i < load_end;i++) { strcpy(name, P_SaveGameFile(i)); handle = fopen(name, "rb"); if (handle == NULL) { strcpy(&savegamestrings[i][0], EMPTYSTRING); LoadMenu[i].status = 0; continue; } fre...
true
true
false
false
true
1
listener_cb(struct evconnlistener *listener, evutil_socket_t socket, struct sockaddr *sockaddr, int socklen, void *userdata) { DEBUG("New connection."); ad_server_t *server = (ad_server_t *)userdata; // Create a new buffer. struct bufferevent *buffer = NULL; if (server->sslc...
false
false
false
false
false
0
string_get(void *data) { char c; string_data_t *stream = (string_data_t *)data; c = stream->data[stream->pos]; if(c == '\0') return EOF; else { stream->pos++; return (unsigned char)c; } }
false
false
false
false
false
0
FindTree( Obj tree, Int indexx ) { UInt i; /* loop variable */ /* return 0 if (<tree>, indexx) is marked */ if ( DT_IS_MARKED(tree, indexx) ) return 0; i = indexx; /* loop over al...
false
false
false
false
false
0
update_dirty_limit(struct dirty_throttle_control *dtc) { struct wb_domain *dom = dtc_dom(dtc); unsigned long thresh = dtc->thresh; unsigned long limit = dom->dirty_limit; /* * Follow up in one step. */ if (limit < thresh) { limit = thresh; goto update; } /* * Follow down slowly. Use the higher one as...
false
false
false
false
false
0
reportErr(const std::list<const Token *> &callstack, Severity::SeverityType severity, const std::string &id, const std::string &msg) const { std::list<ErrorLogger::ErrorMessage::FileLocation> locations; for (std::list<const Token *>::const_iterator it = callstack.begin(); it != callstack.end(); ++it) { ...
false
false
false
false
false
0
randomSample(vector<double const *> const &par, double const *lower, double const *upper, RNG *rng) const { double mu = MU(par); double sigma = SIGMA(par); if (lower && upper) { double left = (*lower - mu)/sigma; double right = (*upper - mu)/sigma; return mu + sigma * inormal(left, right...
false
false
false
false
false
0
qmail_users_reinit(void) { struct stat s; /* If we can see the users CDB file... */ if (stat(users_path.s, &s) != -1) { /* If it was either not open or has changed since the last open... */ if (users_fd == -1 || s.st_ino != users_stat.st_ino || s.st_mtime != users_stat.st_mtime || s.st_size != users_st...
false
false
false
false
true
1
EventFactoryBase_static_createSchedulerRunEvent(JNIEnv *env , jlong p0 , jint p1 , jobject* result, lList **alpp) { jgdi_result_t ret = JGDI_SUCCESS; static jmethodID mid = NULL; static jclass clazz = NULL; jobject temp = NULL; DENTER(BASIS_LAYER, "EventFactoryBase_static_createSchedulerRunEvent"); ...
false
false
false
false
false
0
siena_set_wol(struct efx_nic *efx, u32 type) { struct siena_nic_data *nic_data = efx->nic_data; int rc; if (type & ~WAKE_MAGIC) return -EINVAL; if (type & WAKE_MAGIC) { if (nic_data->wol_filter_id != -1) efx_mcdi_wol_filter_remove(efx, nic_data->wol_filter_id); rc = efx_mcdi_wol_filter_set_magic...
false
false
false
false
false
0
__eval_tranif_ld(register struct gate_t *gp, register int32 i) { int32 out_chg; /* DBG remove */ if (i != 2) __arg_terr(__FILE__, __LINE__); /* --- */ /* third in chged - schedule (if needed) conducting state chg */ /* must always go through scheduling code for spike analysis */ eval_tranif_onoff(gp); /* out_c...
false
false
false
false
false
0
cache_test_print(G3D_cache * c) { int i, al; int *a; al = c->autoLock; G3d_cache_autolock_off(c); printf("\n--------------------------------\n"); for (i = 0; i < c->nofElts; i++) { printf("elt %d: ", i); if (IS_NOT_ACTIVE_ELT(i)) { printf("na\n"); continue; } a = (int *)G3d_cach...
false
false
false
false
false
0
AdjustGenes(int MeanCenter, int MedianCenter, int Normalize) { int row, column; for (row = 0; row < _rows; row++) { /* Center genes */ if (MeanCenter || MedianCenter) { int counter = 0; double* temp = malloc(_columns*sizeof(double)); if (!temp) return 0; for (column = 0; column < _columns;...
false
true
false
false
true
1
widget_info_destroy (gpointer data) { WidgetInfo *info = data; GSList *iter; g_message ("%s: NM Bluetooth widget info being destroyed", __func__); g_signal_handlers_disconnect_matched (info->btclient, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NU...
false
false
false
false
false
0
chess_game_get_current_state (ChessGame* self) { ChessState* result; GList* _tmp0_; gconstpointer _tmp1_; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = self->move_stack; _tmp1_ = _tmp0_->data; result = (ChessState*) _tmp1_; return result; }
false
false
false
false
false
0
Destroy(Widget gw) { MenuWidget w = (MenuWidget)gw; int i; for (i = 0 ; i < w->menu.num_children ; i++) XtDestroyWidget((Widget)w->menu.children[i]); }
false
false
false
false
false
0
main(){ GameServer bj; bj.addGame("ultimate blackjack", 2); bj.join(0, "stranger"); bj.join(0, "diana"); bj.startGame(0); //bj.begin(); // Game poker = new Game("texas holdem"); this is illegal coz of the pure virtual keyword return 0; //what does this signify ? }
false
false
false
false
false
0
q_create(size_t size) { Query *self = (Query *)ecalloc(size); #ifdef DEBUG if (size < sizeof(Query)) { RAISE(FERRET_ERROR, "Size of a query <%d> should never be smaller than the " "size of a Query struct <%d>", (int)size, (int)sizeof(Query)); } #endif self->boost = 1.0;...
false
false
false
false
false
0
zretrieveGlobals(zarg,alist)I zarg;A alist; { switch(zarg) { case PKARG_NULL:zretrieveGlobalsAll();break; case PKARG_SYMVEC:zretrieveGlobalsSymvec(alist);break; case PKARG_SYMDEST:zretrieveGlobalsSymDest(alist);break; default:break; } }
false
false
false
false
false
0
usb3503_platform_probe(struct platform_device *pdev) { struct usb3503 *hub; hub = devm_kzalloc(&pdev->dev, sizeof(struct usb3503), GFP_KERNEL); if (!hub) return -ENOMEM; hub->dev = &pdev->dev; return usb3503_probe(hub); }
false
false
false
false
false
0
mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i) { unsigned long flags; struct scsi_cmnd *scmd; spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); scmd = ioc->ScsiLookup[i]; spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); return scmd; }
false
false
false
false
false
0
mps_numb(struct csa *csa, double val) { /* format floating-point number */ int dig; char *exp; for (dig = 12; dig >= 6; dig--) { if (val != 0.0 && fabs(val) < 0.002) sprintf(csa->field, "%.*E", dig-1, val); else sprintf(csa->field, "%.*G", dig, val); ...
false
false
false
false
false
0
terminal_app_delete_profile (TerminalApp *app, TerminalProfile *profile) { GHashTableIter iter; GSList *name_list; const char *name, *profile_name; char *gconf_dir; GError *error = NULL; const char **nameptr = &name; profile_name = terminal_profile_get_property_string (profil...
false
false
false
false
false
0
get_stasche_localize_dlg_info(const int array_num) { Stasche_localize_dlg_info *dlg_info; dlg_info = calloc(1, sizeof(Stasche_localize_dlg_info)); if (dlg_info == NULL) { fatal("No room!!\n"); } dlg_info->array_info = calloc(array_num + 1, sizeof(Stasche_localize_array_info*)); ...
false
false
false
false
false
0
init_graph_trace(void) { max_bytes_for_cpu = snprintf(NULL, 0, "%d", nr_cpu_ids - 1); if (!register_trace_event(&graph_trace_entry_event)) { pr_warning("Warning: could not register graph trace events\n"); return 1; } if (!register_trace_event(&graph_trace_ret_event)) { pr_warning("Warning: could not registe...
false
false
false
false
false
0
composeAndAppend(const UChar *src, const UChar *limit, UBool doCompose, UBool onlyContiguous, UnicodeString &safeMiddle, ReorderingBuffer &buffer, ...
false
false
false
false
false
0
format_help (const char *general, const char *description, const struct Help *opt) { size_t slen; unsigned int i; ssize_t j; size_t ml; size_t p; char scp[80]; const char *trans; printf (_("Usage: %s\n%s\n\n"), gettext(general), gettext(description)); printf (_("Arguments mandator...
false
false
false
false
false
0
midgard_core_metadata_set_isapproved (MidgardMetadata *self, const GValue *isapproved) { MIDGARD_GET_BOOLEAN_FROM_VALUE (self->priv->is_approved, isapproved); }
false
false
false
false
false
0
__lb_clean_rings(struct hns_nic_priv *priv, int ringid0, int ringid1, int budget) { int i, ret; struct hns_nic_ring_data *ring_data; struct net_device *ndev = priv->netdev; unsigned long rx_packets = ndev->stats.rx_packets; unsigned long rx_bytes = ndev->stats.rx_bytes; unsigned long rx_frame_errors = ndev...
false
false
false
false
false
0
posix_pathconf(PyObject *self, PyObject *args) { PyObject *result = NULL; int name; char *path; if (PyArg_ParseTuple(args, "sO&:pathconf", &path, conv_path_confname, &name)) { long limit; errno = 0; limit = pathconf(path, name); if (limit == -1 && errno != 0) {...
false
false
false
false
false
0
get_display() { int d; d = display.get_byte(0); if (d&0x80) { d &= 0x7f; d |= display.get_byte(1)<<7; } return d; }
false
false
false
false
false
0
pk_use_ecparams( const asn1_buf *params, ecp_group *grp ) { int ret; ecp_group_id grp_id; if( oid_get_ec_grp( params, &grp_id ) != 0 ) return( POLARSSL_ERR_PK_UNKNOWN_NAMED_CURVE ); /* * grp may already be initilialized; if so, make sure IDs match */ if( grp->id != POLARSSL_ECP_D...
false
false
false
false
false
0
__ext4_std_error(struct super_block *sb, const char *function, unsigned int line, int errno) { char nbuf[16]; const char *errstr; /* Special case: if the error is EROFS, and we're not already * inside a transaction, then there's really no point in logging * an error. */ if (errno == -EROFS && journal_c...
false
false
false
false
false
0
decodeEnumFeature(Node *n) { EnumFeature enum_feature = TypeunsafeEnum; String *feature = Getattr(n, "feature:cs:enum"); if (feature) { if (Cmp(feature, "simple") == 0) enum_feature = SimpleEnum; else if (Cmp(feature, "typesafe") == 0) enum_feature = TypesafeEnum; else if (Cmp(feature, "...
false
false
false
false
false
0
entry2str_internal( Slapi_Entry *e, int *len, int entry2str_ctrl ) { char *ebuf; char *ecur; size_t elen = 0; size_t typebuf_len= 64; char *typebuf= (char *)slapi_ch_malloc(typebuf_len); Slapi_Value dnvalue; /* * In string format, an entry looks like this: * dn: <dn>\n * ...
false
false
false
false
false
0
zzip_closedir(ZZIP_DIR * dir) { if (! dir) { errno = EBADF; return -1; } if (USE_DIRENT && dir->realdir) { _zzip_closedir(dir->realdir); free(dir->realname); free(dir); return 0; } else { zzip_dir_close(dir); return 0; } }
false
false
false
false
false
0
ath6kl_rx_refill(struct htc_target *target, enum htc_endpoint_id endpoint) { struct ath6kl *ar = target->dev->ar; struct sk_buff *skb; int rx_buf; int n_buf_refill; struct htc_packet *packet; struct list_head queue; n_buf_refill = ATH6KL_MAX_RX_BUFFERS - ath6kl_htc_get_rxbuf_num(ar->htc_target, endpoint); ...
false
false
false
false
false
0
rdma_destroy_id(struct rdma_cm_id *id) { struct rdma_id_private *id_priv; enum rdma_cm_state state; id_priv = container_of(id, struct rdma_id_private, id); state = cma_exch(id_priv, RDMA_CM_DESTROYING); cma_cancel_operation(id_priv, state); /* * Wait for any active callback to finish. New callbacks will find...
false
false
false
false
false
0
v_throwpoint(oldval) char_u *oldval; { if (oldval == NULL) return vimvars[VV_THROWPOINT].vv_str; vimvars[VV_THROWPOINT].vv_str = oldval; return NULL; }
false
false
false
false
false
0
add_to_fences (flist_tail_t new_fences, insn_t insn, state_t state, deps_t dc, void *tc, rtx last_scheduled_insn, VEC(rtx, gc) *executing_insns, int *ready_ticks, int ready_ticks_size, rtx sched_next, int cycle, int cycle_issued_insns, int issue_rate, ...
false
false
false
false
false
0
LI1() { VMB1 VMS1 VMV1 goto TTL; TTL:; {object V1; V1= make_cons((((object)VV[0])->s.s_dbind),(((object)VV[1])->s.s_dbind)); (((object)VV[1])->s.s_dbind)= immnum_plus((((object)VV[1])->s.s_dbind),small_fixnum(1)); (((object)VV[2])->s.s_dbind)= immnum_max((((object)VV[1])->s.s_dbind),(((object)VV[2])->s.s_dbind))...
false
false
false
false
false
0
goldfish_battery_probe(struct platform_device *pdev) { int ret; struct resource *r; struct goldfish_battery_data *data; struct power_supply_config psy_cfg = {}; data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); if (data == NULL) return -ENOMEM; spin_lock_init(&data->lock); r = platform_get_resour...
false
false
false
false
false
0
pt3file_load(const gchar *filename, G_GNUC_UNUSED GwyRunType mode, GError **error) { PicoHarpFile pt3file; GwyContainer *meta, *container = NULL; GwyDataField *dfield = NULL; GwyGraphModel *gmodel = NULL; guchar *buffer = NULL; const guchar *p; gsize header_len, siz...
false
false
false
false
false
0
photos_preview_nav_buttons_set_model (PhotosPreviewNavButtons *self, GtkTreeModel *model, GtkTreePath *current_path) { PhotosPreviewNavButtonsPrivate *priv = self->priv; g_clear_object (&priv->model); if (model != NULL) priv->model = photos_preview_model_new (model); g_clear_pointer (&priv->current_path, ...
false
false
false
false
false
0
nt_node_create (void *data) { struct nt_node *node; if ((node = (struct nt_node *) malloc (sizeof (struct nt_node))) == 0) { LOG (LOG_CRIT, ERR_MEM_ALLOC); exit (1); } node->ptr = data; node->next = (struct nt_node *) NULL; return (node); }
false
false
false
false
false
0
compiler_list(struct compiler *c, expr_ty e) { int n = asdl_seq_LEN(e->v.List.elts); if (e->v.List.ctx == Store) { ADDOP_I(c, UNPACK_SEQUENCE, n); } VISIT_SEQ(c, expr, e->v.List.elts); if (e->v.List.ctx == Load) { ADDOP_I(c, BUILD_LIST, n); } return 1; }
false
false
false
false
false
0
netsnmp_logging_restart(void) { netsnmp_log_handler *logh; int doneone = 0; for (logh = logh_head; logh; logh = logh->next) { if (0 == logh->enabled) continue; #ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG if (logh->type == NETSNMP_LOGHANDLER_SYSLOG) { snmp_disable_s...
false
false
false
false
false
0
setline (GtkMeta *meta, int w, int st) { if (w==1) w=0; if (oldwidth==w && oldst==st) return; oldst=st; switch (st) { case line_dotted : case line_dashed : st=GDK_LINE_ON_OFF_DASH; break; default : st=GDK_LINE_SOLID; break; } gdk_gc_set_line_attributes(meta->gc,w,st,GDK_CAP_ROUND,GDK_JOIN_ROUND);...
false
false
false
false
false
0
elm_widget_focus_set(Evas_Object *obj, int first) { API_ENTRY return; if (!sd->api) return; if (!sd->focused) { focus_order++; sd->focus_order = focus_order; sd->focused = EINA_TRUE; sd->api->on_focus(obj); } if (_elm_legacy_is(ob...
false
false
false
false
false
0
generate_points( TPoints &pA, TPoints &pB ) { const double Dx = 0.5; const double Dy = 1.5; const double Dz = 0.75; const double yaw = DEG2RAD(10); const double pitch = DEG2RAD(20); const double roll = DEG2RAD(5); pA.resize( 5 ); // A set of points at "A" reference system pB.resize( 5 ); // A set of p...
false
false
false
false
false
0
HistogramAddThresh(const VP8LHistogram* const a, const VP8LHistogram* const b, double cost_threshold) { int tmp[PIX_OR_COPY_CODES_MAX]; // <= max storage we'll need int i; double cost = -a->bit_cost_; for (i = 0; i < PIX_OR_COPY_CODES_MAX; ++i)...
false
false
false
false
false
0
add_object_to_store(item *it, GtkTreeStore *store, GtkTreeIter *new, GtkTreeIter *parent, int color) { char buf[256], buf1[256]; GdkColor *foreground=NULL, *background=NULL; PangoFontDescription *font=NULL; GtkStyle *row_style; if(it->weight < 0) { ...
true
true
false
false
false
1
dump_tl_data(FILE *ofile, krb5_tl_data *tlp, krb5_boolean filter_kadm) { for (; tlp != NULL; tlp = tlp->tl_data_next) { if (tlp->tl_data_type == KRB5_TL_KADM_DATA && filter_kadm) continue; fprintf(ofile, "\t%d\t%d\t", (int)tlp->tl_data_type, (int)tlp->tl_data_length); ...
false
false
false
false
false
0
ocfs2_validate_xattr_block(struct super_block *sb, struct buffer_head *bh) { int rc; struct ocfs2_xattr_block *xb = (struct ocfs2_xattr_block *)bh->b_data; trace_ocfs2_validate_xattr_block((unsigned long long)bh->b_blocknr); BUG_ON(!buffer_uptodate(bh)); /* * If the ecc fails, we return the error ...
false
false
false
false
false
0
checkDone() const { if (!m_levelData || !m_levelData->molecule()) { kDebug() << "level or molecule data is null!"; return false; } // let's assume that molecule is done // and see if we can break assumtion // // first we find molecule origin in field coords // by finding ...
false
false
false
false
false
0
register_alpha_internal (AlphaData *alpha_data) { if (G_UNLIKELY (clutter_alphas == NULL)) clutter_alphas = g_ptr_array_new (); g_ptr_array_add (clutter_alphas, alpha_data); return clutter_alphas->len + CLUTTER_ANIMATION_LAST; }
false
false
false
false
false
0
g2_packet_has_TO(g2_packet_t *src, uint8_t **guid) { char *data; /* * This is a utterly dirty Hack * we skim the start of the packet buffer for a TO packet, * without proper decoding. * This allows us to decide to route on a generic level, without * going into the details of all packets, and without repeat...
false
false
false
false
false
0
unit_skilluse_pos(struct block_list *src, int skill_x, int skill_y, int skill_num, int skill_lv) { int id = skill_get_skilldb_id(skill_num); if( id == 0 ) return 0; if( skill_lv <= 0 || skill_lv > MAX_SKILL_LEVEL ) return 0; return unit_skilluse_pos2( src, skill_x, skill_y, skill_num, skill_lv, skill_cast...
false
false
false
false
false
0
loadXMLFile(const QString& _xml_file) { QString raw_xml; QString xml_file = xmlFile(_xml_file); //kDebug() << "loadXMLFile xml_file=" << xml_file; if ( !QDir::isRelativePath(xml_file) ) raw_xml = KXMLGUIFactory::readConfigFile(xml_file); else raw_xml ...
false
false
false
false
false
0
DrawLRTrap(GWindow gw,GRect *pos,int inset,int width,Color col) { GPoint pts[5]; --width; if ( width==0 ) { GDrawDrawLine(gw,pos->x+pos->width-1-inset,pos->y+pos->height/2,pos->x+pos->width/2,pos->y+pos->height-1-inset,col); } else { pts[0].x = pos->x+pos->width-1-inset; pts[0].y = pos->y+pos->heig...
false
false
false
false
false
0
may_be_nonaddressable_p (tree expr) { switch (TREE_CODE (expr)) { case TARGET_MEM_REF: /* TARGET_MEM_REFs are translated directly to valid MEMs on the target, thus they are always addressable. */ return false; case COMPONENT_REF: return DECL_NONADDRESSABLE_P (TREE_OPERAND (expr, 1)) ...
false
false
false
false
true
1
uvec_equalp (SCM a, SCM b) { SCM result = SCM_BOOL_T; if (SCM_UVEC_TYPE (a) != SCM_UVEC_TYPE (b)) result = SCM_BOOL_F; else if (SCM_UVEC_LENGTH (a) != SCM_UVEC_LENGTH (b)) result = SCM_BOOL_F; else if (memcmp (SCM_UVEC_BASE (a), SCM_UVEC_BASE (b), SCM_UVEC_LENGTH (a) * uvec_sizes[SCM_UVEC_TYPE(a)])...
false
false
false
false
false
0
ret_code(void) { int e = errno; if (e > 0) return -e; return e; }
false
false
false
false
false
0
gxdfil (gadouble *xy, gaint n) { gadouble *pt; gaint i; XPoint *pnt; point = (XPoint *)malloc(sizeof(XPoint)*n); if (point==NULL) { printf ("Error in polygon fill routine gxdfil: \n"); printf (" Unable to allocate enough memory for the request\n"); return; } pnt = point; pt = xy; for (i=0; i<...
false
true
false
false
false
1
eliminate_parenthesis(gchar *str, gchar op, gchar cl) { register gchar *srcp, *destp; gint in_brace; destp = str; while ((destp = strchr(destp, op))) { in_brace = 1; srcp = destp + 1; while (*srcp) { if (*srcp == op) in_brace++; else if (*srcp == cl) in_brace--; srcp++; if (in_brace == 0...
false
false
false
false
false
0
nilfs_iget_set(struct inode *inode, void *opaque) { struct nilfs_iget_args *args = opaque; inode->i_ino = args->ino; if (args->for_gc) { NILFS_I(inode)->i_state = 1 << NILFS_I_GCINODE; NILFS_I(inode)->i_cno = args->cno; NILFS_I(inode)->i_root = NULL; } else { if (args->root && args->ino == NILFS_ROOT_INO) ...
false
false
false
false
false
0
lk_karmaUsb_connect(char *path) { /* ******************** Implemented OMFS mount here ?? ********************** */ /* The path must be absolute to be accesible in lkarmafs; e.g.: /mnt/karma2/ */ int len = strlen(path); char *fname; struct utimbuf time; int ret = 0; usbMountPoint = malloc(len + 2);...
false
false
false
false
false
0
operator()( const Atom* a1, const Atom* a2 ) const { if( a1->predicate() < a2->predicate() ) return( true ); else if( a1->predicate() > a2->predicate() ) return( false ); else { for( size_t i = 0; i < a1->arity(); ++i ) { if( a1->term( i ) < a2->term( i ) ) return( true ); else if( a...
false
false
false
false
false
0
DXGetCacheEntryV(char *fun, int key, int n, Object *in) { Object o; struct entry *this; if (!cache && !_dxf_initcache()) return ERROR; DXlock(&cache->DXlock, 0); this = find(fun, key, n, in); if (this) { remove_(this); insert(this); o = DXReference(this->out); } else o = NULL; DXu...
false
false
false
false
false
0
set_pkeys(struct qib_devdata *dd, u8 port, u16 *pkeys) { struct qib_pportdata *ppd; struct qib_ctxtdata *rcd; int i; int changed = 0; /* * IB port one/two always maps to context zero/one, * always a kernel context, no locking needed * If we get here with ppd setup, no need to check * that rcd is valid. ...
false
false
false
false
false
0
string(const char *pString) { if (pString!=0) { char *s=_string; duplicate(pString); if (s!=0) delete [] s; } else { _length=0; if (string()!=0) { delete [] _string; _string=0; } } }
false
false
false
false
false
0
soap_start_cb(SMSCConn *conn) { PrivData *privdata = conn->data; debug("smsc.soap.start", 0, "SOAP[%s]: start called", octstr_get_cstr(privdata->name)); /* set the status so that connection_thread will know what to do */ conn->status = SMSCCONN_CONNECTING; /* start connection_thread, i...
false
false
false
false
false
0
lbtf_set_mac_address(struct lbtf_private *priv, uint8_t *mac_addr) { struct cmd_ds_802_11_mac_address cmd; lbtf_deb_enter(LBTF_DEB_CMD); cmd.hdr.size = cpu_to_le16(sizeof(cmd)); cmd.action = cpu_to_le16(CMD_ACT_SET); memcpy(cmd.macadd, mac_addr, ETH_ALEN); lbtf_cmd_async(priv, CMD_802_11_MAC_ADDRESS, &cmd.hdr,...
false
false
false
false
false
0
fill_4th_indirect_row(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size, fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids) { unsigned width; /* Width of heap's doubling table */ unsigned u, v; /* Local index variables */ /* Get some information for the ...
false
false
false
false
false
0