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
stream_filter_read (CamelStream *stream, gchar *buffer, gsize n, GCancellable *cancellable, GError **error) { CamelStreamFilterPrivate *priv; gssize size; struct _filter *f; priv = CAMEL_STREAM_FILTER_GET_PRIVATE (stream); priv->last...
false
false
false
false
false
0
getservent_p(struct net_data *net_data) { struct irs_sv *sv; if (!net_data || !(sv = net_data->sv)) return (NULL); net_data->sv_last = (*sv->next)(sv); return (net_data->sv_last); }
false
false
false
false
false
0
seaudit_bool_change_free(void *elem) { if (elem != NULL) { seaudit_bool_message_change_t *b = elem; free(b); } }
false
false
false
false
false
0
onig_chain_reduce(regex_t* reg) { regex_t *head, *prev; prev = reg; head = prev->chain; if (IS_NOT_NULL(head)) { reg->state = ONIG_STATE_MODIFY; while (IS_NOT_NULL(head->chain)) { prev = head; head = head->chain; } prev->chain = (regex_t* )NULL; REGEX_TRANSFER(reg, head); } }
false
false
false
false
false
0
signal_cb(int fd, short event, void *arg) { struct event *signal = arg; printf("%s: got signal %d\n", __func__, EVENT_SIGNAL(signal)); if (called >= 2) event_del(signal); called++; }
false
false
false
false
false
0
etpan_mailbox_list_write(FILE * f, int * col, struct mailimf_mailbox_list * mb_list) { clistiter * cur; int r; int first; first = 1; for(cur = clist_begin(mb_list->mb_list) ; cur != NULL ; cur = clist_next(cur)) { struct mailimf_mailbox * mb; mb = cur->data; if (!first) { r = m...
false
false
false
false
false
0
cx231xx_isoc_audio_deinit(struct cx231xx *dev) { int i; dev_dbg(dev->dev, "Stopping isoc\n"); for (i = 0; i < CX231XX_AUDIO_BUFS; i++) { if (dev->adev.urb[i]) { if (!irqs_disabled()) usb_kill_urb(dev->adev.urb[i]); else usb_unlink_urb(dev->adev.urb[i]); usb_free_urb(dev->adev.urb[i]); dev->a...
false
false
false
false
false
0
SendRectSimple(rfbClientPtr cl, int x, int y, int w, int h) { int maxBeforeSize, maxAfterSize; int maxRectSize, maxRectWidth; int subrectMaxWidth, subrectMaxHeight; int dx, dy; int rw, rh; maxRectSize = tightConf[compressLevel].maxRectSize; maxRectWidth = tightConf[compressLevel].maxRectWid...
false
false
false
false
false
0
dependent_managed_set_sheet (GnmDependent *dep, Sheet *sheet) { GnmExprTop const *texpr; g_return_if_fail (dep != NULL); #if 0 /* We need some kind of IS_A */ g_return_if_fail (dependent_type (dep) == DEPENDENT_MANAGED); #endif if (dep->sheet == sheet) return; texpr = dep->texpr; if (texpr) gnm_expr_top_ref...
false
false
false
false
false
0
BERDecodePoint(BufferedTransformation &bt) const { SecByteBlock str; BERDecodeOctetString(bt, str); Point P; if (!DecodePoint(P, str, str.size())) BERDecodeError(); return P; }
false
false
false
false
false
0
emit_objclass_spec_header( FILE * fp, FL_OBJECT * ob ) { ObjSPEC *attrib = find_entry( ob ); if ( attrib && attrib->emit_header ) attrib->emit_header( fp, ob ); }
false
false
false
false
false
0
GC_mark_some(cold_gc_frame) ptr_t cold_gc_frame; #endif { switch(GC_mark_state) { case MS_NONE: return(FALSE); case MS_PUSH_RESCUERS: if (GC_mark_stack_top >= GC_mark_stack_limit - INITIAL_MARK_STACK_SIZE/2) { /* Go ahead and mark, even though that might cause ...
false
false
false
false
false
0
_tenAnisoTen_Skew_f(const float _t[7]) { float Q, num, dnm, ret, mn, ten[7]; mn = TEN_T_TRACE(_t)/3; TEN_T_SET(ten, _t[0], _t[1]-mn, _t[2], _t[3], _t[4]-mn, _t[5], _t[6]-mn); Q = _tenAnisoTen_Q_f(ten); num = _tenAnisoTen_R_f(ten); dnm = AIR_CAST(float, Q*sqrt(2*Q)); ret = dnm ? AIR_CAST(float, num/dnm) :...
false
false
false
false
false
0
gst_plugin_desc_matches_whitelist_entry (GstPluginDesc * desc, const gchar * filename, const gchar * pattern) { const gchar *sep; gboolean ret = FALSE; gchar *name; GST_LOG ("Whitelist pattern '%s', plugin: %s of %s@%s", pattern, desc->name, desc->source, GST_STR_NULL (filename)); /* do we have a ...
false
false
false
false
false
0
close() { if (saved) { cc->seek(savePos, SEEK_SET); saved = gFalse; } }
false
false
false
false
false
0
CERT_CopyValidity(PLArenaPool *arena, CERTValidity *to, CERTValidity *from) { SECStatus rv; CERT_DestroyValidity(to); to->arena = arena; rv = SECITEM_CopyItem(arena, &to->notBefore, &from->notBefore); if (rv) return rv; rv = SECITEM_CopyItem(arena, &to->notAfter, &from->notAfter); retu...
false
false
false
false
false
0
set_base_rel_pathlists(PlannerInfo *root) { Index rti; for (rti = 1; rti < root->simple_rel_array_size; rti++) { RelOptInfo *rel = root->simple_rel_array[rti]; /* there may be empty slots corresponding to non-baserel RTEs */ if (rel == NULL) continue; Assert(rel->relid == rti); /* sanity check on arr...
false
false
false
false
false
0
rdcmnt(fp) FILE *fp; { int c,star,prcnt; prcnt = star = 0; /* no star seen yet */ while (!((c = getc(fp)) == '/' && star)) { if (c == EOF || (prcnt && c == '%')) fatal("Unterminated comment"); prcnt = (c == '%'); star = (c == '*'); if (c == '\n') lines++; } }
false
false
false
false
false
0
mailmessage_build(mailmessage * msg) { mailmessage * new_msg; new_msg = malloc(sizeof(* new_msg)); if (new_msg == NULL) goto err; new_msg->msg_session = msg->msg_session; new_msg->msg_driver = msg->msg_driver; new_msg->msg_index = msg->msg_index; if (msg->msg_uid == NULL) new_msg->msg_uid = NULL...
false
false
false
false
false
0
MPIOI_File_read(MPI_File mpi_fh, MPI_Offset offset, int file_ptr_type, void *buf, int count, MPI_Datatype datatype, char *myname, MPI_Status *status) { int error_code, bufsize, buftype_is_contig, filetype_is_contig; int datatype_size; ADIO_File fh; ADIO_Offset o...
false
false
false
false
false
0
Get(const std::string& key) { #ifdef USE_THREAD_DATA ThreadData* data = ThreadData::Get(); if(!data) return NULL; ThreadDataItem* item = data->GetItem(key); data->Release(); return item; #else return NULL; #endif }
false
false
false
false
false
0
DFR8setcompress(int32 type, comp_info * cinfo) { CONSTR(FUNC, "DFR8setcompress"); intn ret_value = SUCCEED; /* Perform global, one-time initialization */ if (library_terminate == FALSE) if(DFR8Istart()==FAIL) HGOTO_ERROR(DFE_CANTINIT, FAIL); if (type == COMP_NONE) { /* quick check ...
false
false
false
false
false
0
fit_handle_file(struct image_tool_params *params) { char tmpfile[MKIMAGE_MAX_TMPFILE_LEN]; char cmd[MKIMAGE_MAX_DTC_CMDLINE_LEN]; size_t size_inc; int ret; /* Flattened Image Tree (FIT) format handling */ debug ("FIT format handling\n"); /* call dtc to include binary properties into the tmp file */ if (strle...
false
false
false
false
false
0
open_outfile() { int openof_rc = 0; if (!local_recptr->file_name_specified) { /* no output file name given */ if (local_recptr->which_log == NEWLOG) { /* most recent wanted */ memcpy((void *) file_name, (void *) default_logfile_new, default_logfile_name_len); } else { /* prior log wanted */ ...
false
false
false
false
true
1
netsnmp_linux_interface_get_if_speed(int fd, const char *name, unsigned long long defaultspeed) { int ret; struct ifreq ifr; struct ethtool_cmd edata; uint16_t speed_hi; uint32_t speed; memset(&ifr, 0, sizeof(ifr)); memset(&edata, 0, sizeof(edata)); edata.cmd = ETHTOOL_GSET;...
false
false
false
false
false
0
printVariantKind(raw_ostream &OS) const { if (UseParensForSymbolVariant) OS << '(' << MCSymbolRefExpr::getVariantKindName(getKind()) << ')'; else OS << '@' << MCSymbolRefExpr::getVariantKindName(getKind()); }
false
false
false
false
false
0
text_macaddr(PG_FUNCTION_ARGS) { text *addr = PG_GETARG_TEXT_P(0); Datum result; char str[100]; int len; len = (VARSIZE(addr) - VARHDRSZ); if (len >= sizeof(str)) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("text too long to convert to MAC address"))); memcpy(str, VAR...
false
false
false
false
true
1
writeToPSFile(PostscriptFileParams postscriptParams) { if(firstSeq != 0 && lastSeq != 0) { PostscriptFileParams params = postscriptParams; clustalw::Array2D<QColor> colorMask; colorMask = alignWidget->getPrintoutColorMask(); psPrintParams printParams; prin...
false
false
false
false
false
0
TST(UINT32 m, UINT32 n) { if ((sh2.r[n] & sh2.r[m]) == 0) sh2.sr |= T; else sh2.sr &= ~T; }
false
false
false
false
false
0
parseFields(const ByteVector &data) { if(data.size() < 2) { debug("A private frame must contain at least 2 bytes."); return; } // Owner identifier is assumed to be Latin1 const int byteAlign = 1; const int endOfOwner = data.find(textDelimiter(String::Latin1), 0, byteAlign); d->owner = String(da...
false
false
false
false
false
0
getFileSize(char *file) { int fd, size; if ((fd = open(file, O_RDONLY)) < 0) fd = open(file, O_RDONLY | O_CREAT, 0666); if (fd < 0) { printf("Failed to open/create %s\n", file); return (-1); } size = fdFileSize(fd); close(fd); if (size < 0) { printf("Failed to get size of...
false
false
false
false
true
1
cinergyt2_fe_attach(struct dvb_usb_device *d) { struct cinergyt2_fe_state *s = kzalloc(sizeof( struct cinergyt2_fe_state), GFP_KERNEL); if (s == NULL) return NULL; s->d = d; memcpy(&s->fe.ops, &cinergyt2_fe_ops, sizeof(struct dvb_frontend_ops)); s->fe.demodulator_priv = s; return &s->fe; }
false
false
false
false
false
0
AesEcbEncrypt(const std::string & key, const mpz_class & plaintext, uint32_t plaintext_len_in_bits, mpz_class * ciphertext) { uint32_t plaintext_len_in_bytes = (plaintext_len_in_bits + 7) / 8; uint32_t key_length_in_bytes = (key.length() + 1) / 2; aes_enc...
false
false
false
false
false
0
unpack_ubyte_RGBX8888(const void *src, GLubyte dst[][4], GLuint n) { const GLuint *s = ((const GLuint *) src); GLuint i; for (i = 0; i < n; i++) { dst[i][RCOMP] = (s[i] >> 24); dst[i][GCOMP] = (s[i] >> 16) & 0xff; dst[i][BCOMP] = (s[i] >> 8) & 0xff; dst[i][ACOMP] = 0xff; } }
false
false
false
false
false
0
lam_ssi_coll_lam_basic_allreduce(void *sbuf, void *rbuf, int count, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm) { int err; /* Reduce to 0 and broadcast. */ err = comm->c_ssi_coll.lsca_reduce(sbuf, rbuf, count, dtype, op, 0, comm); if (err != MPI_SUCCESS) return err; return comm->c...
false
false
false
false
false
0
read_list_from_file() { std::ifstream file(nameOfSaveFile().c_str()); if(!file) return false; std::list<std::string> names; std::list<Layout> layouts; while(file) { std::string str; Layout l; if(!getline(file, str)) { file.close(...
false
false
false
false
false
0
gtk_sat_map_update (GtkWidget *widget) { GtkSatMap *satmap = GTK_SAT_MAP (widget); sat_t *sat = NULL; gdouble number, now; gchar *buff; gint *catnr; guint h, m, s; gchar *ch, *cm, *cs; /* check whether there are any pending resize requests */ if (satmap->resize) update_map...
false
false
false
false
false
0
decode_bitstring(const unsigned char **cpp, char *dn, const char *eom) { const unsigned char *cp = *cpp; char *beg = dn, tc; int b, blen, plen, i; if ((blen = (*cp & 0xff)) == 0) blen = 256; plen = (blen + 3) / 4; plen += sizeof("\\[x/]") + (blen > 99 ? 3 : (blen > 9) ? 2 : 1); if (dn + plen >= eom) return(...
false
false
false
false
false
0
uv__bind(uv_udp_t* handle, int domain, struct sockaddr* addr, socklen_t len, unsigned flags) { int saved_errno; int status; int yes; int fd; saved_errno = errno; status = -1; fd = -1; /* Check for bad flags. */ if (flags...
false
false
false
false
false
0
pool_init(char *name) { TDS_POOL *pool; /* initialize the pool */ pool = (TDS_POOL *) calloc(1, sizeof(TDS_POOL)); /* FIXME -- read this from the conf file */ if (!pool_read_conf_file(name, pool)) { fprintf(stderr, "Configuration for pool ``%s'' not found.\n", name); exit(EXIT_FAILURE); } pool->num_members...
false
false
false
false
false
0
lzma_upack_esi_00(struct lzmastate *p, char *old_ecx, char *bb, uint32_t bl) { uint32_t loc_eax, ret, loc_edi; loc_eax = p->p1 >> 0xb; if (!CLI_ISCONTAINED(bb, bl, old_ecx, 4) || !CLI_ISCONTAINED(bb, bl, p->p0, 4)) { if (!CLI_ISCONTAINED(bb, bl, old_ecx, 4)) cli_dbgmsg("contain error! %p %08x ecx: %p [%p]\n", ...
false
false
false
false
false
0
removeLibrary(StringRef Lib) { LibraryListType::iterator I = LibraryList.begin(); LibraryListType::iterator E = LibraryList.end(); for (;I != E; ++I) if (*I == Lib) { LibraryList.erase(I); return; } }
false
false
false
false
false
0
irf_boot_new (const GRETL_VAR *var, int periods) { irfboot *b; int err = 0; b = malloc(sizeof *b); if (b == NULL) { return NULL; } b->rE = NULL; b->Xt = NULL; b->Yt = NULL; b->Et = NULL; b->rtmp = NULL; b->ctmp = NULL; b->resp = NULL; b->C0 = NULL; b->sample =...
false
false
false
false
false
0
bk_open_image(VolInfo* volInfo, const char* filename) { size_t len; volInfo->imageForReading = open(filename, O_RDONLY, 0); if(volInfo->imageForReading == -1) { volInfo->imageForReading = 0; return BKERROR_OPEN_READ_FAILED; } int rc; BkStatStruct statStruct; ...
false
false
false
false
false
0
does_element_exist_ll(struct list_head *head, int data) { struct node *temp = head->start; while(temp->next != NULL) { if(temp->data==data) return 1; temp=temp->next; } /*Check last element*/ if(temp->data==data) return 1; return 0; }
false
false
false
false
false
0
fill_used_fields_bitmap(PARAM *param) { TABLE *table= param->table; my_bitmap_map *tmp; uint pk; param->tmp_covered_fields.bitmap= 0; param->fields_bitmap_size= table->s->column_bitmap_size; if (!(tmp= (my_bitmap_map*) alloc_root(param->mem_root, param->fields_bitmap_size))...
false
false
false
false
false
0
brasero_volume_get_name (BraseroVolume *volume) { BraseroMedia media; const gchar *type; GVolume *gvolume; gchar *name; g_return_val_if_fail (volume != NULL, NULL); g_return_val_if_fail (BRASERO_IS_VOLUME (volume), NULL); media = brasero_medium_get_status (BRASERO_MEDIUM (volume)); if (media & BRAS...
false
false
false
false
false
0
thread_ahead_leave_group(GROUP *group) { GROUP_AHEAD_NODE *node = find_ahead_node(group); int keep = res_keep_thread_info(group->subscribed); int save = group->subscribed && res_save_thread_info(); if (!save && !keep) { if (node) remove_ahead_node(node, True); } else { if (!node) no...
false
false
false
false
false
0
_tpl_log_store_get_events_for_date (TplLogStore *self, TpAccount *account, TplEntity *target, gint type_mask, const GDate *date) { g_return_val_if_fail (TPL_IS_LOG_STORE (self), NULL); if (TPL_LOG_STORE_GET_INTERFACE (self)->get_events_for_date == NULL) return NULL; return TPL_LOG_STORE_GET_I...
false
false
false
false
false
0
flatten (var_hash_table, func, vlist, flags) HASH_TABLE *var_hash_table; sh_var_map_func_t *func; VARLIST *vlist; int flags; { register int i; register BUCKET_CONTENTS *tlist; int r; SHELL_VAR *var; if (var_hash_table == 0 || (HASH_ENTRIES (var_hash_table) == 0) || (vlist == 0 && func == ...
false
false
false
false
false
0
elf_x86_probe(const char *buf, off_t len) { struct mem_ehdr ehdr; int result; result = build_elf_exec_info(buf, len, &ehdr, 0); if (result < 0) { if (probe_debug) { fprintf(stderr, "Not an ELF executable\n"); } goto out; } /* Verify the architecuture specific bits */ if ((ehdr.e_machine != EM_386) &&...
false
false
false
false
false
0
pad_line(const char *text, int align, int width) { static char buffer[MAX_CMDLINE_LEN]; int n, p; if (width >= (int)sizeof buffer) return NULL; /* Can't do it */ n = strlen(text); if (n >= width) n = width; memset(buffer, ' ', width); buffer[width] = 0; p = ((width - n) * align) >>...
false
false
false
false
false
0
retract(const QString& node, const QString& id) { if (!serverInfo_->hasPEP()) return; PEPRetractTask* tp = new PEPRetractTask(client_->rootTask(),node,id); // FIXME: add notification of success/failure tp->go(true); }
false
false
false
false
false
0
libsyssys_exec(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj command_scm; ScmString* command; ScmObj args_scm; ScmObj args; ScmObj iomap_scm = SCM_NIL; ScmObj iomap; ScmObj sigmask_scm = SCM_FALSE; ScmSysSigset* sigmask; ScmObj directory_scm = SCM_FALSE; ScmString* directory; ScmObj detach...
false
false
false
false
false
0
usb_descriptor_fillbuf(void *buf, unsigned buflen, const struct usb_descriptor_header **src) { u8 *dest = buf; if (!src) return -EINVAL; /* fill buffer from src[] until null descriptor ptr */ for (; NULL != *src; src++) { unsigned len = (*src)->bLength; if (len > buflen) return -EINVAL; memcpy(dest...
false
false
false
false
false
0
add_compiled_collation(CHARSET_INFO *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; }
false
false
false
false
false
0
iter_append_bool (DBusMessageIter *iter, const GckAttribute *attr) { dbus_bool_t value; g_assert (iter); g_assert (attr); value = gck_attribute_get_boolean (attr) ? TRUE : FALSE; dbus_message_iter_append_basic (iter, DBUS_TYPE_BOOLEAN, &value); }
false
false
false
false
false
0
asn1PE_H225ServiceControlSession (OOCTXT* pctxt, H225ServiceControlSession* pvalue) { int stat = ASN_OK; ASN1BOOL extbit; /* extension bit */ extbit = 0; encodeBit (pctxt, extbit); encodeBit (pctxt, (ASN1BOOL)pvalue->m.contentsPresent); /* encode sessionId */ stat = encodeConsUnsigned (pct...
false
false
false
false
false
0
evdns_base_search_add(struct evdns_base *base, const char *domain) { EVDNS_LOCK(base); search_postfix_add(base, domain); EVDNS_UNLOCK(base); }
false
false
false
false
false
0
list_initial_services() { CHECK_NOT_NIL_SHUTDOWN_OR_DESTROYED(); CORBA::ORB::ObjectIdList* ids = omniInitialReferences::list(); CORBA::ORB::ObjectIdList& idl = *ids; CORBA::ULong len = idl.length(); idl.length(len + 2); idl[len++] = CORBA::string_dup("RootPOA"); idl[len++] = CORBA::string_dup("POACurren...
false
false
false
false
false
0
getInstance(UNormalizationMode mode, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return NULL; } switch(mode) { case UNORM_NFD: return getNFDInstance(errorCode); case UNORM_NFKD: return getNFKDInstance(errorCode); case UNORM_NFC: return getNFCInstance(error...
false
false
false
false
false
0
_dxfResetCursorInteractor (tdmInteractor I) { /* set reset state so that it can effected at Redisplay() time */ ENTRY(("_dxfResetCursorInteractor(0x%x)", I)); if (I) { DEFDATA(I,CursorData) ; PDATA(reset) = 1 ; } EXIT(("")); }
false
false
false
false
false
0
menu_load_file (GtkFileSelection *selector, gpointer user_data) { gchar const *filename; static FILE *in; filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION(menu_selector)); if (!(in = fopen (filename, "r"))) { gchar *tempstr = g_strdup_printf ("Could not open file \"%s\" for reading", filename)...
false
false
false
false
true
1
store_bank2_setting(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) { struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); struct abituguru_data *data = dev_get_drvdata(dev); unsigned long val; ssize_t ret; ret = kstrtoul(buf, 10, &val); if (ret) return ...
false
false
false
false
false
0
sd_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* isoc packet */ int len) /* iso packet length */ { struct sd *sd __maybe_unused = (struct sd *) gspca_dev; int pkt_type; if (data[0] == 0x5a) { #if IS_ENABLED(CONFIG_INPUT) if (len > 20) { u8 state = (data[20] & 0x80) ? 1 : 0; if (sd->button_pre...
false
false
false
false
false
0
fcoe_em_config(struct fc_lport *lport) { struct fcoe_port *port = lport_priv(lport); struct fcoe_interface *fcoe = port->priv; struct fcoe_interface *oldfcoe = NULL; struct net_device *old_real_dev, *cur_real_dev; u16 min_xid = FCOE_MIN_XID; u16 max_xid = FCOE_MAX_XID; /* * Check if need to allocate an em ins...
false
false
false
false
false
0
range_list_initialize(lList **this_list, lList **answer_list) { DENTER(RANGE_LAYER, "range_list_initialize"); if (this_list != NULL) { if (*this_list != NULL) { lListElem *range; lListElem *next_range; /* * EB: CLEANUP: implement a new CULL function lEmptyList(lList *l...
false
false
false
false
false
0
_tenAnisoEval_Ca2_f(const float eval[3]) { float eval0 = AIR_MAX(0, eval[0]); return eval0 ? (eval[0] - eval[2])/eval0 : 0.0f; }
false
false
false
false
false
0
ipp_cache_init(void) { caches[IPP_CACHE_TLS] = ipp_cache_alloc( "TLS cache", "TLS", "tls_cache", "TLS-capable hosts", GNET_PROPERTY_PTR(tls_cache_max_time), GNET_PROPERTY_PTR(tls_cache_max_hosts), GNET_PROPERTY_PTR(tls_debug)); /* * Address caching of G2-only hosts. * * The so-called "G2" is actually a...
false
false
false
false
false
0
ga_entry_group_service_set_arbitrary(GaEntryGroupService * service, const gchar * key, const guint8 * value, gsize size, GError ** error) { GaEntryGroupServicePrivate *priv = (GaEntryGroupServicePrivate *) service; _set_entry(priv->entri...
false
false
false
false
false
0
rtl8723a_sreset_xmit_status_check(struct rtw_adapter *padapter) { struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); struct sreset_priv *psrtpriv = &pHalData->srestpriv; unsigned long current_time; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; unsigned int diff_time; u32 txdma_status; txdma_status ...
false
false
false
false
false
0
dataBaseOutput(ofstream & output,bool header, bool create) const { if(header) output << "update decayers set parameters=\""; if(create) output << "create Herwig::FourPionNovosibirskCurrent " << name() << " HwWeakCurrents.so\n"; output << "newdef " << name() << ":rhoMass " << _rhomass/GeV << "\n"; ...
false
false
false
false
false
0
block_SSL_GET_SESSION(worker_t * worker, worker_t *parent, apr_pool_t *ptmp) { const char *copy = store_get(worker->params, "1"); ssl_sconf_t *sconfig = ssl_get_socket_config(worker); if (!copy) { worker_log(worker, LOG_ERR, "Missing varibale name to store session in"); return APR_EGENERAL; } if (!w...
false
false
false
false
false
0
aiEnableVerboseLogging(aiBool d) { if (!DefaultLogger::isNullLogger()) { DefaultLogger::get()->setLogSeverity((d == AI_TRUE ? Logger::VERBOSE : Logger::NORMAL)); } gVerboseLogging = d; }
false
false
false
false
false
0
onKeyPress(FXObject*,FXSelector,void* ptr){ FXEvent* event=(FXEvent*)ptr; flags&=~FLAG_TIP; if(isEnabled() && !(flags&FLAG_PRESSED)){ if(target && target->tryHandle(this,FXSEL(SEL_KEYPRESS,message),ptr)) return 1; if(event->code==KEY_space || event->code==KEY_KP_Space){ down=TRUE; update(); ...
false
false
false
false
false
0
vtkstrncat(size_t n, const char **str) { char *cp; size_t i; size_t j[8]; size_t m = 0; for (i = 0; i < n; i++) { j[i] = 0; if (str[i]) { j[i] = strlen(str[i]); m += j[i]; } } cp = vtkstralloc(m); m = 0; for (i = 0; i < n; i++) { if (j[i]) { s...
false
false
false
false
false
0
__libc_register_dl_open_hook (struct link_map *map) { struct dl_open_hook **hook; hook = (struct dl_open_hook **) __libc_dlsym_private (map, "_dl_open_hook"); if (hook != NULL) *hook = &_dl_open_hook; }
false
false
false
false
false
0
pubkey_to_bits(gnutls_pk_algorithm_t pk, bigint_t* params, int params_size) { switch(pk) { case GNUTLS_PK_RSA: return _gnutls_mpi_get_nbits(params[0]); case GNUTLS_PK_DSA: if (params_size < 3) return 0; return _gnutls_mpi_get_nbits(params[3]); default: return 0; ...
false
false
false
false
false
0
tc3589x_reg_read(struct tc3589x *tc3589x, u8 reg) { int ret; ret = i2c_smbus_read_byte_data(tc3589x->i2c, reg); if (ret < 0) dev_err(tc3589x->dev, "failed to read reg %#x: %d\n", reg, ret); return ret; }
false
false
false
false
false
0
stih407_usb2_picophy_probe(struct platform_device *pdev) { struct stih407_usb2_picophy *phy_dev; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct phy_provider *phy_provider; struct phy *phy; int ret; phy_dev = devm_kzalloc(dev, sizeof(*phy_dev), GFP_KERNEL); if (!phy_dev) return...
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)); BSocket *_t = static_cast<BSocket *>(_o); switch (_id) { case 0: _t->hostFound(); break; case 1: _t->connected(); break;...
false
false
false
false
false
0
vtkGetSignChanges( double* P, int* degP, int* offsets, int count, double val, int* fsign = 0 ) { int oldVal = 0; double v; int changes = 0; for ( int i = 0; i < count; ++ i ) { v = evaluateHorner( P + offsets[i], degP[i], val ); if ( fsign && i == 0 ) { if ( IsZero( v ) ) { ...
false
false
false
false
false
0
findEmptySpaceRight(){ // found the first right space symbol int pos = text().find(' ', m_start_pos + m_cursor_pos); // do we have one more space symbol near? int next_pos = -1; while (pos > -1 && pos < static_cast<signed>(text().size()) && (next_pos = text().find(' ', pos + 1)) > -1 ){ i...
false
false
false
false
false
0
Contains(const List * l, const void *data) { size_t idx; if (l == NULL || data == NULL) { if (l) l->RaiseError("iList.Contains", CONTAINER_ERROR_BADARG); else iError.NullPtrError("iList.Contains"); return CONTAINER_ERROR_BADARG; } return (IndexOf_...
false
false
false
false
false
0
intel_engine_create_ringbuffer(struct intel_engine_cs *engine, int size) { struct intel_ringbuffer *ring; int ret; ring = kzalloc(sizeof(*ring), GFP_KERNEL); if (ring == NULL) return ERR_PTR(-ENOMEM); ring->ring = engine; ring->size = size; /* Workaround an erratum on the i830 which causes a hang if * the...
false
false
false
false
false
0
tsc200x_update_pen_state(struct tsc200x *ts, int x, int y, int pressure) { if (pressure) { input_report_abs(ts->idev, ABS_X, x); input_report_abs(ts->idev, ABS_Y, y); input_report_abs(ts->idev, ABS_PRESSURE, pressure); if (!ts->pen_down) { input_report_key(ts->idev, BTN_TOUCH, !!pressure); ts->p...
false
false
false
false
false
0
pushfilename (lua_State *L, const char *name) { const char *path; const char *filename; luaQ_getfield(L, LUA_GLOBALSINDEX, "package"); luaQ_getfield(L, -1, "cpath"); lua_remove(L, -2); if (! (path = lua_tostring(L, -1))) luaL_error(L, LUA_QL("package.cpath") " must be a string"); lua_pushliteral(L, "...
false
false
false
false
false
0
gwy_grain_value_set_expression(GwyGrainValue *gvalue, const gchar *expression, GError **error) { GError *err = NULL; g_return_val_if_fail(GWY_IS_GRAIN_VALUE(gvalue), FALSE); g_return_val_if_fail(gvalue->data.group == GWY_GRAIN_VALUE_GROUP_USER, ...
false
false
false
false
false
0
e_calendar_auto_move_handler (gpointer data) { ECalendar *cal; ECalendarItem *calitem; gint offset; g_return_val_if_fail (E_IS_CALENDAR (data), FALSE); cal = E_CALENDAR (data); calitem = cal->calitem; if (cal->timeout_delay > 0) { cal->timeout_delay--; } else { offset = cal->moving_forward ? 1 : -1; e_...
false
false
false
false
false
0
arrow(const P& p1, const P& p2, const P& p3, const P& p4, double scale) { const unsigned int num_pts(EPIX_NUM_PTS); const double dt(1.0/num_pts); std::vector<P> shaft(num_pts+1); for (unsigned int i=0; i <= num_pts; ++i) shaft.at(i) = spl_pt(p1, p2, p3, p4, i*dt); arrow_data data(shaft, sh...
false
false
false
false
false
0
ulpi_remove(struct device *dev) { struct ulpi_driver *drv = to_ulpi_driver(dev->driver); if (drv->remove) drv->remove(to_ulpi_dev(dev)); return 0; }
false
false
false
false
false
0
fsm_db_write( fsm* table, /*!< Pointer to FSM structure to output */ FILE* file, /*!< Pointer to file output stream to write to */ bool ids_issued /*!< Set to TRUE if expression IDs were just issued */ ) { PROFILE(FSM_DB_WRITE); fprintf( file, "%d %d %d %d ", DB_TYPE_FSM, table->line, ...
false
false
false
false
false
0
_ecore_message_notify_handler(void *data) { Ecore_Pthread_Notify *notify = data; Ecore_Pthread_Worker *work = notify->work; Ecore_Pthread_Message *user_data = (void *) notify->user_data; Eina_Bool delete = EINA_TRUE; work->u.message_run.from.received++; if (!user_data->callback) { if (w...
false
false
false
false
false
0
hts_isCharsetUTF8(const char *charset) { return charset != NULL && ( strcasecmp(charset, "utf-8") == 0 || strcasecmp(charset, "utf8") == 0 ); }
false
false
false
false
false
0
gst_matroska_demux_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstMatroskaDemux *demux; g_return_if_fail (GST_IS_MATROSKA_DEMUX (object)); demux = GST_MATROSKA_DEMUX (object); switch (prop_id) { case ARG_MAX_GAP_TIME: GST_OBJECT_LOCK (demux); g_valu...
false
false
false
false
false
0
mkErrorMessage(const std::string& msg, unsigned lineNo) { std::ostringstream s; s << "parsing properties failed in line " << lineNo << ": " << msg; return s.str(); }
false
false
false
false
false
0
solviip(double alpha, double betas, KronVector& d, double& eig_min) const { // quick exit to solvi if betas is small if (betas < diag_zero_sq) { solvi(alpha, d, eig_min); solvi(alpha, d, eig_min); return; } if (d.getDepth() == 0) { double aspbs = alpha*alpha+betas; QuasiTriangular* t= matrixK->...
false
false
false
false
false
0
ath10k_mac_update_rx_channel(struct ath10k *ar, struct ieee80211_chanctx_conf *ctx, struct ieee80211_vif_chanctx_switch *vifs, int n_vifs) { struct cfg80211_chan_def *def = NULL; /* Both locks are required because ar->rx_channel is modified. This * allows readers to hold either lock. */ ...
false
false
false
false
false
0
is_kmem_cache_addr(ulong vaddr, char *kbuf) { ulong cache, cache_cache, name; long next_offset, name_offset; if (vt->flags & KMEM_CACHE_UNAVAIL) { error(INFO, "kmem cache slab subsystem not available\n"); return NULL; } if (vt->flags & KMALLOC_SLUB) return is_kmem_cache_addr_common(vaddr, kbuf); ...
false
false
false
false
false
0
white_spaces(struct decode_ctx *ctx) { unsigned char c; for (; *ctx->p != '\0'; ctx->p++) { c = *ctx->p; if (c != ' ' && c != '\t' && c != '\r' && c != '\n') return 0; } return -1; }
false
false
false
false
false
0