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
opengl_shader_shutdown() { size_t i; if ( !Use_GLSL ) { return; } for (i = 0; i < GL_shader.size(); i++) { if (GL_shader[i].program_id) { vglDeleteObjectARB(GL_shader[i].program_id); GL_shader[i].program_id = 0; } GL_shader[i].uniforms.clear(); } GL_shader.clear(); if (GLshader_info_log != NUL...
false
false
false
false
false
0
decrRefCount() { CORBA::Boolean delete_me = 0; { omni_tracedmutex_lock sync(pd_lock); if( !pd_refCount ) { if( omniORB::traceLevel > 0 ) { omniORB::logger log; log << "omniORB: WARNING -- CORBA::release() was called too many times\n" " for a CORBA::Context object - the object has already been...
false
false
false
false
false
0
option(ImageOption option) const { if (option == Size) { PICHeader hdr; if (picReadHeader(device(), &hdr, true)) { return QSize(hdr.width, hdr.height); } else { return QSize(-1, -1); } } return QVariant(); }
false
false
false
false
false
0
printMatrixData(CvMatr32f rotation_matrix, CvVect32f translation_vector){ printf("Matrix data\n"); for(int i=0;i<9;i++){ printf("%.5f ",rotation_matrix[i]); } for(int i=0;i<3;i++){ printf("%.5f ",translation_vector[i]); } printf("\n"); }
false
false
false
false
false
0
delete_case3(rbtree t, node n) { if (node_color(n->parent) == BLACK && node_color(sibling(n)) == BLACK && node_color(sibling(n)->left) == BLACK && node_color(sibling(n)->right) == BLACK) { sibling(n)->color = RED; delete_case1(t, n->parent); } else delete_...
false
false
false
false
false
0
wresist( list, w, l ) register struct width *list; int w, l; { register struct width *p, *q; double size = ((double) l) / ((double) w); double temp; for( p = list, q = NULL; p != NULL; q = p, p = p->next ) { if( p->w == w or( p->w > w an...
false
false
false
true
false
1
ext4_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata) { struct inode *inode = mapping->host; int ret, needed_blocks; handle_t *handle; int retries = 0; struct page *page; pgoff_t index; unsigned from, to; t...
false
false
false
false
false
0
em28xx_shutdown_buttons(struct em28xx *dev) { /* Cancel polling */ cancel_delayed_work_sync(&dev->buttons_query_work); /* Clear polling addresses list */ dev->num_button_polling_addresses = 0; /* Deregister input devices */ if (dev->sbutton_input_dev != NULL) { em28xx_info("Deregistering snapshot button\n"); ...
false
false
false
false
false
0
InsertFaceInRing(vtkIdType Face,vtkIdType Edge) { vtkIdType F1,F2; vtkIdList *FList; this->GetEdgeFaces(Edge,F1,F2); if (F1==-1) { this->Poly1->SetValue(Edge,Face); this->Poly2->SetValue(Edge,-1); return; } if (F1==Face) return; if (F2==-1) { this->Poly2->SetValue(Edge,Face); return; } if (F2==F...
false
false
false
false
false
0
dsearch_alloc(CONNECTION * con, USER * user, const char *id, const char *request) { DSEARCH *dsearch; LIST *ptr; /* generate a new request structure */ dsearch = CALLOC(1, sizeof(DSEARCH)); if(!dsearch) { OUTOFMEMORY("search_internal"); return -1; } dsearch->timestamp ...
false
false
false
false
false
0
gdk_pixbuf__xbm_image_begin_load (GdkPixbufModuleSizeFunc size_func, GdkPixbufModulePreparedFunc prepare_func, GdkPixbufModuleUpdatedFunc update_func, gpointer user_data, GError **error) { XBMData *context; gint f...
false
false
false
false
false
0
fix_unsafe_tree (tree t) { switch (unsafe_for_reeval (t)) { case 0: /* Safe. */ break; case 1: /* Mildly unsafe. */ t = unsave_expr (t); break; case 2: /* Wildly unsafe. */ { tree var = build_decl (VAR_DECL, NULL_TREE, TREE_TYPE (t)); SET_DECL_RTL (var, ...
false
false
false
false
false
0
IoMap_foreach(IoMap *self, IoObject *locals, IoMessage *m) { /*doc Map foreach(optionalKey, value, message) For each key value pair, sets the locals key to the key and value to the value and executes message. Example: <pre> aMap foreach(k, v, writeln(k, " = ", v)) aMap foreach(v, write(v))</pre> Example use with a ...
false
false
false
false
false
0
IoHTTPParser_setHTTPField_withName_givenSize_value_givenSize_(void *data, const unsigned char *fieldNameBuffer, size_t fieldNameSize, const unsigned char *fieldValueBuffer, size_t fieldValueSize) { IoHTTPParser *self = (IoHTTPParser *)data; if (fieldNameSize > MAX_FIELD_NAME_LENGTH) { HTTPParser *parser = PARSER...
false
false
false
false
false
0
get_eigs(int n, ergo_real* M, ergo_real* bestVector, ergo_real* eigValListResult) { int lwork = 3*n*n; ergo_real* work = new ergo_real[lwork]; ergo_real* eigvalList = new ergo_real[n]; ergo_real* A = new ergo_real[n*n]; memcpy(A, M, n*n*sizeof(ergo_real)); int info = 0; mat::syev("V", "U", &n, A, ...
false
false
false
false
false
0
close() { if (!file) return NULL; int res = gzclose(file); file = NULL; return res == Z_OK ? this : NULL; }
false
false
false
false
false
0
_ping_controller(void) { int rc; slurm_msg_t req; /* Locks: Read configuration */ slurmctld_lock_t config_read_lock = { READ_LOCK, NO_LOCK, NO_LOCK, NO_LOCK }; /* * Set address of controller to ping */ slurm_msg_t_init(&req); lock_slurmctld(config_read_lock); debug3("pinging slurmctld at %s", slurmctld_...
false
false
false
false
false
0
JtJ(const std::vector<unsigned int>& deriv1, const NEWIMAGE::volume<float>& ima1, const std::vector<unsigned int>& deriv2, const NEWIMA...
false
false
false
false
false
0
extract_parenthesis_with_skip_quote(gchar *str, gchar quote_chr, gchar op, gchar cl) { register gchar *srcp, *destp; gint in_brace; gboolean in_quote = FALSE; destp = str; while ((srcp = strchr_with_skip_quote(destp, quote_chr, op))) { if (destp > str) *destp++ = ' '; memmove(destp, srcp + 1, strlen...
false
false
false
false
false
0
file_read(struct archive *a, void *client_data, const void **buff) { struct read_file_data *mine = (struct read_file_data *)client_data; ssize_t bytes_read; /* TODO: If a recent lseek() operation has left us * mis-aligned, read and return a short block to try to get * us back in alignment. */ /* TODO: Someday...
false
true
false
false
true
1
task_copyfn_remap_type (struct omp_taskcopy_context *tcctx, tree orig_type) { tree name, new_fields = NULL, type, f; type = lang_hooks.types.make_type (RECORD_TYPE); name = DECL_NAME (TYPE_NAME (orig_type)); name = build_decl (gimple_location (tcctx->ctx->stmt), TYPE_DECL, name, type); TYPE_NAME (type...
false
false
false
false
false
0
_transit_effect_resizing_context_new(Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h) { Elm_Transit_Effect_Resizing *resizing; resizing = ELM_NEW(Elm_Transit_Effect_Resizing); if (!resizing) return NULL; resizing->from.w = from_w; resizing->from.h = from_h; resizing->to.w = to...
false
false
false
false
false
0
Trspi_LoadBlob_PRIVKEY_DIGEST12(UINT64 *offset, BYTE *blob, TPM_KEY12 *key) { Trspi_LoadBlob_UINT16(offset, key->tag, blob); Trspi_LoadBlob_UINT16(offset, key->fill, blob); Trspi_LoadBlob_UINT16(offset, key->keyUsage, blob); Trspi_LoadBlob_KEY_FLAGS(offset, blob, &key->keyFlags); Trspi_LoadBlob_BYTE(offset, key->a...
false
false
false
false
false
0
vxge_ethtool_sset(struct net_device *dev, struct ethtool_cmd *info) { /* We currently only support 10Gb/FULL */ if ((info->autoneg == AUTONEG_ENABLE) || (ethtool_cmd_speed(info) != SPEED_10000) || (info->duplex != DUPLEX_FULL)) return -EINVAL; return 0; }
false
false
false
false
false
0
marker_start_setxattr (call_frame_t *frame, xlator_t *this) { int32_t ret = 0; dict_t *dict = NULL; marker_local_t *local = NULL; marker_conf_t *priv = NULL; priv = this->private; local = (marker_local_t*) frame->local; dict = dict_new ...
false
false
false
false
false
0
select_radio(GtkWidget*parent, GsDlgStr value) { GList *kids=gtk_container_get_children(GTK_CONTAINER(parent)); if (!kids) { return;} if (kids->data && GTK_IS_RADIO_BUTTON(kids->data)) { GList *kid=kids; for (kid=kids; kid; kid=kid->next) { if (kid->data && GTK_IS_RADIO_BUTTON(kid->data)) { gchar*kval=g_o...
false
false
false
false
false
0
mkstring(char *s, int size, ulong flags, const char *opt) { int len; int extra; int left; int right; switch (flags & (LONG_DEC|LONG_HEX|INT_HEX|INT_DEC|LONGLONG_HEX|ZERO_FILL)) { case LONG_DEC: sprintf(s, "%lu", (ulong)opt); break; case LONG_HEX: sprintf(s, "%lx", (ulong)opt); break; case (LONG_HEX|Z...
false
true
false
false
false
1
findSubWindow(Display *display,Window top_window, Window window_to_check,int *x,int *y) { int newx, newy; Window window; if (top_window == (Window) NULL) return ((Window) NULL); if (window_to_check == (Window) NULL) return ((Window) NULL); /* initiali...
false
false
false
false
false
0
copy_lang_type (tree node) { int size; struct lang_type *lt; if (! TYPE_LANG_SPECIFIC (node)) return; if (TYPE_LANG_SPECIFIC (node)->u.h.is_lang_type_class) size = sizeof (struct lang_type); else size = sizeof (struct lang_type_ptrmem); lt = ggc_alloc_lang_type (size); memcpy (lt, TYPE_LANG_...
false
false
false
false
false
0
slhc_remember(struct slcompress *comp, unsigned char *icp, int isize) { register struct cstate *cs; unsigned ihl; unsigned char index; if(isize < 20) { /* The packet is shorter than a legal IP header */ comp->sls_i_runt++; return slhc_toss( comp ); } /* Peek at the IP header's IHL field to find its length...
false
false
false
false
false
0
handle_identifier(const char *str) { int i = strlen(str); int lookup = userdef_lookup(str); char *buffer; if(lookup != -1) { handle_userdef(lookup); return; } if(need_structclosure == 1) { buffer = current_datatype; if((buffer = (char *)realloc(buffer, strlen(buffer) + i + 3)) == NULL) { perro...
false
true
false
false
false
1
getWidgetsByDate(const QDate &dayDate) const { QList<CalendarItemWidget*> list; foreach (QObject *obj, children()) { CalendarItemWidget *widget = qobject_cast<CalendarItemWidget*>(obj); if (widget && widget->beginDateTime().date() == dayDate) list << widget; } return list; }
false
false
false
false
false
0
_PyDict_LoadGlobal(PyDictObject *globals, PyDictObject *builtins, PyObject *key) { PyObject *x; if (PyUnicode_CheckExact(key)) { PyObject **value_addr; Py_hash_t hash = ((PyASCIIObject *)key)->hash; if (hash != -1) { PyDictKeyEntry *e; e = globals->ma_keys->dk_loo...
false
false
false
false
false
0
blktrunc(BLOCK *blk) { /* * firewall */ if (conf->calc_debug & CALCDBG_BLOCK) { blkchk(blk); } /* * free the old storage */ free(blk->data); /* * setup as a zero length fixed block */ blk->blkchunk = 1; blk->maxsize = 1; blk->datalen = 0; blk->data = (USB8*)malloc(1); if (blk->data == NULL) {...
false
false
false
true
false
1
anthy_file_dic_get_section(const char* section_name) { int i; char* head = anthy_mmap_address(fdic.mapping); int* p = (int*)head; int entry_num = anthy_dic_ntohl(*p++); for (i = 0; i < entry_num; ++i) { int hash_offset = anthy_dic_ntohl(*p++); int key_len = anthy_dic_ntohl(*p++); int contents_...
false
false
false
false
false
0
setOrderOptions ( const char* opt ) { // 0x means not to use OR sort if ( opt[0] == '0' ) return; sortAscend = (opt[1] == 'a'); preferNonGen = (opt[2] == 'p'); // all statistics use negative version (as it is used in disjunctions) iSort = opt[0] == 'S' ? DLVertex::getStatIndexSize(false) : opt[0] == 'D' ?...
false
false
false
false
false
0
parse_write ( char * s ) { #define WRITE_SIDE flags.writer.side #define WRITE_FLAV flags.writer.flavour int i; char c; for(i = 0; i < strlen( s ) ; i++) { switch( c = *( s + i ) ) { case 'C': WRITE_SIDE = ( WRITE_SIDE == SERVER ) ? BOTH : CLIENT; break; case 'S': WRITE_SIDE = ( WRITE_SIDE == CLIENT )...
false
false
false
false
false
0
graphics_register_type(Graphics * g, Object_type type, char *SVGserie) { Graphics_svg_series *gss; gss = parse_svg_series(SVGserie); if (gss == NULL) { WARN(_("Couldn't parse SVGserie for type: %d"),type); return FALSE; } if (g->svg[type] != NULL) { del_sprite_source(g->svg[type]); } g->svg[...
false
false
false
false
false
0
findDeviceByDeviceInterface(Solid::DeviceInterface::Type type) { QStringList result; FakeDevice *device; foreach (device, d->loadedDevices) { if (device->queryDeviceInterface(type)) { result.append(device->udi()); } } return result; }
false
false
false
false
false
0
mm_poke_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) { GPtrArray *modems; int i; if (dbus_g_proxy_end_call (proxy, call, NULL, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &modems, G_TYPE_INVALID)) { /* Don't care about the returned value, just free...
false
false
false
false
false
0
placeWindow(const FluxboxWindow &win, int head, int &place_x, int &place_y) { // check the resource placement and see if has changed // and if so update the strategy if (m_old_policy != *m_placement_policy || !m_strategy.get()) { m_old_policy = *m_placement_policy...
false
false
false
false
false
0
set_link_down_reason(struct hfi1_pportdata *ppd, u8 lcl_reason, u8 neigh_reason, u8 rem_reason) { if (ppd->local_link_down_reason.latest == 0 && ppd->neigh_link_down_reason.latest == 0) { ppd->local_link_down_reason.latest = lcl_reason; ppd->neigh_link_down_reason.latest = neigh_reason; ppd->remote_lin...
false
false
false
false
false
0
midgard_collector_set_offset( MidgardCollector *self, guint offset) { g_assert(self != NULL); MIDGARD_QUERY_BUILDER_GET_CLASS( self->priv->builder)->set_offset( self->priv->builder, offset); }
false
false
false
false
false
0
qos_redirectif(request_rec *r, qos_srv_config *sconf, apr_array_header_t *rules) { #ifdef AP_REGEX_H ap_regmatch_t regm[AP_MAX_REG_MATCH]; #else regmatch_t regm[AP_MAX_REG_MATCH]; #endif int i; qos_redirectif_entry_t *entries = (qos_redirectif_entry_t *)rules->elts; for(i = 0; i < rules->nelts; ++i) { qos...
false
false
false
false
false
0
getFragments(vector<int> levels, vector<int> curfrag, int level, OBAtom* patom, OBBond* pbond) { //Recursive routine to analyse schemical structure and populate fragset and ringset //Hydrogens,charges(except dative bonds), spinMultiplicity ignored const int Max_Fragment_Size = 7; int bo=0; if(pbond) { bo =...
false
false
false
false
false
0
trash_rename_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *buf, struct iatt *preoldparent, struct iatt *postoldparent, struct iatt *prenewparent, struct iatt *postnewparent) { ...
false
false
false
false
false
0
default_printer(http_t *http, /* I - Server connection */ char *printer) /* I - Printer name */ { ipp_t *request; /* IPP Request */ char uri[HTTP_MAX_URI]; /* URI for printer/class */ DEBUG_printf(("default_printer(%p, \"%s\")\n", http, printer)); /* * Build a CUPS_SET_DEFAULT request,...
false
false
false
false
false
0
RenderQuads( int numQuads, float *v, float *t, unsigned char *texture, int size[2], int reverseFlag ) { #ifdef GL_VERSI...
false
false
false
false
false
0
setgameparameter ( GameParameter num, int value ) { if ( game_parameter ) { if ( num < gameparameter_num ) game_parameter[num] = value; else { int* oldparam = game_parameter; game_parameter = new int[num+1]; for ( int i = 0; i < gameparameter_num; i++ ) game_param...
false
false
false
false
false
0
buildcanonicalcharlist(Datalist* list, size_t size, int fillchar, Constant* conp) { int i; Bytebuffer* buf = bbNew(); Constant* con = NULL; Constant newcon = nullconstant; if(list->length == 0) { /* If an empty list, then produce a string of size size using fillchar*/ for(i=0;i<size;i++...
false
false
false
false
false
0
loadTrueTypeFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, Gushort *codeToGIDA, int codeToGIDLenA, int faceIndexA) { FT_Face faceA; if (src->isFile) { if (FT_New_Face(engineA->lib, src->fileName->getCString(), faceIndexA, &faceA)) ...
false
false
false
false
false
0
attributes_list_find_real(attributes_list_ty *alp, const char *name, double default_value) { attributes_ty *ap = attributes_list_find(alp, name); if (!ap || !ap->value) return default_value; char *ep = 0; double result = strtod(ap->value->str_text, &ep); if (ep == ap->value->str_text || *ep) ...
false
false
false
false
false
0
categoryChildNumber() const { if (m_Parent) { QList<TreeItem *> cat; foreach(TreeItem *c, m_Parent->m_Children) { if (!c->isTemplate()) cat << c; } return cat.indexOf(const_cast<TreeItem*>(this)); } return 0;...
false
false
false
false
false
0
Marg_poker(const struct vev *e, int what) { struct vsb *vsb; int s, k; socklen_t l; (void)what; /* XXX: ??? */ if (e == M_conn) { /* Our connect(2) returned, check result */ l = sizeof k; AZ(getsockopt(M_fd, SOL_SOCKET, SO_ERROR, &k, &l)); if (k) { errno = k; syslog(LOG_INFO, "Could not connect to ...
false
false
false
false
false
0
shrinkBoxesWithNoTextChildren(int topPos, int bottomPos) { // First shrink our kids. for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { if (curr->object()->isPositioned()) continue; // Positioned placeholders don't affect calculations. if (curr->isInlineFlowBox(...
false
false
false
false
false
0
Address_Scan_Init(void) { int num_interfaces = 0; int fd; /* get info about all interfaces */ ifc.ifc_len = 0; SNMP_FREE(ifc.ifc_buf); ifr_counter = 0; do { if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { DEBUGMSGTL(("snmpd", "socket open failure in Address_Scan_Init\n")); ...
false
false
false
false
false
0
build_variant_list (tree qual_union_type, vec<subst_pair> subst_list, vec<variant_desc> gnu_list) { tree gnu_field; for (gnu_field = TYPE_FIELDS (qual_union_type); gnu_field; gnu_field = DECL_CHAIN (gnu_field)) { tree qual = DECL_QUALIFIER (gnu_field); unsigned int i; subs...
false
false
false
false
false
0
parse_next(FILE *fd, struct blkid_config *conf) { char buf[BUFSIZ]; char *s; /* read the next non-blank non-comment line */ do { if (fgets (buf, sizeof(buf), fd) == NULL) return feof(fd) ? 0 : -1; s = strchr (buf, '\n'); if (!s) { /* Missing final newline? Otherwise extremely */ /* long line - assu...
true
true
false
false
true
1
happy_meal_mif_interrupt(struct happy_meal *hp) { void __iomem *tregs = hp->tcvregs; printk(KERN_INFO "%s: Link status change.\n", hp->dev->name); hp->sw_bmcr = happy_meal_tcvr_read(hp, tregs, MII_BMCR); hp->sw_lpa = happy_meal_tcvr_read(hp, tregs, MII_LPA); /* Use the fastest transmission protocol possible. */ ...
false
false
false
false
false
0
query_execute_select(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>& builder, bool use_cursor) { Glib::RefPtr<Gnome::Gda::DataModel> result; //TODO: BusyCursor busy_cursor(get_app_window()); Glib::RefPtr<Gnome::Gda::Connection> gda_connection = get_connection(); if(!gda_connection) { std::cerr << G_ST...
false
false
false
false
false
0
vmxnet3_flush_rx ( struct net_device *netdev ) { struct vmxnet3_nic *vmxnet = netdev_priv ( netdev ); struct io_buffer *iobuf; unsigned int i; for ( i = 0 ; i < VMXNET3_NUM_RX_DESC ; i++ ) { if ( ( iobuf = vmxnet->rx_iobuf[i] ) != NULL ) { netdev_rx_err ( netdev, iobuf, -ECANCELED ); vmxnet->rx_iobuf[i] = ...
false
false
false
false
false
0
text_key_find(struct iscsi_connection *conn, char *searchKey) { char *data, *key, *value; int keylen, datasize; keylen = strlen(searchKey); data = conn->req.data; datasize = conn->req.datasize; while (1) { for (key = data; datasize > 0 && *data != '='; data++, datasize--) ; if (!datasize) return NULL;...
false
false
false
false
false
0
ParseNet(packet) char *packet; { FILE *uu; char buf[255], *st; int connections=0; /* parse received */ if ( (uu=popen("netstat | wc","r")) == NULL ) perror("popen netstat error"); st=fgets(buf, 255, uu); sscanf(buf,"%d", &connections); sprintf(buf, "NET: connections %d ", connections); strcat(packet, buf); #ifdef T...
false
false
false
false
false
0
_ecore_evas_unref(Ecore_Evas *ee) { ee->refcount--; if (ee->refcount == 0) { if (ee->deleted) _ecore_evas_free(ee); } else if (ee->refcount < -1) ERR("Ecore_Evas %p->refcount=%d < 0", ee, ee->refcount); }
false
false
false
false
false
0
MakeDealignedString(char *aseq, int alen, char *ss, char **ret_s) { char *new; int apos, rpos; new = (char *) MallocOrDie ((alen+1) * sizeof(char)); for (apos = rpos = 0; apos < alen; apos++) if (! isgap(aseq[apos])) { new[rpos] = ss[apos]; rpos++; } new[rpos] = '\0'; if (alen != strle...
false
false
false
false
false
0
_elm_layout_smart_content_set(Evas_Object *obj, const char *part, Evas_Object *content) { Elm_Layout_Sub_Object_Data *sub_d; const Eina_List *l; ELM_LAYOUT_DATA_GET(obj, sd); if (!_elm_layout_part_aliasing_eval(sd, &part, EINA_FALSE)) return...
false
false
false
false
false
0
dfb_input_device_at( DFBInputDeviceID id ) { CoreInputDevice *device; D_ASSERT( core_input != NULL ); direct_list_foreach (device, core_local->devices) { D_MAGIC_ASSERT( device, CoreInputDevice ); if (device->shared->id == id) return device; } return NULL;...
false
false
false
false
false
0
gkrellm_cut_quoted_string(gchar *src, gchar **endptr) { gchar *s; while (*src == ' ' || *src == '\t') ++src; if (*src == '"') { s = strchr(++src, '"'); if (s == NULL) { if (endptr) *endptr = src; g_warning(_("Unterminated quote\n")); return NULL; } *s = '\0'; if (endptr) *endptr =...
false
false
false
false
false
0
LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) { MDNode *Loc = L ? unwrap<MDNode>(L) : NULL; unwrap(Builder)->SetCurrentDebugLocation(DebugLoc::getFromDILocation(Loc)); }
false
false
false
false
false
0
e_option_supplied() { if (strcmp(ruby_sourcefile, "-e") == 0) return Qtrue; return Qfalse; }
false
false
false
false
false
0
gretl_fix_exponent (char *s) { char *p; int n; if ((p = strstr(s, "+00")) || (p = strstr(s, "-00"))) { if (*(p+3)) { memmove(p+1, p+2, strlen(p+1)); } } n = strlen(s); if (s[n-1] == '.' || s[n-1] == ',') { /* delete trailing junk */ s[n-1] = '\0'; } return s; }
false
false
false
false
false
0
lt_set_time64(struct lt_trace *lt, lxttime_t timeval) { int rc=0; if(lt) { struct lt_timetrail *trl=(struct lt_timetrail *)calloc(1, sizeof(struct lt_timetrail)); if(trl) { trl->timeval = timeval; trl->position = lt->position; if((lt->timecurr)||(lt->timebuff)) { if(((timeval>lt->mintime)&&(timeval>l...
false
false
false
false
false
0
hba_ioctl_tunnel(struct esas2r_adapter *a, struct atto_ioctl *hi, struct esas2r_request *rq, struct esas2r_sg_context *sgc) { esas2r_sgc_init(sgc, a, rq, rq->vrq->ioctl.sge); esas2r_build_ioctl_req(a, rq, sgc->length, VDA_IOCTL_HBA); if (!esas2r_build_sg_list(a, rq, sgc)) { hi->status = A...
false
false
false
false
false
0
luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { Table *mt; switch (ttnov(o)) { case LUA_TTABLE: mt = hvalue(o)->metatable; break; case LUA_TUSERDATA: mt = uvalue(o)->metatable; break; default: mt = G(L)->mt[ttnov(o)]; } return (mt ? luaH_getstr(mt, G(L)->tm...
false
false
false
false
false
0
emit (pIIR_TypeList c) { while (c == NULL) { printf ("["); emit (c->first); printf ("]"); c = c->rest; } }
false
false
false
false
false
0
connect(Signal signal, QObject* receiver, const char* slot) { if (signal == ScrollBarValueChanged) { QObject::connect(m_view->horizontalScrollBar(), SIGNAL(valueChanged(int)), receiver, slot); QObject::connect(m_view->verticalScrollBar(), SIGNAL(valueChanged(int)), receiver, slot); } }
false
false
false
false
false
0
__glXSendLargeImage(struct glx_context * gc, GLint compsize, GLint dim, GLint width, GLint height, GLint depth, GLenum format, GLenum type, const GLvoid * src, GLubyte * pc, GLubyte * modes) { /* Allocate a temporary holding buffer */ GLubyte *buf = ma...
false
true
false
false
true
1
s_open(const char *path, int oflag, ...) { int s; mode_t mode = 0; if (oflag & O_CREAT) { va_list ap; va_start(ap, oflag); /* FIXME: need to use widened form of mode_t here. */ mode = va_arg(ap, int); va_end(ap); } while ((s = open(path, oflag, mode)) < 0 && errno == EINTR...
false
false
false
false
false
0
hatsuda_hit(tenm_object *my, tenm_object *your) { /* sanity check */ if (my == NULL) { fprintf(stderr, "hatsuda_hit: my is NULL\n"); return 0; } if (your == NULL) { fprintf(stderr, "hatsuda_hit: your is NULL\n"); return 0; } if (!(your->attr & ATTR_PLAYER_SHOT)) return 0; if ((my-...
false
false
false
false
false
0
TextPeerID(const unsigned char *peerid, char *txtid) { int i, j; for(i=j=0; i < PEER_ID_LEN; i++){ if( i==j && isprint(peerid[i]) && !isspace(peerid[i]) ) txtid[j++] = peerid[i]; else{ if(i==j){ sprintf(txtid+j, "0x"); j+=2; } snprintf(txtid+j, 3, "%.2X", (int)(peerid[i])); j += 2; ...
false
false
false
false
false
0
timer() { struct timeval t_p; double time; if (!gettimeofday(&t_p, NULL)) time = (double) t_p.tv_sec + ((double) t_p.tv_usec)/1000000.0; else printf("\n mal tiempo \n"); return time; }
false
false
false
false
true
1
w_ko_explode(tenm_object *my) { int n; /* sanity check */ if (my == NULL) return; tenm_table_apply_all((int (*)(tenm_object *, int)) (&delete_enemy_shot), 0); tenm_table_apply_all((int (*)(tenm_object *, int)) (&delete_enemy), 0); /* don't modify my->attr or my->hit_mask here, or the player shot *...
false
false
false
false
false
0
png_image_write_to_file(png_imagep image, const char *file_name, int convert_to_8bit, const void *buffer, png_int_32 row_stride, const void *colormap) { /* Write the image to the named file. */ if (image != NULL && image->version == PNG_IMAGE_VERSION) { if (file_name != NULL) { FILE ...
false
false
false
false
true
1
start_iaa_cycle(struct fotg210_hcd *fotg210, bool nested) { /* * Do nothing if an IAA cycle is already running or * if one will be started shortly. */ if (fotg210->async_iaa || fotg210->async_unlinking) return; /* Do all the waiting QHs at once */ fotg210->async_iaa = fotg210->async_unlink; fotg210->async...
false
false
false
false
false
0
megasas_set_crash_dump_params(struct megasas_instance *instance, u8 crash_buf_state) { int ret = 0; struct megasas_cmd *cmd; struct megasas_dcmd_frame *dcmd; cmd = megasas_get_cmd(instance); if (!cmd) { dev_err(&instance->pdev->dev, "Failed to get a free cmd\n"); return -ENOMEM; } dcmd = &cmd->frame->dc...
false
false
false
false
false
0
tv_add(struct timeval *tv, int usec_delay) { if (usec_delay >= USEC) { tv->tv_sec += usec_delay / USEC; usec_delay %= USEC; } tv->tv_usec += usec_delay; if (tv->tv_usec >= USEC) { tv->tv_sec += tv->tv_usec / USEC; tv->tv_usec %= USEC; } }
false
false
false
false
false
0
_eval_instance_size(Instance *inst) { Evas_Coord mw, mh, omw, omh; edje_object_size_min_get(inst->o_clock, &mw, &mh); omw = mw; omh = mh; if ((mw < 1) || (mh < 1)) { Evas_Coord x, y, sw = 0, sh = 0, ow, oh; Eina_Bool horiz; const char *orient; switch (inst->gcc->ga...
false
false
false
false
false
0
AcpiUtMethodError ( const char *ModuleName, UINT32 LineNumber, const char *Message, ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, ACPI_STATUS MethodStatus) { ACPI_STATUS Status; ACPI_NAMESPACE_NODE ...
false
false
false
false
false
0
isDepthAxis(const char *stdname, const char *longname) { int status = FALSE; if ( strcmp(stdname, "depth") == 0 ) status = TRUE; if ( status == FALSE ) if ( strcmp(longname, "depth_below_sea") == 0 || strcmp(longname, "depth below sea") == 0 ) { status = TRUE; } return (stat...
false
false
false
false
false
0
galois_get_mult_table(int w) { if (galois_mult_tables[w] == NULL) { if (galois_create_mult_tables(w)) { return NULL; } } return galois_mult_tables[w]; }
false
false
false
false
false
0
configure_widget_destroyed (GtkWidget *widget, gpointer data) { GtrCodeViewConfigureWidget *conf_widget = (GtrCodeViewConfigureWidget *)data; g_object_unref (conf_widget->settings); g_slice_free (GtrCodeViewConfigureWidget, conf_widget); }
false
false
false
false
false
0
create_stored_device_from_primaries(char *key, char *value, void *user_data) { struct btd_adapter *adapter = user_data; struct btd_device *device; GSList *services, *uuids, *l; char address[18]; uint8_t bdaddr_type; if (sscanf(key, "%17s#%hhu", address, &bdaddr_type) < 2) return; if (g_slist_find_cust...
false
false
false
false
false
0
Status_print_palette_color(byte color) { char str[25]; int i; strcpy(str,Menu_tooltip[BUTTON_CHOOSE_COL]); sprintf(str+strlen(str),"%d (%d,%d,%d)",color,Main_palette[color].R,Main_palette[color].G,Main_palette[color].B); // Pad spaces for (i=strlen(str); i<24; i++) str[i]=' '; str[24]='\0'; Pr...
true
true
false
false
false
1
set_csum_offload(struct petp *tp, u32 csum_bit, int enable) { u32 val = readl(tp->adapter->regs + A_TP_GLOBAL_CONFIG); if (enable) val |= csum_bit; else val &= ~csum_bit; writel(val, tp->adapter->regs + A_TP_GLOBAL_CONFIG); }
false
false
false
false
false
0
expand(_LHASH *lh) { LHASH_NODE **n,**n1,**n2,*np; unsigned int p,i,j; unsigned long hash,nni; lh->num_nodes++; lh->num_expands++; p=(int)lh->p++; n1= &(lh->b[p]); n2= &(lh->b[p+(int)lh->pmax]); *n2=NULL; /* 27/07/92 - eay - undefined pointer bug */ nni=lh->num_alloc_nodes; for (np= *n1; np != NUL...
false
false
false
false
false
0
EnsureValid(const MCFragment *F) const { // Advance the layout position until the fragment is up-to-date. while (!isFragmentUpToDate(F)) { // Advance to the next fragment. MCFragment *Cur = LastValidFragment; if (Cur) Cur = Cur->getNextNode(); if (!Cur) { unsigned NextIndex = 0; if...
false
false
false
false
false
0
money_widget_remove(MoneyWidget *moneyWidget, MoneyEuroType value) { g_return_if_fail (moneyWidget != NULL); moneyWidget->priv->total -= euroList[value].value; money_display_total(moneyWidget); }
false
false
false
false
false
0
picolcd_fb_update(struct fb_info *info) { int chip, tile, n; unsigned long flags; struct picolcd_fb_data *fbdata = info->par; struct picolcd_data *data; mutex_lock(&info->lock); spin_lock_irqsave(&fbdata->lock, flags); if (!fbdata->ready && fbdata->picolcd) picolcd_fb_reset(fbdata->picolcd, 0); spin_unlock_...
false
false
false
false
false
0
onDistanceValueEdited(GtkCellRendererText *cellrenderertext _U_, gchar *path, gchar *text, gpointer user_data) { gboolean valid; GtkTreeIter iter, iterFilter, iterSort; float value; char *error; VisuPairLink *pdata; int res, id; DBG_fprintf(stderr, "Gtk Pairs: distance (%d) edited '%s'.\n", ...
false
false
false
false
false
0
fs_list_remove_all(fs_list *list, const void * data) { fs_list *tmp = list; while (tmp) { if (tmp->data != data) tmp = tmp->next; else { fs_list *next = tmp->next; if (tmp->prev) tmp->prev->next = next; else list = next; if (next) next->prev = tm...
false
false
false
false
true
1