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
g_mime_content_type_set_media_type (GMimeContentType *mime_type, const char *type) { char *buf; g_return_if_fail (GMIME_IS_CONTENT_TYPE (mime_type)); g_return_if_fail (type != NULL); buf = g_strdup (type); g_free (mime_type->type); mime_type->type = buf; g_mime_event_emit (mime_type->priv, NULL); }
false
false
false
false
false
0
DrawKeyBar(void) { int i; int xPosition; int temp; if (oldkeys != CPlayer->keys) { xPosition = 46; for (i = 0; i < NUMKEYS && xPosition <= 126; i++) { if (CPlayer->keys & (1 << i)) { V_DrawPatch(xPosition, 164, ...
false
false
false
false
false
0
unity_internal_deprecated_scope_impl_get_search_key (UnityInternalDeprecatedScopeImpl* self, UnityDeprecatedScopeSearch* search) { gchar* result = NULL; UnitySearchType search_type = 0; UnityDeprecatedScopeSearch* _tmp0_ = NULL; UnitySearchContext* _tmp1_ = NULL; UnitySearchType _tmp2_ = 0; gchar* _tmp3_ = NULL; ...
false
false
false
false
false
0
fcpdev_close ( struct fcp_device *fcpdev, int rc ) { struct fcp_command *fcpcmd; struct fcp_command *tmp; DBGC ( fcpdev, "FCP %p closed: %s\n", fcpdev, strerror ( rc ) ); /* Shut down interfaces */ intf_shutdown ( &fcpdev->scsi, rc ); /* Shut down any active commands */ list_for_each_entry_safe ( fcpcmd, tmp,...
false
false
false
false
false
0
parse_http_time(const char *date, struct tm *tm) { const char *cp; char month[4]; char wkday[4]; int i; unsigned tm_mday, tm_year, tm_hour, tm_min, tm_sec; tor_assert(tm); memset(tm, 0, sizeof(*tm)); /* First, try RFC1123 or RFC850 format: skip the weekday. */ if ((cp = strchr(date, ','))) { ++...
true
true
false
false
false
1
send_tun(int mcast, unsigned char *buf, int len) { unsigned char header[38]; struct iovec iov[2]; int header_len; if (!got_remote_addr) return 0; /* Can't send yet */ memset(header, 0, sizeof(header)); /* Add ethernet header */ header[0] = 0xAA; header[1] = 0x00; header[2] = 0x04; header[3] = 0x00; head...
true
true
false
false
false
1
getAllSubjects() { PD_URIList ret; PD_RDFModelIterator iter = begin(); PD_RDFModelIterator e = end(); for( ; iter != e; ++iter ) { const PD_RDFStatement& st = *iter; ret.push_back( st.getSubject() ); } return ret; }
false
false
false
false
false
0
tds7_crypt_pass(const unsigned char *clear_pass, size_t len, unsigned char *crypt_pass) { size_t i; for (i = 0; i < len; i++) crypt_pass[i] = ((clear_pass[i] << 4) | (clear_pass[i] >> 4)) ^ 0xA5; return crypt_pass; }
false
false
false
false
false
0
skipToMatchingBrace(SARRAY *sa, l_int32 start, l_int32 lbindex, l_int32 *pstop, l_int32 *prbindex) { char *str; l_int32 i, j, jstart, n, sumbrace, found, instring, nchars; PROCNAME("skipToMatchingBrace"); if (!sa) ...
false
false
false
false
false
0
method_E0(const int *account, int *weight) { number2Array("2121212120", weight); int tmp = algo03a(weight, true, account, 0, 9); tmp = (tmp + 7) % 10; tmp = 10 - tmp; if (10 == tmp) tmp = 0; if (tmp == account[9]) return AccountNumberCheck::OK; return AccountNumberCheck::ERROR; }
false
false
false
false
false
0
conn_all_vols_unconf(struct drbd_connection *connection) { struct drbd_peer_device *peer_device; bool rv = true; int vnr; rcu_read_lock(); idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { struct drbd_device *device = peer_device->device; if (device->state.disk != D_DISKLESS || device->s...
false
false
false
false
false
0
check_instance(Literals lit, Context subst, int res_type) { Topform c = lit->atom->container; if (number_of_maximal_literals(c->literals, FLAG_CHECK) == 1 || variable_substitution(subst)) return TRUE; else { Literals a; BOOL ok; int n = literal_number(c->literals, lit); Topform d = insta...
false
false
false
false
false
0
bind(const QString& node, const QString& service) { if (state() != Idle) return false; if (!node.isNull()) localResolver().setNodeName(node); if (!service.isNull()) localResolver().setServiceName(service); return true; }
false
false
false
false
false
0
rtl8187_iowrite_async(struct rtl8187_priv *priv, __le16 addr, void *data, u16 len) { struct usb_ctrlrequest *dr; struct urb *urb; struct rtl8187_async_write_data { u8 data[4]; struct usb_ctrlrequest dr; } *buf; int rc; buf = kmalloc(sizeof(*buf), GFP_ATOMIC); if (!buf) return; urb = usb_alloc_urb(...
false
true
false
false
false
1
patch_ad1988(struct hda_codec *codec) { struct ad198x_spec *spec; int err; err = alloc_ad_spec(codec); if (err < 0) return err; spec = codec->spec; spec->gen.mixer_nid = 0x20; spec->gen.mixer_merge_nid = 0x21; spec->gen.beep_nid = 0x10; set_beep_amp(spec, 0x10, 0, HDA_OUTPUT); snd_hda_pick_fixup(codec, a...
false
false
false
false
false
0
VisibleDumpBuffer(char *buf, int len) /* Visibilize a given string */ { char *cp; for (cp = buf; cp < buf + len; cp++) { if (isprint((int)(*cp)) || *cp == ' ') putchar(*cp); else if (*cp == '\n') { putchar('\\'); putchar('n'); } else if (*cp == '\r') { putchar('\\'); putchar('r'); } ...
false
false
false
false
false
0
bet_config_fyear_clicked ( GtkWidget *combo, gpointer data ) { gint account_number; if ( GPOINTER_TO_INT ( data ) == 0 ) account_number = bet_config_get_account_from_combo ( ); else account_number = gsb_gui_navigation_get_current_account ( ); gsb_data_account_set_bet_hist_fyear ( accou...
false
false
false
false
false
0
cifs_spnego_key_instantiate(struct key *key, struct key_preparsed_payload *prep) { char *payload; int ret; ret = -ENOMEM; payload = kmemdup(prep->data, prep->datalen, GFP_KERNEL); if (!payload) goto error; /* attach the data */ key->payload.data[0] = payload; ret = 0; error: return ret; }
false
false
false
false
false
0
image() const { return is_transformed_ ? transformed_ : original_; }
false
false
false
false
false
0
array_new_buffer(jl_array_t *a, size_t newlen) { size_t nbytes = newlen * a->elsize; if (a->elsize == 1) { nbytes++; } int isunboxed = jl_is_bits_type(jl_tparam0(jl_typeof(a))); char *newdata = allocb(nbytes); if (!isunboxed) memset(newdata, 0, nbytes); if (a->elsize == 1) ne...
false
false
false
false
false
0
gfs_face_cm_gradient (const FttCellFace * face, GfsGradient * g, guint v, gint max_level) { g_return_if_fail (face != NULL); g_return_if_fail (g != NULL); face_cm_gradient (face, g, v, max_level, FALSE); }
false
false
false
false
false
0
treeView_indexDataChanged() { foreach(QTreeView *tree, d_html->_treeViewDataChanged.keys()) { foreach(const QPersistentModelIndex &index, d_html->_treeViewDataChanged.values(tree)) { tree->dataChanged(index, index); } } d_html->_treeViewDataChanged.clear(); }
false
false
false
false
false
0
sensors_w83627hf_init(void) { int err; unsigned short address; struct w83627hf_sio_data sio_data; if (w83627hf_find(0x2e, &address, &sio_data) && w83627hf_find(0x4e, &address, &sio_data)) return -ENODEV; err = platform_driver_register(&w83627hf_driver); if (err) goto exit; /* Sets global pdev as a side ...
false
false
false
false
false
0
output_chng(int cn){ if( g.okRead ){ char *zLink = format_link("chngview?cn=%d",cn); if( g.okCheckinLink ){ char **az = db_query( "SELECT milestone,user,message,branch FROM chng WHERE cn=%d", cn); if( az && az[0] && az[1] && az[2] ){ if( az[0][0] && az[0][0] != '0' ){ ...
false
false
false
false
false
0
pipe_to_sg(struct pipe_inode_info *pipe, struct pipe_buffer *buf, struct splice_desc *sd) { struct sg_list *sgl = sd->u.data; unsigned int offset, len; if (sgl->n == sgl->size) return 0; /* Try lock this page */ if (buf->ops->steal(pipe, buf) == 0) { /* Get reference and unlock page for moving */ get_pa...
false
true
false
false
false
1
dnslabel_clear(struct dnslabel_table *table) { int i; for (i = 0; i < table->n_labels; ++i) mm_free(table->labels[i].v); table->n_labels = 0; }
false
false
false
false
false
0
fl_end_all_command( void ) { PIDList *cur, *next; int pstat = 0; pid_t pid = 0; for ( cur = pidlist; cur; cur = next ) { next = cur->next; check_for_activity( cur ); pid = waitpid( cur->pid, &pstat, 0 ); fl_free( cur ); } pidlist = NULL; ret...
false
false
false
false
false
0
drv_CF_write2(const int row, const int col, const char *data, const int len) { int l = len; /* limit length */ if (col + l > 16) l = 16 - col; if (l < 0) l = 0; /* sanity check */ if (row >= 2 || col + l > 16) { error("%s: internal error: write outside linebuffer bounds!", Name); return; ...
false
false
false
false
false
0
finish_eh_generation (void) { /* Nothing to do if no regions created. */ if (cfun->eh->region_tree == NULL) return; /* The object here is to provide find_basic_blocks with detailed information (via reachable_handlers) on how exception control flows within the function. In this first pass, we can ...
false
false
false
false
false
0
load_module(void) { if (!(multicast_rtp_tech.capabilities = ast_format_cap_alloc())) { return AST_MODULE_LOAD_DECLINE; } ast_format_cap_add_all(multicast_rtp_tech.capabilities); if (ast_channel_register(&multicast_rtp_tech)) { ast_log(LOG_ERROR, "Unable to register channel class 'MulticastRTP'\n"); return AST...
false
false
false
false
false
0
on_row_changed (GtkListStore *store, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) { NautilusBookmarksWindow *self = user_data; NautilusBookmark *bookmark = NULL, *bookmark_in_list; gint *indices, row; gboolean insert_bookmark = TRUE; indices = gtk_tree_path_get_indices (path); row = indices[0]...
false
false
false
false
false
0
status_grep(struct view *view, struct line *line) { struct status *status = line->data; enum { S_STATUS, S_NAME, S_END } state; char buf[2] = "?"; regmatch_t pmatch; if (!status) return FALSE; for (state = S_STATUS; state < S_END; state++) { const char *text; switch (state) { case S_NAME: text = status...
false
false
false
false
false
0
assigninvlet(otmp) register struct obj *otmp; { boolean inuse[52]; register int i; register struct obj *obj; #ifdef GOLDOBJ /* There is only one of these in inventory... */ if (otmp->oclass == COIN_CLASS) { otmp->invlet = GOLD_SYM; return; } #endif for(i = 0; i < 52; i++) inuse[...
false
false
false
false
false
0
find_reqid(child_cfg_t *child_cfg) { enumerator_t *enumerator, *children; child_sa_t *child_sa; ike_sa_t *ike_sa; char *name; u_int32_t reqid; reqid = charon->traps->find_reqid(charon->traps, child_cfg); if (reqid) { /* already trapped */ return reqid; } name = child_cfg->get_name(child_cfg); enumerator ...
false
false
false
false
false
0
ipmi_sensor_list(struct ipmi_intf *intf) { struct sdr_get_rs *header; struct ipmi_sdr_iterator *itr; int rc = 0; lprintf(LOG_DEBUG, "Querying SDR for sensor list"); itr = ipmi_sdr_start(intf, 0); if (itr == NULL) { lprintf(LOG_ERR, "Unable to open SDR for reading"); return -1; } while ((header = ipmi_sdr...
false
false
false
false
false
0
EchoFunction (tdmInteractor I, void *data, float rot[4][4], int draw) { DEFGLOBALDATA(data); DEFPORT(PORT_HANDLE) ; tdmChildGlobalP globals = _gdata; /* XXX should we define MACROS for accessing globals ? */ /* * This function is used as the echo for the view and navigation * interactors. ...
false
false
false
false
false
0
anjuta_token_foreach_post_order (AnjutaToken *token, AnjutaTokenForeachFunc func, gpointer user_data) { if (token != NULL) { AnjutaToken *last_parent; /* If not NULL, token belong to a parent */ AnjutaToken *last_token; AnjutaToken buffer; /* Temporary token allowing func to destroy * the current t...
false
true
false
false
false
1
FindLowerLevelDirectoryRecord( size_t item1, const char *directorytype ) { // return FindNextDirectoryRecord( item1, GetLowerLevelDirectoryRecord( directorytype ) ); const char *lowerdirectorytype = GetLowerLevelDirectoryRecord( directorytype ); if( !lowerdirectorytype ) return 0; const SequenceOfItems *sqi = G...
false
false
false
false
false
0
_open_m2ts(BLURAY *bd, BD_STREAM *st) { char *f_name; _close_m2ts(st); f_name = str_printf("%s" DIR_SEP "BDMV" DIR_SEP "STREAM" DIR_SEP "%s", bd->device_path, st->clip->name); st->fp = file_open(f_name, "rb"); X_FREE(f_name); st->clip_size = 0; st->clip_pos = (uint...
false
false
false
false
false
0
isDroppedPlayers(const serverinfo & sinfo) const { if (last_good_serverinfo == NULL) { return false; } // new < last -> somebody dropped return (sinfo.players.size() < last_good_serverinfo->players.size()); }
false
false
false
false
false
0
termwrite(char* obuf, int size) { if (is_file) { size_t nw; if (nw = gbfwrite(obuf, 1, size, magfile_h), nw < (size_t) size) { fatal(MYNAME ": Write error"); } } else { int rc; if (rc = gbser_write(serial_handle, obuf, size), rc < 0) { fatal(MYNAME ": Write error"); } } }
false
false
false
false
false
0
_store_unreadable_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, int record_id, int sensor_number, int sensor_type, char ...
false
true
false
false
false
1
_unpack_complete_batch_script_msg( complete_batch_script_msg_t ** msg_ptr, Buf buffer, uint16_t protocol_version) { complete_batch_script_msg_t *msg; uint32_t uint32_tmp; msg = xmalloc(sizeof(complete_batch_script_msg_t)); *msg_ptr = msg; if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { if (jobacctinfo_...
false
false
false
false
false
0
gt_alphabet_clone(const GtAlphabet *alphabet) { unsigned int i; GtAlphabet *newalpha; gt_assert(alphabet); newalpha = gt_malloc(sizeof *newalpha); newalpha->domainsize = alphabet->domainsize; newalpha->mapsize = alphabet->mapsize; newalpha->mappedwildcards = alphabet->mappedwildcards; newalpha->wildcar...
false
false
false
false
false
0
dhcp_discovery_tx ( struct dhcp_session *dhcp, struct dhcp_packet *dhcppkt __unused, struct sockaddr_in *peer ) { DBGC ( dhcp, "DHCP %p DHCPDISCOVER\n", dhcp ); /* Set server address */ peer->sin_addr.s_addr = INADDR_BROADCAST; peer->sin_port = htons ( BOOTPS_PORT ); return 0; }
false
false
false
false
false
0
pvr2_context_check(struct pvr2_context *mp) { struct pvr2_channel *ch1, *ch2; pvr2_trace(PVR2_TRACE_CTXT, "pvr2_context %p (notify)", mp); if (!mp->initialized_flag && !mp->disconnect_flag) { mp->initialized_flag = !0; pvr2_trace(PVR2_TRACE_CTXT, "pvr2_context %p (initialize)", mp); /* Finish hardwa...
false
false
false
false
false
0
lp_build_insert_new_block(struct gallivm_state *gallivm, const char *name) { LLVMBasicBlockRef current_block; LLVMBasicBlockRef next_block; LLVMBasicBlockRef new_block; /* get current basic block */ current_block = LLVMGetInsertBlock(gallivm->builder); /* check if there's another block after this on...
false
false
false
false
false
0
check_connection_progress(int fd) { int optval = 0; socklen_t optvallen = sizeof optval; /* see if the connect succeeded or failed */ if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &optval, &optvallen) == -1) { LOG("getsockopt failed\n"); return TCS_ERROR; } /* no error? */ if (optval == 0) return TCS_CONNEC...
false
false
false
false
false
0
print_dev_list(int ctl, int flags) { struct hci_dev_list_req *dl; struct hci_dev_req *dr; int i; if (!(dl = malloc(HCI_MAX_DEV * sizeof(struct hci_dev_req) + sizeof(uint16_t)))) { perror("Can't allocate memory"); exit(1); } dl->dev_num = HCI_MAX_DEV; dr = dl->dev_req; if (ioctl(ctl, HCIGETDEVLIST, (void...
false
false
false
false
true
1
keys() const { return QStringList() << "rgb" << "RGB" << "rgba" << "RGBA" << "bw" << "BW" << "sgi" << "SGI"; }
false
false
false
false
false
0
_list_pids_one_step(const char *node_name, uint32_t jobid, uint32_t stepid) { int fd; slurmstepd_task_info_t *task_info; uint32_t *pids; uint32_t count = 0; uint32_t tcount = 0; int i; fd = stepd_connect(NULL, node_name, jobid, stepid); if (fd == -1) { exit_code = 1; if (errno == ENOENT) { fprintf(stder...
false
false
false
false
false
0
isert_setup_id(struct isert_np *isert_np) { struct iscsi_np *np = isert_np->np; struct rdma_cm_id *id; struct sockaddr *sa; int ret; sa = (struct sockaddr *)&np->np_sockaddr; isert_dbg("ksockaddr: %p, sa: %p\n", &np->np_sockaddr, sa); id = rdma_create_id(&init_net, isert_cma_handler, isert_np, RDMA_PS_T...
false
false
false
false
false
0
CatalogCacheFlushRelation(Oid relId) { CatCache *cache; CACHE2_elog(DEBUG2, "CatalogCacheFlushRelation called for %u", relId); for (cache = CacheHdr->ch_caches; cache; cache = cache->cc_next) { int i; /* We can ignore uninitialized caches, since they must be empty */ if (cache->cc_tupdesc == NULL) c...
false
false
false
false
false
0
test_create_pe(const char *peStr, lListElem *job_elem) { lList *range= NULL; char *pe_cp = strdup(peStr); char *iter_dash = NULL; char *pe_str; for (pe_str = strtok_r(pe_cp, " ", &iter_dash); pe_str; pe_str= strtok_r(NULL, " ", &iter_dash)) { lSetString(job_elem, JB_pe, pe_str); pe...
false
false
false
false
false
0
m_zero(MAT *A) #endif { int i, A_m, A_n; Real **A_me; if ( A == MNULL ) error(E_NULL,"m_zero"); A_m = A->m; A_n = A->n; A_me = A->me; for ( i = 0; i < A_m; i++ ) __zero__(A_me[i],A_n); /* for ( j = 0; j < A_n; j++ ) A_me[i][j] = 0.0; */ return A; }
false
false
false
false
false
0
S_path_is_absolute(const char *name) { PERL_ARGS_ASSERT_PATH_IS_ABSOLUTE; if (PERL_FILE_IS_ABSOLUTE(name) #ifdef WIN32 || (*name == '.' && ((name[1] == '/' || (name[1] == '.' && name[2] == '/')) || (name[1] == '\\' || ( name[1] == '.' && name[2] == '\\'))) ) #else || (*name == '.' &&...
false
false
false
false
false
0
errorsIfUtf8 (const char* data, int length) { if (d->m_codec->mibEnum()!=MibUtf8) return false; //means no errors // #define highest1Bits (unsigned char)0x80 // #define highest2Bits (unsigned char)0xC0 // #define highest3Bits (unsigned char)0xE0 // #define highest4Bits (unsigned char)0xF0 // #define highest...
false
false
false
false
false
0
of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, struct irq_fwspec *fwspec) { int i; fwspec->fwnode = irq_data->np ? &irq_data->np->fwnode : NULL; fwspec->param_count = irq_data->args_count; for (i = 0; i < irq_data->args_count; i++) fwspec->param[i] = irq_data->args[i]; }
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); ModelBase *_t = static_cast<ModelBase *>(_o); switch (_id) { case 0: _t->loadedViews((*reinterpret_cast< ModelBase*(*)>(_a[1])),...
false
false
false
false
false
0
npw_copy_file (const gchar* destination, const gchar* source) { gchar* buffer; FILE* src; FILE* dst; guint len; gboolean ok; buffer = g_new (gchar, FILE_BUFFER_SIZE); /* Copy file */ src = fopen (source, "rb"); if (src == NULL) { return FALSE; } dst = fopen (destination, "wb"); if (dst == NULL) { r...
false
false
false
false
false
0
GetPoleValues ( double Pole[4], /* poles for b-spline */ long &NbPoles, /* number of poles (will be four, at maximum) */ long SplineDegree /* degree of the spline model */ ) { /* begin GetPoleValues */ /* recover the poles from a lookup table */ switch (SplineDeg...
false
false
false
false
false
0
e_util_utf8_strstrcasedecomp (const gchar *haystack, const gchar *needle) { gunichar *nuni; gunichar unival; gint nlen; const gchar *o, *p; if (haystack == NULL) return NULL; if (needle == NULL) return NULL; if (strlen (needle) == 0) return haystack; if (strlen (haystack)...
false
false
false
false
false
0
PUTL(FILE *f, uint32 u, int base, int width, int fill_char) { char obuf[32]; char *t = obuf; long put = 0; do { *t++ = "0123456789ABCDEF"[u % base]; u /= base; width--; } while (u > 0); while (width-- > 0) { fputc(fill_char, f); put++; } while (t != obuf) { fputc(*--t, f); put++; } re...
false
false
false
false
false
0
normal_shot_draw(tenm_object *my, int priority) { int status = 0; tenm_color color; /* sanity check */ if (my == NULL) { fprintf(stderr, "normal_shot_draw: my is NULL\n"); return 0; } /* return if it is not my turn */ if (priority != 1) return 0; /* value * green (#0, #1): 75 * bl...
false
false
false
false
false
0
btrfs_init_workqueues(struct btrfs_fs_info *fs_info, struct btrfs_fs_devices *fs_devices) { int max_active = fs_info->thread_pool_size; unsigned int flags = WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_UNBOUND; fs_info->workers = btrfs_alloc_workqueue("worker", flags | WQ_HIGHPRI, max_active, 16); fs_info->de...
false
false
false
false
false
0
link_hmdf_info_to_block( Block *org_block, Block *copy_block, Module_hmdf_information *module_hmdf_info, Hmdf_information **nhmdf_info_list_p ) { Block *org_bpt, *copy_bpt; Hmdf_information *hmdf_info, *new_hmdf_info, *list_end, *org_hmdf_info; Hm...
false
false
false
false
false
0
lpfc_reg_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport, dma_addr_t phys) { struct lpfc_mbx_reg_vfi *reg_vfi; struct lpfc_hba *phba = vport->phba; memset(mbox, 0, sizeof(*mbox)); reg_vfi = &mbox->u.mqe.un.reg_vfi; bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_REG_VFI); bf_set(lpfc_reg_vfi_vp, reg_vfi, 1); bf...
false
true
false
false
false
1
cyapa_gen3_set_power_mode(struct cyapa *cyapa, u8 power_mode, u16 always_unused, bool is_suspend_unused) { int ret; u8 power; int tries; u16 sleep_time; if (cyapa->state != CYAPA_STATE_OP) return 0; tries = SET_POWER_MODE_TRIES; while (tries--) { ret = cyapa_read_byte(cyapa, CYAPA_CMD_POWER_MODE); if (...
false
false
false
false
false
0
xmalloc_invalid_ptrstr(const void *p) { if (xmalloc_round(p) != pointer_to_ulong(p)) return "not correctly aligned"; if G_LIKELY(xmalloc_vmm_is_up) { if (vmm_is_native_pointer(p)) { return "valid VMM pointer!"; /* Should never happen */ } else { if (xmalloc_isheap(p, sizeof p)) { return "valid heap ...
false
false
false
false
false
0
stepMonsterDown(LiveMonster * live) { Position pos; int fail = 0; LiveMonster old; memcpy(&old, live, sizeof(LiveMonster)); live->pixel_y += live->speed_y + map.max_speed_boost; if(live->pixel_y >= TILE_H) { live->pos_y++; live->pixel_y = live->pixel_y - TILE_H; if(live->pos_y >= map.h) ...
false
true
false
false
false
1
qf_free(qi, idx) qf_info_T *qi; int idx; { qfline_T *qfp; while (qi->qf_lists[idx].qf_count) { qfp = qi->qf_lists[idx].qf_start->qf_next; vim_free(qi->qf_lists[idx].qf_start->qf_text); vim_free(qi->qf_lists[idx].qf_start->qf_pattern); vim_free(qi->qf_lists[idx].qf_start); qi->qf_lists[idx].qf...
false
false
false
false
false
0
visu_data_addNodeFromIndex(VisuData *data, guint position, float xyz[3], gboolean reduced, gboolean emitSignal) { VisuNode *node; int index[4]; float coord[3]; g_return_val_if_fail(VISU_IS_DATA(data), (VisuNode*)0); node = visu_node_array_getNewNode(VISU_NODE_ARRAY(data)...
false
false
false
false
false
0
addOrReplaceVecProp(const gchar * pszProp, const gchar * pszVal) { UT_sint32 iCount = m_vecAllProps.getItemCount(); if(iCount <= 0) { char * pSP = g_strdup(pszProp); char * pSV = g_strdup(pszVal); m_vecAllProps.addItem(pSP); m_vecAllProps.addItem(pSV); return; } UT_sint32 i = 0; for(i=0; i ...
false
false
false
false
false
0
getRect() { if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR); return impl->getRect(); }
false
false
false
false
false
0
xioperf_l_opts_format( globus_options_handle_t opts_handle, char * cmd, char ** opt, void * arg, int * out_parms_used) { GlobusXIOPerfFuncName(xioperf_l_opts_format); ...
false
false
false
false
false
0
gnc_query_view_toggled_cb (GtkCellRendererToggle *cell_renderer, gchar *path, gpointer user_data) { GNCQueryView *qview = GNC_QUERY_VIEW (user_data); GtkTreeModel *model; GtkTreeIter iter; GtkTreePath ...
false
false
false
false
false
0
xmain(struct plotflags *flags, int xlimits, int ylimits, double loX, double loY, double hiX, double hiY) { Window win; BBox bb; int num_wins; if (axisFont == 0) error("%s: font not found (try -f)", DEFAULT_FONT); DataSetBBox(&bb); bb.asp = 1.0; if (xlimits) { bb.loX = loX; bb.hiX = hiX; } if (ylimits) ...
false
false
false
false
false
0
s5p_mfc_init_decode_v5(struct s5p_mfc_ctx *ctx) { struct s5p_mfc_dev *dev = ctx->dev; s5p_mfc_set_shared_buffer(ctx); /* Setup loop filter, for decoding this is only valid for MPEG4 */ if (ctx->codec_mode == S5P_MFC_CODEC_MPEG4_DEC) mfc_write(dev, ctx->loop_filter_mpeg4, S5P_FIMV_ENC_LF_CTRL); else mfc_write(...
false
false
false
false
false
0
PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, IV n, const char *mode, int fd, int imode, int perm, PerlIO *f, int narg, SV **args) { char tmode[8]; if (PerlIOValid(f)) { const char * const path = SvPV_nolen_const(*args); PerlIOStdio * const s = PerlIOSelf(f, PerlIOStdio); FILE *stdi...
false
false
false
false
false
0
HandleDefComment( MsgMatchBumpsS * msgMatchBumps, uint32_t stream, const char * comment ) { int ret = OTF_RETURN_OK; (void)stream; static uint32_t comment_idx = 0; comment_idx++; do { // copy comment record // if( OTF_WStream_writeDefinitionComment( msgMatchBumps->wstream, ...
false
false
false
false
false
0
dooptions (lua_State *L, int n) { int i; for (i = 2; i <= n; i++) { if (lua_isfunction(L, i)) { /* avoid 'calling' extra info. */ lua_pushvalue(L, i); /* get option (a function) */ lua_pushvalue(L, -2); /* module */ lua_call(L, 1, 0); } } }
false
false
false
false
false
0
find_blank(polyominoesstruct *sp, point_type *point) { int score, worst_score; int x, y; int blank_mark; blank_mark = find_smallest_blank_component(sp); worst_score = 1000000; for (x=0;x<sp->width;x++) for (y=0;y<sp->height;y++) if (ARRAY(x,y)==blank_mark) { score = 100*score_point(sp,x,y,worst_score)...
false
false
false
false
false
0
hypervisor_find_object(hypervisor_conn_t *conn,char *name,int obj_type) { void *p; if (!(p = registry_find(name,obj_type))) { hypervisor_send_reply(conn,HSC_ERR_UNK_OBJ,1, "unable to find object '%s'",name); return NULL; } return p; }
false
false
false
false
false
0
_e_sys_logout_confirm_dialog_update(int remaining) { char txt[4096]; if (!_e_sys_logout_confirm_dialog) { fputs("ERROR: updating logout confirm dialog, but none exists!\n", stderr); return; } snprintf(txt, sizeof(txt), _("Logout is taking too long.<br>" ...
true
true
false
false
false
1
dbus_server_disconnect (DBusServer *server) { _dbus_return_if_fail (server != NULL); #ifdef DBUS_DISABLE_CHECKS _dbus_atomic_inc (&server->refcount); #else { dbus_int32_t old_refcount = _dbus_atomic_inc (&server->refcount); _dbus_return_if_fail (old_refcount > 0); } #endif SERVER_LOCK (serv...
false
false
false
true
false
1
document_tab_get_menu_tip (DocumentTab* self) { gchar* result = NULL; const gchar* _tmp0_ = NULL; Document* _tmp1_ = NULL; gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; gchar* _tmp4_ = NULL; gchar* _tmp5_ = NULL; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = _ ("Activate '%s'"); _tmp1_ = self->priv->_docu...
false
false
false
false
false
0
parse_regextype (const struct parser_table* entry, char **argv, int *arg_ptr) { const char *type_name; if (collect_arg(argv, arg_ptr, &type_name)) { /* collect the regex type name */ options.regex_options = get_regex_type(type_name); return parse_noop(entry, argv, arg_ptr); } return fals...
false
false
false
false
false
0
inc_all_account_mail(MainWindow *mainwin, gboolean autocheck, gboolean notify) { GList *list, *queue_list = NULL; IncProgressDialog *inc_dialog; gint new_msgs = 0; gint account_new_msgs = 0; if (prefs_common.work_offline && !inc_offline_should_override( (autocheck == FALSE), _("Claws Mail needs netw...
false
false
false
false
false
0
loc_substdupablexpr( Expr ) ablexpr *Expr; { ablexpr *ExprDup; ablexpr *ExprQueue; if ( ABL_ATOM( Expr ) ) { if ( ABL_ATOM_VALUE( Expr ) == AblSubstName ) { return( dupablexpr( AblSubstExpr ) ); } return( addchain( (ablexpr *)0, ABL_CAR( Expr ) ) ); } ExprDup = addchain( (ablexpr...
false
false
false
false
false
0
p_step_density_spinbutton_cb(GtkObject *obj, GapStbPropWidget *pw) { gdouble l_val; if(pw) { l_val = (GTK_ADJUSTMENT(pw->pw_spinbutton_step_density_adj)->value); if(pw->stb_elem_refptr) { if(pw->stb_elem_refptr->step_density != l_val) { p_pw_push_undo_and_set_unsaved_changes(pw); ...
false
false
false
false
false
0
small_toc_ref_1 (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) #line 1747 "../../src/gcc/config/rs6000/predicates.md" { if (GET_CODE (op) == PLUS && add_cint_operand (XEXP (op, 1), mode)) op = XEXP (op, 0); return GET_CODE (op) == UNSPEC && XINT (op, 1) == UNSPEC_TOCREL; }
false
false
false
false
false
0
A_MinotaurCharge(mobj_t * actor) { mobj_t *puff; if (!actor->target) return; if (actor->args[4] > 0) { puff = P_SpawnMobj(actor->x, actor->y, actor->z, MT_PUNCHPUFF); puff->momz = 2 * FRACUNIT; actor->args[4]--; } else { actor->flags &= ~MF_SKULLFLY;...
false
false
false
false
false
0
psb_irq_postinstall(struct drm_device *dev) { struct drm_psb_private *dev_priv = dev->dev_private; unsigned long irqflags; spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags); /* Enable 2D and MMU fault interrupts */ PSB_WSGX32(_PSB_CE2_BIF_REQUESTER_FAULT, PSB_CR_EVENT_HOST_ENABLE2); PSB_WSGX32(_PSB_CE_TWOD_C...
false
false
false
false
false
0
changed_range(const char *string1, const char *string2, int min_len, int *start, int *end) { const unsigned long *range1 = (const unsigned long *)string1; const unsigned long *range2 = (const unsigned long *)string2; const int step = sizeof(*range1); int l = min_len/step; int r = min_len%step; i...
false
false
false
false
true
1
handler (int signo) { if (c_file != 0 && c_file[0]) maybe_unlink (c_file); if (o_file != 0 && o_file[0]) maybe_unlink (o_file); if (ldout != 0 && ldout[0]) maybe_unlink (ldout); if (lderrout != 0 && lderrout[0]) maybe_unlink (lderrout); #ifdef COLLECT_EXPORT_LIST if (export_file != 0 && ex...
false
false
false
false
false
0
ToBooleanTypes(unsigned ast_id) { Handle<Object> object = GetInfo(ast_id); return object->IsCode() ? Handle<Code>::cast(object)->to_boolean_state() : 0; }
false
false
false
false
false
0
id3v2_tag_to_buffer (GstId3v2Tag * tag) { GstByteWriter *w; GstMapInfo info; GstBuffer *buf; guint8 *dest; guint i, size, offset, size_frames = 0; GST_DEBUG ("Creating buffer for ID3v2 tag containing %d frames", tag->frames->len); for (i = 0; i < tag->frames->len; ++i) { GstId3v2Frame *frame =...
false
false
false
false
false
0
win_graphics_click(window_graphics_t *dwin, int sx, int sy) { window_t *win = dwin->owner; int x = sx - win->bbox.x0; int y = sy - win->bbox.y0; if (win->mouse_request) { gli_event_store(evtype_MouseInput, win, x, y); win->mouse_request = FALSE; if (gli_conf_safecl...
false
false
false
false
false
0
share_newuser(int idx, char *par) { char *nick, *host, *pass, s[100]; struct userrec *u; if ((dcc[idx].status & STAT_SHARE) && !private_user) { nick = newsplit(&par); host = newsplit(&par); pass = newsplit(&par); if (!(u = get_user_by_handle(userlist, nick)) || !(u->flags & USER_UNSHARED...
false
false
false
false
false
0
gwy_tool_selection_manager_response(GwyTool *gwytool, gint response_id) { GwyToolSelectionManager *tool; GWY_TOOL_CLASS(gwy_tool_selection_manager_parent_class)->response(gwytool, response_id); tool =...
false
false
false
false
false
0