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
r2cfII_2(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) { { INT i; for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(8, rs), MAKE_VOLATILE_STRIDE(8, csr), MAKE_VOLATILE_STRIDE(8, csi)) { E T1, T2; ...
false
false
false
false
false
0
sslWriteClient(int fd, void *data) { SslStateData *sslState = data; int len; assert(fd == sslState->client.fd); debug(26, 3) ("sslWriteClient: FD %d, %d bytes to write\n", fd, sslState->server.len); statCounter.syscalls.sock.writes++; len = FD_WRITE_METHOD(fd, sslState->server.buf, sslState->...
false
false
false
false
false
0
sqlite2_bind_ph (SV *sth, imp_sth_t *imp_sth, SV *param, SV *value, IV sql_type, SV *attribs, int is_inout, IV maxlen) { if (is_inout) { croak("InOut bind params not implemented"); } /* warn("bind: %s => %s\n", SvPV_nolen(param), SvPV_nolen(value)); */...
false
false
false
false
false
0
set_crt_state(u8 state) { u8 value; switch (state) { case VIA_STATE_ON: value = 0x00; break; case VIA_STATE_STANDBY: value = 0x10; break; case VIA_STATE_SUSPEND: value = 0x20; break; case VIA_STATE_OFF: value = 0x30; break; default: return; } via_write_reg_mask(VIACR, 0x36, value, 0x30); }
false
false
false
false
false
0
mcs_statistics_show(struct seq_file *s, void *p) { int op; unsigned long total, count, max; static char *id[] = {"cch_allocate", "cch_start", "cch_interrupt", "cch_interrupt_sync", "cch_deallocate", "tfh_write_only", "tfh_write_restart", "tgh_invalidate"}; seq_printf(s, "%-20s%12s%12s%12s\n", "#id", "count", "...
false
false
false
false
false
0
asn1PE_H245CustomPictureClockFrequency (OOCTXT* pctxt, H245CustomPictureClockFrequency* pvalue) { int stat = ASN_OK; ASN1BOOL extbit; /* extension bit */ extbit = 0; encodeBit (pctxt, extbit); encodeBit (pctxt, (ASN1BOOL)pvalue->m.sqcifMPIPresent); encodeBit (pctxt, (ASN1BOOL)pvalue->m.qcifMPI...
false
false
false
false
false
0
GraphInit(AjPGraph thys) { float fold; if (thys) { if(!thys->ready) { #if GRAPH_DEBUG ajDebug("=g= plinit ()\n"); #endif plinit(); } thys->ready = ajTrue; } fold = ajGraphicsSetCharscale(0.0); fold = ajGraphicsSetCharscale(fold); return; }
false
false
false
false
false
0
nearestFormat(const QVideoSurfaceFormat &format) const { return isFormatSupported(format) ? format : QVideoSurfaceFormat(); }
false
false
false
false
false
0
__ecereProp_ProjectNode_Get_project(struct ProjectNode * this) { struct ProjectNode * n = this; while(n && n->type != 0) n = n->parent; return n ? (n->project) : (((void *)0)); }
false
false
false
false
false
0
cmDocumentationPrintHTMLChar(std::ostream& os, char c) { // Use an escape sequence if necessary. switch (c) { case '<': os << "&lt;"; break; case '>': os << "&gt;"; break; case '&': os << "&amp;"; break; case '\n': os << "<br />"; break; defaul...
false
false
false
false
false
0
ocfs2_xa_block_get_free_start(struct ocfs2_xa_loc *loc) { struct ocfs2_xattr_header *xh = loc->xl_header; int i, count = le16_to_cpu(xh->xh_count); int offset, free_start = loc->xl_size; for (i = 0; i < count; i++) { offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset); if (offset < free_start) free_start...
false
false
false
false
false
0
compute_max_vf_buses(struct pci_dev *dev) { struct pci_sriov *iov = dev->sriov; int nr_virtfn, busnr, rc = 0; for (nr_virtfn = iov->total_VFs; nr_virtfn; nr_virtfn--) { pci_iov_set_numvfs(dev, nr_virtfn); if (!iov->offset || (nr_virtfn > 1 && !iov->stride)) { rc = -EIO; goto out; } busnr = pci_iov_vi...
false
false
false
false
false
0
writeData(const unsigned char* data, int length) { if (wav == NULL) return; fwrite(data, length, 1, wav); dataLength += length; }
false
false
false
false
false
0
gw_plugin_settings_gui_pane_load ( GtkWidget *pane) { gint result = -1; GtkToggleButton *chk = NULL; gfloat value = 0; #ifdef GW_DEBUG_PLUGIN_SETTINGS_COMPONENT g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); #endif if ( pane != NULL ) { #ifdef GW_DEBUG_PLUGIN_SETTINGS_COMPONE...
false
false
false
false
false
0
init_uart(char *dev, struct uart_t *u, int send_break, int raw) { struct termios ti; int fd, i; unsigned long flags = 0; if (raw) flags |= 1 << HCI_UART_RAW_DEVICE; fd = open(dev, O_RDWR | O_NOCTTY); if (fd < 0) { perror("Can't open serial port"); return -1; } tcflush(fd, TCIOFLUSH); if (tcgetattr(fd...
false
false
false
false
false
0
fullbatt_handler(struct charger_manager *cm) { struct charger_desc *desc = cm->desc; if (!desc->fullbatt_vchkdrop_uV || !desc->fullbatt_vchkdrop_ms) goto out; if (cm_suspended) device_set_wakeup_capable(cm->dev, true); mod_delayed_work(cm_wq, &cm->fullbatt_vchk_work, msecs_to_jiffies(desc->fullbatt_vchkd...
false
false
false
false
false
0
record(const char* cmd) { bool ok = false; int fd = Sys::open(FAX_XFERLOG, O_RDWR|O_CREAT|O_APPEND, 0644); if (fd >= 0) { fxStackBuffer record; char buf[80]; strftime(buf, sizeof (buf), "%D %H:%M", localtime(&start)); record.put(buf); // $ 1 = time record.fput("\t%s", cmd); // $ 2 = SEND|RECV|POLL|P...
false
false
false
false
false
0
cson_data_source_FILE( void * state, void * dest, unsigned int * n ) { FILE * f = (FILE*) state; if( ! state || ! n || !dest ) return cson_rc.ArgError; else if( !*n ) return cson_rc.RangeError; *n = (unsigned int)fread( dest, 1, *n, f ); if( !*n ) { return feof(f) ? 0 : cson_rc.IOError; ...
false
false
false
false
false
0
ensGenericassemblymapperCheckAssembled( const EnsPGenericassemblymapper gam, ajuint asmsrid, ajint chunkid) { AjPTable table = NULL; if (ajDebugTest("ensGenericassemblymapperCheckAssembled")) ajDebug("ensGenericassemblymapperCheckAssembled\n" " gam %p\n" " ...
false
false
false
false
false
0
_midgard_sql_query_row_dispose (GObject *object) { MidgardSqlQueryRow *self = MIDGARD_SQL_QUERY_ROW (object); if (self->model) g_object_unref (self->model); self->model = NULL; if (self->mgd) g_object_unref (self->mgd); self->mgd = NULL; __parent_class->dispose (object); }
false
false
false
false
false
0
noblk_send(ACE_Message_Block &message_block) { const size_t len = message_block.length(); if(len == 0) return -1; // Try to send the message directly. ssize_t n = this->peer().send(message_block.rd_ptr(), len, MSG_NOSIGNAL); if(n < 0) { if(errno == EWOULDBLOCK) // ...
false
false
false
false
false
0
print_switch_values (file, pos, max, indent, sep, term) FILE *file; int pos, max; const char *indent, *sep, *term; { size_t j; char **p; /* Fill in the -frandom-seed option, if the user didn't pass it, so that it can be printed below. This helps reproducibility. Of course, the string m...
false
false
false
false
false
0
f_assign(union argument *arg) { struct value a, b; (void) arg; (void) pop(&b); /* new value */ (void) pop(&a); /* name of variable */ if (a.type == STRING) { struct udvt_entry *udv; if (!strncmp(a.v.string_val,"GPVAL_",6) || !strncmp(a.v.string_val,"MOUSE_",6)) int_error(NO_CARET,"Attemp...
false
false
false
false
false
0
local_transpose_copy(TRANSPOSE_EL_TYPE *src, TRANSPOSE_EL_TYPE *dest, int el_size, int nx, int ny) { int x, y; if (el_size == 1) for (x = 0; x < nx; ++x) for (y = 0; y < ny; ++y) dest[y * nx + x] = src[x * ny + y]; else if (el_size == 2) for (x = 0; x < nx; ++x) fo...
false
false
false
false
false
0
wusb_trust_timeout_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev); ssize_t result = -ENOSYS; unsigned trust_timeout; result = sscanf(buf, "%u", &trust_timeout); if (result != 1) { result = -EINVAL; goto out; ...
false
false
false
false
false
0
soc_camera_dyn_pdev(struct soc_camera_desc *sdesc, struct soc_camera_async_client *sasc) { struct platform_device *pdev; int ret, i; mutex_lock(&list_lock); i = find_first_zero_bit(device_map, MAP_MAX_NUM); if (i < MAP_MAX_NUM) set_bit(i, device_map); mutex_unlock(&list_lock); if (i >= MAP_MAX_NUM) ...
false
false
false
false
false
0
php_unregister_url_stream_wrapper_volatile(char *protocol TSRMLS_DC) { if (!FG(stream_wrappers)) { clone_wrapper_hash(TSRMLS_C); } return zend_hash_del(FG(stream_wrappers), protocol, strlen(protocol) + 1); }
false
false
false
false
false
0
keyCompareByNameOwner(const void *p1, const void *p2) { Key *key1=*(Key **)p1; Key *key2=*(Key **)p2; const char *name1 = keyName(key1); const char *name2 = keyName(key2); int result = strcmp(name1, name2); if (result == 0) { const char *owner1 = keyOwner(key1); const char *owner2 = keyOwner(key2); return...
false
false
false
false
false
0
vertex_add_vertex (Vertex * vertex, Vertex * head) { if (vertex == NULL || head == NULL) return; dlist_append(vertex->arcs, vertex_ref(head)); }
false
false
false
false
false
0
P_PvecGivenDirichlet(float *p, int n, float *alpha) { float sum; /* for Gammln(|alpha|) in Z */ float logp; /* RETURN: log P(p|alpha) */ int x; sum = logp = 0.0; for (x = 0; x < n; x++) if (p[x] > 0.0) /* any param that is == 0.0 doesn't exist */ { logp += (alpha[x]-1.0) * lo...
false
false
false
false
false
0
pointsUpdated() { qreal w = m_red_shade->width(); QGradientStops stops; QPolygonF points; points += m_red_shade->points(); points += m_green_shade->points(); points += m_blue_shade->points(); qSort(points.begin(), points.end(), x_less_than); for (int i=0; i<points.size(); ++i) { qreal x = points.at(i).x(...
false
false
false
false
false
0
lrs_checkbound(lrs_dic *P, lrs_dat *Q) { /* check bound on objective and return TRUE if exceeded */ if(!Q->bound) return FALSE; if( Q->maximize && comprod(Q->boundn,P->objden,P->objnum,Q->boundd) == 1 ) { if(Q->verbose) { prat(" \nObj value: ",P->objnum,P->objden); ...
false
false
false
false
false
0
ntru_to_arr_32(NtruIntPoly *p, uint16_t q, uint8_t *a) { uint16_t N = p->N; uint8_t log_q = ntru_log2(q); typedef uint32_t __attribute__((__may_alias__)) *uint32_t_alias; uint32_t *a32 = (uint32_t_alias)a; uint16_t a_idx = 0; /* index into a32 */ uint8_t bit_idx = 0; /* next unused bit of a3...
false
false
false
false
false
0
initializeParsing (void) { unsigned int builtInCount; unsigned int i; builtInCount = sizeof (BuiltInParsers) / sizeof (BuiltInParsers [0]); LanguageTable = xMalloc (builtInCount, parserDefinition*); for (i = 0 ; i < builtInCount ; ++i) { parserDefinition* const def = (*BuiltInParsers [i])...
false
false
false
false
false
0
GC_maybe_gc(void) { static int n_partial_gcs = 0; GC_ASSERT(I_HOLD_LOCK()); ASSERT_CANCEL_DISABLED(); if (GC_should_collect()) { if (!GC_incremental) { /* FIXME: If possible, GC_default_stop_func should be used here */ GC_try_to_collect_inner(GC_never_stop_func); ...
false
false
false
false
false
0
rb_gst_get_encoding_profile (const char *media_type) { const GList *l; GstEncodingTarget *target; target = rb_gst_get_default_encoding_target (); for (l = gst_encoding_target_get_profiles (target); l != NULL; l = l->next) { GstEncodingProfile *profile = l->data; if (rb_gst_media_type_matches_profile (profile, ...
false
false
false
false
false
0
set_encoding_element (GstElement * element, gchar * encoding) { GST_DEBUG_OBJECT (element, "setting encoding to %s", GST_STR_NULL (encoding)); g_object_set (G_OBJECT (element), "subtitle-encoding", encoding, NULL); }
false
false
false
false
false
0
size() const { infinint ret = 0; struct cellule *ptr = first; while(ptr != NULL) { ret += ptr->size; ptr = ptr->next; } return ret; }
false
false
false
false
false
0
bitset_count_ (bitset src) { bitset_bindex list[BITSET_LIST_SIZE]; bitset_bindex next; bitset_bindex num; bitset_bindex count; /* This could be greatly sped up by adding a count method for each bitset implementation that uses a direct technique (based on masks) for counting the number of bits set i...
false
false
false
false
false
0
amp_am_scanner_update_variable (AmpAmScanner *scanner, AnjutaToken *variable) { if (scanner->expansion == FALSE) scanner->variables = g_list_prepend (scanner->variables, variable); amp_group_node_update_variable (scanner->group, variable); }
false
false
false
false
false
0
getSortedOption( TidyDoc tdoc, AllOption_t *tOption ) { TidyIterator pos = tidyGetOptionList( tdoc ); uint i = 0; while ( pos ) { TidyOption topt = tidyGetNextOption( tdoc, &pos ); tOption->topt[i] = topt; ++i; } tOption->topt[i] = NULL; /* sentinel */ qsort(tOption...
false
false
false
false
false
0
__repmgr_marshal_member_list(env, msg_version, bufp, lenp) ENV *env; u_int32_t msg_version; u_int8_t **bufp; size_t *lenp; { DB_REP *db_rep; REP *rep; REPMGR_SITE *site; __repmgr_membr_vers_args membr_vers; __repmgr_site_info_args site_info; __repmgr_v4site_info_args v4site_info; u_int8_t *buf, *p; size_t b...
false
false
false
false
false
0
afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, fd_t *fd, int32_t wbflags) { afr_private_t * priv = NULL; afr_local_t * local = NULL; int i = 0; int ret = -1; int32_t call_count = 0; ...
false
false
false
false
true
1
int2vectorout(PG_FUNCTION_ARGS) { int2vector *int2Array = (int2vector *) PG_GETARG_POINTER(0); int num, nnums = int2Array->dim1; char *rp; char *result; /* assumes sign, 5 digits, ' ' */ rp = result = (char *) palloc(nnums * 7 + 1); for (num = 0; num < nnums; num++) { if (num != 0) *rp++ = ' '...
false
false
false
false
true
1
readString(char *str, unsigned long maxlen, const char delim) { unsigned long i; for(i = 0; i < maxlen; i++) { str[i] = (char)getByte(); if(str[i] == delim || err) { str[i] = '\0'; return i; } } str[maxlen] = '\0'; return maxlen; }
false
false
false
false
false
0
vtraceJob(const Job& job, const char* fmt, va_list ap) { static const char* stateNames[] = { "state#0", "suspended", "pending", "sleeping", "blocked", "ready", "active", "done", "failed" }; time_t now = Sys::now(); vlogInfo( "JOB " | job.jobid | " (" | stateNames[job.state%9] | " dest " | ...
false
false
false
false
false
0
e_attachment_view_add_action_group (EAttachmentView *view, const gchar *group_name) { GtkActionGroup *action_group; GtkUIManager *ui_manager; const gchar *domain; g_return_val_if_fail (E_IS_ATTACHMENT_VIEW (view), NULL); g_return_val_if_fail (group_name != NULL, NULL); ui_man...
false
false
false
false
false
0
gfire_p2p_dl_proto_file_request_reply(gfire_p2p_session *p_session, const guint8 *p_data, guint32 p_len) { if(!p_session || !p_data || !p_len) return FALSE; guint32 fileid; gboolean reply; guint32 offset = 0; offset = gfire_proto_read_attr_int32_ss(p_data, &fileid, "fileid", offset); offset = gfire_proto_read...
false
false
false
false
false
0
addFromString(const QString & string) { QRegExp splitNonWords("\\W"); QStringList words = string.split(splitNonWords, QString::SkipEmptyParts); foreach (const QString & word, words) addWord(word); return true; }
false
false
false
false
false
0
macvlan_hash_del_source(struct macvlan_source_entry *entry) { hlist_del_rcu(&entry->hlist); kfree_rcu(entry, rcu); }
false
false
false
false
false
0
rsi_hal_key_config(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_key_conf *key) { struct rsi_hw *adapter = hw->priv; int status; u8 key_type; if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) key_type = RSI_PAIRWISE_KEY; else key_type = RSI_GROUP_KEY; rsi_dbg(ERR_ZONE, "...
false
false
false
false
false
0
appendseparator(FILE *fp, int seq, int utf8) { int n; if (utf8) { unsigned char u = (seq ? PSF2_STARTSEQ : PSF2_SEPARATOR); n = fwrite(&u, sizeof(u), 1, fp); } else { unsigned short u = (seq ? PSF1_STARTSEQ : PSF1_SEPARATOR); n = fwrite(&u, sizeof(u), 1, fp); } if (n != 1) { perror("appendseparator"); ...
false
false
false
false
false
0
e1000_retry_write_flash_dword_ich8lan(struct e1000_hw *hw, u32 offset, u32 dword) { s32 ret_val; u16 program_retries; /* Must convert word offset into bytes. */ offset <<= 1; ret_val = e1000_write_flash_data32_ich8lan(hw, offset, dword); if (!ret_val) return ret_val; for (program_retries = 0; program_...
false
false
false
false
false
0
AcpiDmResourceTemplate ( ACPI_OP_WALK_INFO *Info, ACPI_PARSE_OBJECT *Op, UINT8 *ByteData, UINT32 ByteCount) { ACPI_STATUS Status; UINT32 CurrentByteOffset; UINT8 ResourceType; UINT32 ...
false
false
false
false
false
0
resolve_path (const char * pathfrag) { char * fullpath; if (('~' != pathfrag[0]) && ('/' != pathfrag[0])) { /* If not an absolute filepath, look for the file in the current * gnome config dir ...*/ fullpath = gnome_config_get_real_path (pathfrag); } else { /* I suppose we should look up $HOME if ~ ...
false
false
false
false
false
0
make_prefetch_set(Info_for_prefetch *info_p, int sel_pe, int sel_mt, int pre_dlg_no, int assigns, int *assign, real *TaskEndTime, Array_def_use_table *off_cache, Array_def_use_...
false
false
false
false
false
0
CheckExt(const string& fileName, const std::string& newext) { string currentExt = GetExt(fileName); #ifdef _WIN32 // do a case insensitive check on windows systems if (ToLowerCase(currentExt) != ToLowerCase(newext)) #else if (currentExt != newext) #endif return fileName + "." + newext; else ...
false
false
false
false
false
0
ifp_file_upload(struct ifp_device * dev, void * p, int n) { int i; if (n == 0) { ifp_err("refusing to upload 0 bytes."); return -1; } i = _ifp_set_buffer_size(dev, n, 1); ifp_err_jump(i, out, "set buffer failed"); i = _ifp_push(dev, p, n); ifp_err_jump(i, out, "push failed"); i = _ifp_file_upload(dev, n); ...
false
false
false
false
false
0
gst_decode_bin_init (GstDecodeBin * decode_bin) { GList *factories; decode_bin->cb_mutex = g_mutex_new (); /* first filter out the interesting element factories */ factories = gst_default_registry_feature_filter ( (GstPluginFeatureFilter) gst_decode_bin_factory_filter, FALSE, decode_bin); /* so...
false
false
false
false
false
0
cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip, struct dsp_pcm_channel_descriptor * pcm_channel, int period_size) { u32 temp = snd_cs46xx_peek (chip,pcm_channel->pcm_reader_scb->address << 2); temp &= ~DMA_RQ_C1_SOURCE_SIZE_MASK; switch (period_size) { case 2048: temp |= DMA_RQ...
false
false
false
false
false
0
gt_encseq_check_consistency(const GtEncseq *encseq, const GtStrArray *filenametab, GtReadmode readmode, unsigned long scantrials, unsigned long multicharcmptrials, ...
false
false
false
false
false
0
pdf_finit(FILE *file) { PDFstrm *pdfs; dbug_enter("pdf_finit"); pdfs = (PDFstrm *) malloc(sizeof(PDFstrm)); if (pdfs != NULL) { pdfs->buffer = NULL; pdfs->file = file; #ifdef PLPLOT_USE_TCL_CHANNELS pdfs->tclChan = NULL; #endif pdfs->bp = 0; } return pdfs; }
false
false
false
false
false
0
not_record_typeP(long thing_153X) { long obj_154X; { if ((3 == (3 & thing_153X))) { if ((9 == (31 & ((((*((long *) ((((char *) (-3 + thing_153X))) + -8))))>>2))))) { obj_154X = *((long *) ((((char *) (-3 + thing_153X))) + 24)); if ((3 == (3 & obj_154X))) { if ((1 == (31 & ((((*((long *) ((((...
false
false
false
false
false
0
convert_chaingroup_specifier(struct chaingroup_specifier_s * n) { struct filter * res = NULL, * sub = NULL; char * name = NULL; if (n->name) { name = n->name; } else { /* Allocate a filter name */ static int ccount = 0; asprintf(&name, "chain_%d", ccount++); } if (n->list) { sub = conv...
false
false
false
false
false
0
xmp_iterator_new(XmpPtr xmp, const char * schema, const char * propName, XmpIterOptions options) { CHECK_PTR(xmp, NULL); RESET_ERROR; return (XmpIteratorPtr)new SXMPIterator(*(SXMPMeta*)xmp, schema, propName, options); }
false
false
false
false
false
0
fc_interface_init(void) { fc_funcs = &fc_functions; /* Test the existence of each required function here! */ fc_assert_exit(fc_funcs->player_tile_vision_get); fc_assert_exit(fc_funcs->gui_color_free); fc_funcs_defined = TRUE; }
false
false
false
false
false
0
BM_ParseRouteReplace(GF_BifsDecoder *codec, GF_BitStream *bs, GF_List *com_list) { GF_Err e; GF_Command *com; u32 RouteID, numBits, ind, node_id, fromID, toID; GF_Node *OutNode, *InNode; RouteID = 1+gf_bs_read_int(bs, codec->info->config.RouteIDBits); /*origin*/ node_id = 1 + gf_bs_read_int(bs, codec->info->co...
false
false
false
false
false
0
atkbd_apply_forced_release_keylist(struct atkbd* atkbd, const void *data) { const unsigned int *keys = data; unsigned int i; if (atkbd->set == 2) for (i = 0; keys[i] != -1U; i++) __set_bit(keys[i], atkbd->force_release_mask); }
false
false
false
false
false
0
is_readable(void *data, int unused_source, inputevt_cond_t cond) { rxdrv_t *rx = data; struct attr *attr = rx->opaque; pdata_t *db[32]; iovec_t iov[G_N_ELEMENTS(db)]; pmsg_t *mb; ssize_t r; uint i, iov_cnt; size_t avail; (void) unused_source; g_assert(attr->bio); /* Input enabled */ if (cond & INPUT_EVEN...
false
false
false
false
false
0
xsltPatPushState(xsltTransformContextPtr ctxt, xsltStepStates *states, int step, xmlNodePtr node) { if ((states->states == NULL) || (states->maxstates <= 0)) { states->maxstates = 4; states->nbstates = 0; states->states = xmlMalloc(4 * sizeof(xsltStepState)); } else if (states->ma...
false
false
false
false
false
0
_pointEnergyOfNeighbors(pullTask *task, pullBin *bin, pullPoint *point, double *fracNixed) { double enr; unsigned int ii, xx; pullPoint *her; enr = 0; xx = 0; for (ii=0; ii<point->neighPointNum; ii++) { her = point->neighPoint[ii]; if (her->status & PULL_STATUS_NIXME_BIT) { ...
false
false
false
false
false
0
extract_change_number_from_url(const nstring &uri) { // // The URLs look like ...aeget/project.Cnnn/... // Look for strings of the form "[.][cC][1-9][0-9]*" // const char *cp = uri.c_str(); for (;;) { if ( cp[0] == '.' && (cp[1] == 'c' || cp[1]...
false
false
false
false
true
1
pkix_pl_Object_Destroy( PKIX_PL_Object *object, void *plContext) { PKIX_PL_Object *objectHeader = NULL; PKIX_ENTER(OBJECT, "pkix_pl_Object_Destroy"); PKIX_NULLCHECK_ONE(object); #ifdef PKIX_OBJECT_LEAK_TEST PKIX_CHECK_FATAL(pkix_pl_Object_GetHeader(object, &objectHeader...
false
false
false
true
false
1
replay(int which, threadinfo *ti) { waituntilphase(REC_LOG_TS); // find the maximum timestamp of entries in the log if (buf_) { info_type x = info(); pthread_mutex_lock(&rec_mu); rec_log_infos[which] = x; pthread_mutex_unlock(&rec_mu); } inactive(); waituntilphase(REC_LOG_ANALYZE_WAKE); ...
false
false
false
false
false
0
brasero_time_button_min_changed (GtkSpinButton *button, BraseroTimeButton *self) { BraseroTimeButtonPrivate *priv; gint hrs, min, sec; priv = BRASERO_TIME_BUTTON_PRIVATE (self); hrs = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (priv->hrs)); min = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (pri...
false
false
false
false
false
0
encode_uri_component(const char * s) { size_t length = 0; for (const char * p = s; *p != '\0'; p++) { if (is_escaped(*p)) { length = addst(length, 3); } else { length = addst(length, 1); } } length = addst(length, 1); char * result = xmalloc(length); size_t i = 0; for (const c...
false
false
false
false
false
0
strsub(const char *s, const char *search, const char *replace) { char *p; int len = strlen(s); int slen = strlen(search); int rlen = strlen(replace); char *d; p = strstr(s, search); if (!slen || !p) { return NULL; } d = (char *) xmalloc(len + rlen); /* Copy first part */ len = p - s; memc...
false
true
false
false
false
1
cam_tl_connection_new (CamTL * tl, guint8 id) { CamTLConnection *connection; connection = g_new0 (CamTLConnection, 1); connection->tl = tl; connection->id = id; connection->state = CAM_TL_CONNECTION_STATE_CLOSED; connection->has_data = FALSE; return connection; }
false
false
false
false
false
0
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); if (m->defaults) { ...
false
false
false
false
false
0
MakeIqResult(const XmlElement * query) { XmlElement* result = new XmlElement(QN_IQ); result->AddAttr(QN_TYPE, STR_RESULT); if (query->HasAttr(QN_FROM)) { result->AddAttr(QN_TO, query->Attr(QN_FROM)); } result->AddAttr(QN_ID, query->Attr(QN_ID)); return result; }
false
false
false
false
false
0
file_name_to_unix() { char *bufp = &file_name[0]; while (*bufp) { if (*bufp == '.') { *bufp = '/'; } else if (*bufp == '/') { *bufp = '.'; } *bufp++; } }
false
false
false
false
false
0
static_accumulation (double value, double *min, double *max, double *average, double *deviation) { /******************************* * accumulate statistical data * *******************************/ if (value < *min) *min = value; if (value > *max) *max = value; *average += value; *deviation += value * value; }
false
false
false
false
false
0
parse_is_name_safe(const char *name) { if (strchr(name, '.')) { uc_error("char '.' not allowed in '%s'", name); return 0; } return 1; }
false
false
false
false
false
0
CheckMatchingKey( const DcmElement *elem ) // Date : March 18, 2002 // Author : Thomas Wilkens // Task : This function checks if the passed matching key's value only uses characters // which are part of its data type's character repertoire. Note that at the moment // ...
false
false
false
false
false
0
control_window_enter_notify_event(GtkWidget *base, GdkEventCrossing *ev, gpointer data) { GtkWidget *hbox = (GtkWidget *)g_object_get_data(G_OBJECT(base), "hbox"); if(timeout > 0) { g_source_remove(timeout); timeout = 0; } gtk_widget_show(hbox); return TRUE; }
false
false
false
false
false
0
GMT_miller (double lon, double lat, double *x, double *y) { /* Convert lon/lat to Miller Cylindrical x/y */ GMT_WIND_LON(lon) /* Remove central meridian and place lon in -180/+180 range */ *x = lon * project_info.j_x; *y = project_info.j_y * d_log (tand (45.0 + 0.4 * lat)); }
false
false
false
false
false
0
alm_value_app_choose_info_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { if (collect_values[0].v_pointer) { AlmAppChooseInfo* object; object = collect_values[0].v_pointer; if (object->parent_instance.g_class == NULL) { return g_strconcat ("invalid unc...
false
false
false
false
false
0
ata_tlink_match(struct attribute_container *cont, struct device *dev) { struct ata_internal* i = to_ata_internal(ata_scsi_transport_template); if (!ata_is_link(dev)) return 0; return &i->link_attr_cont.ac == cont; }
false
false
false
false
false
0
SaveOrMarkInstances( void *theEnv, void *theOutput, int saveCode, DATA_OBJECT *classList, intBool inheritFlag, intBool interruptOK, void (*saveInstanceFunc)(void *,void *,INSTANCE_TYPE *)) { struct defmodule *currentModule; int traversalID; DATA_OBJECT *tmp; INSTANCE_TYPE *ins; long insta...
false
false
false
false
false
0
asccasestr(const char *haystack, const char *xneedle) { char *needle, *NEEDLE; int i, sz; sz = strlen(xneedle); if (sz == 0) return (char *)haystack; needle = ac_alloc(sz); NEEDLE = ac_alloc(sz); for (i = 0; i < sz; i++) { needle[i] = lowerconv(xneedle[i]&0377); NEEDLE[i] = upperconv(xneedle[i]&0377); } ...
false
false
false
false
false
0
datetime_locale_setup (char const *lc_time) { GString *p_MMMM = g_string_sized_new (200); GString *p_MMM = g_string_sized_new (200); GString *p_decimal = g_string_sized_new (10); char *s; int m; datetime_locale.lc_time = g_strdup (lc_time); for (m = 1; m <= 12; m++) { if (m != 1) g_string_append_c (p_MMMM...
false
false
false
false
false
0
choose_log_fs_mgm_entry_size(int qp_per_entry) { int i = MLX4_MIN_MGM_LOG_ENTRY_SIZE; for (i = MLX4_MIN_MGM_LOG_ENTRY_SIZE; i <= MLX4_MAX_MGM_LOG_ENTRY_SIZE; i++) { if (qp_per_entry <= 4 * ((1 << i) / 16 - 2)) break; } return (i <= MLX4_MAX_MGM_LOG_ENTRY_SIZE) ? i : -1; }
false
false
false
false
false
0
sha1_done(hash_state * md, unsigned char *out) { int i; LTC_ARGCHK(md != NULL); LTC_ARGCHK(out != NULL); if (md->sha1.curlen >= sizeof(md->sha1.buf)) { return CRYPT_INVALID_ARG; } /* increase the length of the message */ md->sha1.length += md->sha1.curlen * 8; /* append the '...
false
false
false
false
false
0
detect_loud_models(struct fw_unit *unit) { const char *const models[] = { "Onyxi", "Onyx-i", "d.Pro", "Mackie Onyx Satellite", "Tapco LINK.firewire 4x6", "U.420"}; char model[32]; unsigned int i; int err; err = fw_csr_string(unit->directory, CSR_MODEL, model, sizeof(model)); if (err < 0) ret...
false
false
false
false
false
0
free_decl_list(DeclaratorList * decl_list) { Declarator *d, *next; d = decl_list->first; while (d != NULL) { next = d->next; free_declarator(d); d = next; } }
false
false
false
false
false
0
t_dns_name_hasbuffer(void) { int result; int rval; unsigned char junk[BUFLEN]; dns_name_t name; isc_buffer_t buffer; t_assert("dns_name_hasbuffer", 1, T_REQUIRED, "%s", a6); rval = 0; isc_buffer_init(&buffer, junk, BUFLEN); dns_name_init(&name, NULL); if (dns_name_hasbuffer(&name) != ISC_FALSE) ++rval; ...
false
false
false
false
false
0
garbage_collector(void* arg) { static int flush_rate_db = 0; struct obj_hash_entry *h = hash_table; int i, k; if ( arg ) return (void *)0; my_xlog(OOPS_LOG_NOTICE|OOPS_LOG_DBG|OOPS_LOG_INFORM, "Garbage collector started.\n"); /* Log = open("/var/tmp/Log", O_RDWR|O_CREAT|O_APPEND, 0660); if ( Log ==...
false
false
false
false
false
0
parse_integer (const char *str, bool *invalid) { uintmax_t n; char *suffix; enum strtol_error e = xstrtoumax (str, &suffix, 10, &n, "bcEGkKMPTwYZ0"); if (e == LONGINT_INVALID_SUFFIX_CHAR && *suffix == 'x') { uintmax_t multiplier = parse_integer (suffix + 1, invalid); if (multiplier != 0 && n *...
false
false
false
false
false
0
rtw_alloc_recvframe23a(struct rtw_queue *pfree_recv_queue) { struct recv_frame *pframe; struct list_head *plist, *phead; struct rtw_adapter *padapter; struct recv_priv *precvpriv; spin_lock_bh(&pfree_recv_queue->lock); if (list_empty(&pfree_recv_queue->queue)) pframe = NULL; else { phead = get_list_head(pf...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gfx3D__Matrix_ToEuler(struct __ecereNameSpace__ecere__gfx3D__Matrix * this, struct __ecereNameSpace__ecere__gfx3D__Euler * euler) { if(fabs(this->m[2][1]) <= 1.0 - 0.000005) { euler->yaw = atan2(-this->m[2][0], this->m[2][2]); euler->pitch = asin(this->m[2][1]); euler->roll = atan...
false
false
false
false
false
0