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
kirkwood_get_temp(struct thermal_zone_device *thermal, int *temp) { unsigned long reg; struct kirkwood_thermal_priv *priv = thermal->devdata; reg = readl_relaxed(priv->sensor); /* Valid check */ if (!((reg >> KIRKWOOD_THERMAL_VALID_OFFSET) & KIRKWOOD_THERMAL_VALID_MASK)) { dev_err(&thermal->device, ...
false
false
false
false
false
0
bndry(bndryp) STRM_BOUNDARY *bndryp; { int i; if (streaminfo.level != 1 && streaminfo.test) return (-1); streaminfo.level = 2; strm_beginrecord(4, BOUNDARY, 0); strm_beginrecord(6, LAYER, 2); strm_intcopy(bndryp->bnd_layer); strm_beginrecord(6, DATATYPE, 2); strm_intcopy(bndryp->bnd_da...
false
false
false
false
false
0
cm_recv_handler(struct ib_mad_agent *mad_agent, struct ib_mad_recv_wc *mad_recv_wc) { struct cm_port *port = mad_agent->context; struct cm_work *work; enum ib_cm_event_type event; u16 attr_id; int paths = 0; int going_down = 0; switch (mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) { case CM_REQ_ATTR_ID: ...
false
false
false
false
false
0
ar9003_hw_iqcal_collect(struct ath_hw *ah) { int i; /* Accumulate IQ cal measures for active chains */ for (i = 0; i < AR5416_MAX_CHAINS; i++) { if (ah->txchainmask & BIT(i)) { ah->totalPowerMeasI[i] += REG_READ(ah, AR_PHY_CAL_MEAS_0(i)); ah->totalPowerMeasQ[i] += REG_READ(ah, AR_PHY_CAL_MEAS_1(i));...
false
false
false
false
false
0
buildIdString(const QString& managerName, const QMap<QString, QString>& params, const QString& engineIdString) { // the constructed id string will be of the form: "qtorganizer:managerName:param1=value1&param2=value2: QString ret(QLatin1String("qtorganizer:%1:%2:%3")); // we have to escape each param QS...
false
false
false
false
false
0
nikonSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const /*pRoot*/) { if (size < 4) return -1; const NikonArrayIdx* aix = find(nikonArrayIdx, NikonArrayIdx::Key(tag, reinterpret_cast<const char*>(pData), size)); return aix == 0 ? -1 : aix->idx_; }
false
false
false
false
false
0
snd_sonicvibes_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct sonicvibes *sonic = snd_kcontrol_chip(kcontrol); int left_reg = kcontrol->private_value & 0xff; int right_reg = (kcontrol->private_value >> 8) & 0xff; int shift_left = (kcontrol->private_value >> 16) & 0x07; int ...
false
false
false
false
false
0
GetVariable(const char *scope, const char *lval, void **returnv, char *rtype) { struct Scope *ptr = NULL; char scopeid[CF_MAXVARSIZE],vlval[CF_MAXVARSIZE],sval[CF_MAXVARSIZE]; char expbuf[CF_EXPANDSIZE]; CfAssoc *assoc; Debug("\nGetVariable(%s,%s) type=(to be determined)\n",scope,lval); if (lval == NULL) ...
false
false
false
false
false
0
kwsexec(kws, text, size, kwsmatch) kwset_t kws; char *text; size_t size; struct kwsmatch *kwsmatch; { struct kwset *kwset; char *ret; kwset = (struct kwset *) kws; if (kwset->words == 1 && kwset->trans == 0) { ret = bmexec(kws, text, size); if (kwsmatch != 0 && ret != 0) { ...
false
false
false
false
false
0
inet_get_devname(int sockfd, int index, char *devname) { int ret; struct ifreq req; req.ifr_ifru.ifru_ivalue = index; ret = ioctl(sockfd, SIOCGIFNAME, &req); if (ret < 0) { print_error("get devices name"); return ret; } text_copy(devname, req.ifr_ifrn.ifrn_name); return 0; }
false
false
false
false
false
0
open_include_file (filename, include_filename, searchptr, importing, pinc) char *filename; char *include_filename; struct file_name_list *searchptr; U_CHAR *importing; struct include_file **pinc; { char *fname = remap_include_file (filename, searchptr); int fd = -2; /* Look up FNAME in i...
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 = (struct sd *) gspca_dev; int skip = sizeof(struct stk1135_pkt_header); bool flip; enum gspca_packet_type pkt_type = INTER_PACKET; struct stk1135_pkt_header *hdr = (void *)data; u8 seq;...
false
false
false
false
false
0
index_reloptions(RegProcedure amoptions, Datum reloptions, bool validate) { FmgrInfo flinfo; FunctionCallInfoData fcinfo; Datum result; Assert(RegProcedureIsValid(amoptions)); /* Assume function is strict */ if (!PointerIsValid(DatumGetPointer(reloptions))) return NULL; /* Can't use OidFunctionCallN becaus...
false
false
false
false
false
0
StartDataElement( const Tag & t ) { Self->InvokeEvent( StartEvent() ); const char *outfilename = OutFilename.c_str(); assert( outfilename ); actualde = 0; { std::ifstream is( outfilename, std::ios::binary ); if( !is.good() ) return false; std::set<Tag> tagset; tagset.i...
false
false
false
false
false
0
parseSuffix(UnicodeString& result) { int32_t n = result.indexOf(PREFIX_DELIMITER); if (n >= 0) { result.remove(0, n+1); } return result; }
false
false
false
false
false
0
html_utf8_getc (const unsigned char **in, const unsigned char *inend) { register const unsigned char *inptr = *in; register unsigned char c, r; register gunichar u, m; if (inptr == inend) return 0; while (inptr < inend) { r = *inptr++; loop: if (r < 0x80) { *in = inptr; return r; } else if (r < ...
false
false
false
false
false
0
LineTo(int x, int y) //An implementation of "Bresenham's line algorithm." { int slope = 1; int dx, dy; int eInc, neInc; int d, y2; int tempX = x; int tempY = y; bool isSteep = fabs(posY-double(y)) >= fabs(posX-double(x)); //Bresenham's method works only for line's whose...
false
false
false
false
false
0
ompi_osc_rdma_compare_and_swap (void *origin_addr, void *compare_addr, void *result_addr, struct ompi_datatype_t *dt, int target, OPAL_PTRDIFF_TYPE target_disp, struct ompi_win_t *win) { ompi_osc_rdma_module_...
false
true
false
false
false
1
compass_command(struct i2c_client *c, u8 cmd) { int ret = i2c_master_send(c, &cmd, 1); if (ret < 0) dev_warn(&c->dev, "command '%c' failed.\n", cmd); return ret; }
false
false
false
false
false
0
pattern_compare(char *buf, int length, int seed) { char *tmp; int retval = -1; tmp = pattern_get_data(length, seed); if (tmp != NULL) { retval = memcmp(tmp, buf, length); free(tmp); } return retval; }
false
false
false
false
true
1
cb_panel_enter(GtkWidget *w, GdkEventButton *ev, MeminfoMeter *mm) { if (mm->label_is_data) mm->mouse_entered = TRUE; return FALSE; }
false
false
false
false
false
0
check_block (int block_x, int block_y, int block_mask) { uint32_t data[BLOCK_SIZE * BLOCK_SIZE]; int qx, qy; /* Block mask represents which quarters of the block should be filled. The bits from 0->3 represent the top left, top right, bottom left and bottom right respectively */ cogl_framebuffer_read...
false
false
false
false
false
0
IsReservedGlslKeyword (const std::string& name) { static const char* s_reservedKeywords[] = { // "const", "uniform", "layout", "centroid", "flat", "smooth", // "break", // "continue", // "do", // "for", // "while", // "switch", // "case", // "default", // "if", // "else", // "in", // "out", "i...
false
false
false
false
false
0
filterGlyph(le_uint32 index) { LEGlyphID glyphID = glyphStorage[index]; if (!filterCacheValid || filterCache.id != glyphID) { filterCache.id = glyphID; le_bool &filterResult = filterCache.result; // NB: Making this a reference to accept the updated value, in case ...
false
false
false
false
false
0
_exif_extra_get(int fd, int abs_offset, int len, struct lms_image_info *info) { if (lseek(fd, abs_offset, SEEK_SET) == -1) { perror("lseek"); return -1; } if (_jpeg_info_get(fd, len, info) != 0) { fprintf(stderr, "ERROR: could not get image size.\n"); return -2; } re...
false
false
false
false
false
0
uip_arp_arpin(nic_interface_t *nic_iface, struct uip_stack *ustack, packet_t *pkt) { struct arp_hdr *arp; struct uip_eth_hdr *eth; if (pkt->buf_size < sizeof(struct arp_hdr)) { pkt->buf_size = 0; return; } pkt->buf_size = 0; eth = (struct uip_eth_hdr *)pkt->data_link_layer; arp = (struct arp_hdr *)p...
false
true
false
false
false
1
createMipsMCInstPrinter(const Target &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCSubtargetInfo &STI) { return new MipsInstPrinter(MAI); }
false
false
false
false
false
0
scanImage(QImage & image, double bWidth, double bHeight, double pixelFactor, double res, const QString & colorString, bool makeConnectorFlag, bool makeOffset, QSizeF minAreaInches, double minDimensionInches, QPointF polygonOffset) { QList<QRect> rects; scanLines(image, bWidth, bHeight, rects);...
false
false
false
false
false
0
set_longest_orf(struct seq_col *in_seq_col) { int i; struct seq_col *ret_seq_col; struct seq *seq, *input_seq; if((ret_seq_col = calloc(1,sizeof(struct seq_col)))==NULL) { error("set_longest_orf(): Out of memory "); } if((ret_seq_col->seqs = calloc((in_seq_col->length),sizeof(struct seq)))==NULL) { error(...
false
false
false
false
false
0
oct_set_mat(oct_internal_t* pr, oct_t* a, bound_t* m, bound_t* closed, bool destructive) { oct_t* r; if (destructive) { /* free non-aliased matrices */ if (a->m && a->m!=m && a->m!=closed) hmat_free(pr,a->m,a->dim); if (a->closed && a->closed!=m && a->closed!=closed) hmat_free(pr,a->clo...
false
false
false
false
false
0
mark_exp_read (tree exp) { switch (TREE_CODE (exp)) { case VAR_DECL: case PARM_DECL: DECL_READ_P (exp) = 1; break; case ARRAY_REF: case COMPONENT_REF: case MODIFY_EXPR: case REALPART_EXPR: case IMAGPART_EXPR: CASE_CONVERT: case ADDR_EXPR: mark_exp_read (TREE_O...
false
false
false
false
true
1
mono_file_map_fileio (size_t length, int flags, int fd, guint64 offset, void **ret_handle) { guint64 cur_offset; size_t bytes_read; void *ptr = (*alloc_fn) (length); if (!ptr) return NULL; cur_offset = lseek (fd, 0, SEEK_CUR); if (lseek (fd, offset, SEEK_SET) != offset) { (*release_fn) (ptr); return NULL; ...
false
false
false
false
false
0
qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha) { struct dev_db_entry *fw_ddb_entry = NULL; dma_addr_t fw_ddb_entry_dma; uint16_t max_ddbs; uint16_t idx = 0; int ret = QLA_SUCCESS; fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), &fw_ddb_entry_dma, GFP_KERNEL); if (!fw_d...
false
false
false
false
false
0
drawColor(Stream &stream, Color color, const char *gray, const char *rgb) { if (color.isGray()) stream << color.iRed << " " << gray << "\n"; else stream << color << " " << rgb << "\n"; }
false
false
false
false
false
0
elm_5node_quad_shape_functions() { double u,v; int i,j; for( i=0; i<5; i++ ) { u = NodeU[i]; v = NodeV[i]; A[i][0] = 1; A[i][1] = u; A[i][2] = v; A[i][3] = u*v; A[i][4] = u*u*v*v; } lu_mtrinv( (double *)A,5 ); fo...
false
false
false
false
false
0
brasero_jacket_view_set_line_attributes (GtkTextView *view, PangoLayout *layout, GtkTextIter *start, GtkTextIter *end) { PangoAttrList *attributes = NULL; GtkTextAttributes *text_attr; GSList *open_attr = NULL; PangoAlignment alignment; GtkTextIter iter; attri...
false
false
false
false
false
0
connection_op_new (GSimpleAsyncResult *simple, GCancellable *cancellable) { ConnectionOp *op; op = g_slice_new0 (ConnectionOp); op->ref_count = 1; g_mutex_init (&op->simple_lock); op->simple = g_object_ref (simple); if (G_IS_CANCELLABLE (cancellable)) op->cancellable = g_object_ref (cancell...
false
false
false
false
false
0
pg_utf8_islegal(const unsigned char *source, int length) { unsigned char a; switch (length) { default: /* reject lengths 5 and 6 for now */ return false; case 4: a = source[3]; if (a < 0x80 || a > 0xBF) return false; /* FALL THRU */ case 3: a = source[2]; if (a < 0x80 || a > 0xBF) ...
false
false
false
false
false
0
fax_connect_info_command(dword Id, PLCI *plci, byte Rc) { word Info; word internal_command; dbug(1, dprintf("[%06lx] %s,%d: fax_connect_info_command %02x %04x", UnMapId(Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command)); Info = GOOD; internal_command = plci->internal_command; plci->internal_command...
false
false
false
false
false
0
mpi_task_write_send_data_transfer_functions(fsbe_context *cx) { Module_table *module; List *nt_set_list; List *nt_elem_list; for( module = module_head; module != NULL; module = module->next){ nt_set_list = mpi_task_make_send_nt_set_list(module); nt_elem_list = mpi_task_make_send_nt_elem_list(nt_set_l...
false
false
false
false
false
0
ucfg_read_file(ucfg_node **dest, const char *filename) { int retval; FILE *f = fopen(filename, "r"); if (!f) { retval = UCFG_ERR_FILE_READ; } else { retval = ucfg_read(dest, f); fclose(f); } return retval; }
false
false
false
false
false
0
setMasterScrollArea(QScrollArea *scrollArea) { masterScrollArea = scrollArea; if (masterScrollArea) { masterScrollArea->viewport()->installEventFilter(this); } }
false
false
false
false
false
0
H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags/*out*/, size_t *cd_nelmts/*in_out*/, unsigned cd_values[]/*out*/, size_t namelen, char name[]/*out*/, unsigned *filter_config /*out*/) { FUNC_ENTER_NOAPI_NOINIT_NOERR /* Check arguments */ HDassert(filter); /* Filter flags...
false
false
false
false
false
0
writeComp(AbstractFile* file, const void* data, size_t len) { InfoComp* info = (InfoComp*) (file->data); while((info->offset + (size_t)len) > info->header.length_uncompressed) { info->header.length_uncompressed = info->offset + (size_t)len; info->buffer = realloc(info->buffer, info->header.length_uncompressed); ...
false
false
false
false
false
0
ReBroadcast( int exceptTo ) { // rebroadcast message to all non-voters that may be able to vote if ( sn_GetNetState() == nSERVER ) { // prepare message tOutput voteMessage; voteMessage.SetTemplateParameter( 1, suggestor_->Name( user_ ) ); voteM...
false
false
false
false
false
0
report_errors (AnjutaCommand *command, guint return_code) { gchar *message; if (return_code != 0) { message = anjuta_command_get_error_message (command); anjuta_util_dialog_error (NULL, message); g_free (message); } }
false
false
false
false
false
0
gnc_tree_control_split_reg_get_account_by_name (GncTreeViewSplitReg *view, const char *name) { GtkWidget *window; const char *placeholder = _("The account %s does not allow transactions."); const char *missing = _("The account %s does not exist. " "Would you like to create it?");...
false
false
false
false
false
0
setLeaves(t_Node* ptTree) { if(ptTree->nId != INTERNAL){ ptTree->nLeaves = 1; } else{ if(ptTree->ptLeft->nLeaves < 0){ setLeaves(ptTree->ptLeft); } if(ptTree->ptRight->nLeaves < 0){ setLeaves(ptTree->ptRight); } ptTree->nLeaves = ptTree->ptLeft->nLeaves + ptTree->ptRigh...
false
false
false
true
false
1
x86_64_thread_return_init(void) { struct syment *sp, *spn; ulong address; if ((sp = kernel_symbol_search("thread_return"))) { machdep->machspec->thread_return = sp->value; return; } if ((sp = kernel_symbol_search("schedule")) && (spn = next_symbol(NULL, sp)) && (address = search_for_switch_to(sp->v...
false
false
false
false
false
0
intensity(uchar c) { if (c < _pixmin) _pixmin = c; if (c > _pixmax) _pixmax = c; return c; }
false
false
false
false
false
0
gl_array_remove_at (gl_list_t list, size_t position) { size_t count = list->count; const void **elements; size_t i; if (!(position < count)) /* Invalid argument. */ abort (); elements = list->elements; if (list->base.dispose_fn != NULL) list->base.dispose_fn (elements[position]); for (i = po...
false
false
false
false
false
0
knowledge_read_player_data(knowledge_player *kp) { FILE *file; char final[MAX_BUF], read[MAX_BUF], *dot; knowledge_item *item; const knowledge_type *type; snprintf(final, sizeof(final), "%s/%s/%s/%s.knowledge", settings.localdir, settings.playerdir, kp->player_name, kp->player_name); file = fo...
true
true
false
false
true
1
adf_put_admin_msg_sync(struct adf_accel_dev *accel_dev, u32 ae, void *in, void *out) { struct adf_admin_comms *admin = accel_dev->admin; int offset = ae * ADF_ADMINMSG_LEN * 2; void __iomem *mailbox = admin->mailbox_addr; int mb_offset = ae * ADF_DH895XCC_MAILBOX_STRIDE; int times, received; mutex_lock(&ad...
false
true
false
false
false
1
gfx_free_color(gfx_palette_t *pal, gfx_pixmap_color_t *color) { gfx_palette_color_t *palette_color = pal->colors + color->global_index; if (!pal) return GFX_OK; if (color->global_index == GFX_COLOR_INDEX_UNMAPPED) { GFXWARN("Attempt to free unmapped color %02x/%02x/%02x!\n", color->r, color->g, color->b); BR...
false
false
false
true
false
1
qpol_type_t_get_isattr(qpol_type_t *self,qpol_policy_t *p){ unsigned char i; BEGIN_EXCEPTION if (qpol_type_get_isattr(p, self, &i)) { {SWIG_JavaException(local_jenv, SWIG_ValueError, "Could not determine whether type is an attribute"); goto fail;}; } END_EXCEPTION fail: return (int)i; }
false
false
false
false
false
0
git_cache_clear(git_cache *cache) { if (git_rwlock_wrlock(&cache->lock) < 0) return; clear_cache(cache); git_rwlock_wrunlock(&cache->lock); }
false
false
false
false
false
0
db_verb_allows(db_verb_handle h, Objid progr, db_verb_flag flag) { return ((db_verb_flags(h) & flag) || progr == db_verb_owner(h) || is_wizard(progr)); }
false
false
false
false
false
0
swap(void) { long nos_temp; /* Next-On-Stack temp */ if ( min_stack_depth(2) ) { nos_temp = dstack[1]; dstack[1]= dstack[0]; dstack[0]= nos_temp; } }
false
false
false
false
false
0
vtkXMLWriterC_New() { if(vtkXMLWriterC* self = new vtkXMLWriterC) { // Initialize the object. self->Writer = 0; self->DataObject = 0; self->Writing = 0; return self; } else { vtkGenericWarningMacro("Failed to allocate a vtkXMLWriterC object."); return 0; } }
false
false
false
false
false
0
ario_cover_remove_cover (const gchar *artist, const gchar *album) { ARIO_LOG_FUNCTION_START; gchar *small_ario_cover_path; gchar *ario_cover_path; if (!ario_cover_cover_exists (artist, album)) return; /* Delete the small cover*/ ...
false
false
false
false
false
0
init_menus_edit() { using namespace Gtk; //Edit menu //Build actions: m_refEditActionGroup = Gtk::ActionGroup::create("BakeryEditActions"); m_refEditActionGroup->add(Action::create("BakeryAction_Menu_Edit", _("_Edit"))); m_refEditActionGroup->add(Action::create("BakeryAction_Edit_Cut", Gtk::Stock::CUT...
false
false
false
false
false
0
dac33_soc_probe(struct snd_soc_codec *codec) { struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); int ret = 0; codec->control_data = dac33->control_data; codec->hw_write = (hw_write_t) i2c_master_send; dac33->codec = codec; /* Read the tlv320dac33 ID registers */ ret = dac33_hard_power(codec, 1...
false
false
false
false
false
0
mono_runtime_cleanup_handlers (void) { if (mini_get_debug_options ()->handle_sigint) remove_signal_handler (SIGINT); remove_signal_handler (SIGFPE); remove_signal_handler (SIGQUIT); remove_signal_handler (SIGILL); remove_signal_handler (SIGBUS); if (mono_jit_trace_calls != NULL) remove_signal_handler (SIGUSR...
false
false
false
false
false
0
ulNextLong(FILE *pFile) { ULONG ulLSW, ulMSW; ulLSW = (ULONG)usNextWord(pFile); if (ulLSW == (ULONG)EOF) { errno = EIO; return (ULONG)EOF; } ulMSW = (ULONG)usNextWord(pFile); if (ulMSW == (ULONG)EOF) { DBG_MSG("ulNextLong: Unexpected EOF"); errno = EIO; return (ULONG)EOF; } return (ulMSW << 16) | ulL...
false
false
false
false
false
0
getColor(KicadModule2Svg::PadLayer padLayer) { switch (padLayer) { case ToCopper0: return ViewLayer::Copper0Color; break; case ToCopper1: return ViewLayer::Copper1Color; break; default: DebugDialog::debug("kicad getcolor with unknown layer"); return "#FF0000"; } }
false
false
false
false
false
0
SetVerts (vtkCellArray* v) { if (v == this->Dummy) { v = NULL; } if ( v != this->Verts) { if (this->Verts) { this->Verts->UnRegister(this); } this->Verts = v; if (this->Verts) { this->Verts->Register(this); } this->Modified(); } }
false
false
false
false
false
0
shutdown_sysORTable(void) { #ifdef USING_MIBII_SYSTEM_MIB_MODULE if (system_module_count-- == 3) UNREGISTER_SYSOR_TABLE(system_module_oid, system_module_oid_len); #endif snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_UNREG_SYSOR, unregister_cb, NULL, ...
false
false
false
false
false
0
T1_ComputeLineParameters( int FontID, int mode, int width, float size, int *startx, int *endx, int *starty, int *endy) { float position=0.0, thickness=0.0; int startx1, startx2, endx1, endx2; if (mode & T1_UNDERLINE){ position=pFontBase->pFontArray[FontID].UndrLnPos * De...
false
true
false
false
false
1
cyclic_del_edge(graph_t *g, cmph_uint32 v, cmph_uint8 *deleted) { cmph_uint32 e = 0; cmph_uint8 degree1; cmph_uint32 v1 = v; cmph_uint32 v2 = 0; degree1 = find_degree1_edge(g, v1, deleted, &e); if (!degree1) return; while(1) { DEBUGP("Deleting edge %u (%u->%u)\n", e, g->edges[abs_edge(e, 0)], g->edges[abs_...
false
false
false
false
false
0
pn533_init_target_complete(struct pn533 *dev, struct sk_buff *resp) { u8 mode, *cmd, comm_mode = NFC_COMM_PASSIVE, *gb; size_t gb_len; int rc; dev_dbg(&dev->interface->dev, "%s\n", __func__); if (resp->len < ATR_REQ_GB_OFFSET + 1) return -EINVAL; mode = resp->data[0]; cmd = &resp->data[1]; dev_dbg(&dev->i...
false
false
false
false
false
0
ensurePartNumberProperty() { if (!m_properties.keys().contains(PartNumberPropertyName)) { m_properties.insert(PartNumberPropertyName, ""); m_displayKeys.append(PartNumberPropertyName); } }
false
false
false
false
false
0
analysis_parameter(int argc, char *const argv[]) { const struct option longopts[] = { {"help", 0, NULL, 'h'}, {"version", 0, NULL, 'v'}, {NULL, 0, NULL, 0} }; int opt; opterr = 0; while ((opt = getopt_long(argc, argv, "hv", longopt...
false
false
false
false
false
0
eg_getdtablesize (void) { #ifdef HAVE_GETRLIMIT struct rlimit limit; int res; res = getrlimit (RLIMIT_NOFILE, &limit); g_assert (res == 0); return limit.rlim_cur; #else return getdtablesize (); #endif }
false
false
false
false
false
0
nemo_file_undo_info_ownership_finalize (GObject *obj) { NemoFileUndoInfoOwnership *self = NEMO_FILE_UNDO_INFO_OWNERSHIP (obj); g_clear_object (&self->priv->target_file); g_free (self->priv->original_ownership); g_free (self->priv->new_ownership); G_OBJECT_CLASS (nemo_file_undo_info_ownership_parent_class)->final...
false
false
false
false
false
0
Maximize(Box *cube, BYTE dir, int first, int last , int *cut, LONG whole_r, LONG whole_g, LONG whole_b, LONG whole_w) { LONG half_r, half_g, half_b, half_w; int i; float temp; LONG base_r = Bottom(cube, dir, mr); LONG base_g = Bottom(cube, dir, mg); LONG base_b = Bottom(cube, dir, mb); LONG base_w =...
false
false
false
false
false
0
create_new_worker(int lock) { apr_thread_t *thread = NULL; CURL **curlptr = NULL; if (lock) { error_log(LOG_DEBUG, NULL, "Worker creation locking thread mutex."); if (APR_STATUS_IS_EBUSY(apr_thread_mutex_trylock(mutex))) { error_log(LOG_DEBUG, NULL, "Worker...
false
false
false
false
false
0
c_parser_omp_clause_default (c_parser *parser, tree list) { enum omp_clause_default_kind kind = OMP_CLAUSE_DEFAULT_UNSPECIFIED; location_t loc = c_parser_peek_token (parser)->location; tree c; if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) return list; if (c_parser_next_token_is (parse...
false
false
false
false
false
0
OS_DoIo(struct timeval *tmo) { int fd, len, selectStatus; OS_AsyncProc procPtr; ClientData clientData; AioInfo *aioPtr; fd_set readFdSetCpy; fd_set writeFdSetCpy; asyncIoInUse = TRUE; FD_ZERO(&readFdSetCpy); FD_ZERO(&writeFdSetCpy); for(fd = 0; fd <= maxFd; fd++) { if(F...
false
false
false
false
false
0
duplicate(RequestAttribute& req_attr) { id = req_attr.getAttributeId(); type = req_attr.getDataType(); issuer = req_attr.getIssuer(); node_ = req_attr.getNode(); attrval = (req_attr.getAttributeFactory())->createValue(node_, type); return *this; }
false
false
false
false
false
0
SDPConeCheckM(SDPCone sdpcone,int m){ DSDPFunctionBegin; SDPConeValid(sdpcone); if (m!=sdpcone->m){ DSDPSETERR1(4,"Check dimension of array. This problem has %d variables\n",sdpcone->m);} DSDPFunctionReturn(0); }
false
false
false
false
false
0
gst_video_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) { GstVideoSinkClass *klass; klass = GST_VIDEO_SINK_GET_CLASS (bsink); if (klass->show_frame == NULL) { if (parent_class->render != NULL) return parent_class->render (bsink, buf); else return GST_FLOW_OK; } GST_LOG_OBJECT (...
false
false
false
false
false
0
transformNoAux(const PrgRule& r, const PrgRule::RData&) const { return r.type() != CHOICERULE && (r.bound() == 1 || (r.body.size() <= 6 && choose((uint32)r.body.size(), r.bound()) <= 15)); }
false
false
false
false
false
0
__query_album_get_uri(mpd_Song *song, const gchar*data, gsize size) { GList *retv = NULL; char *temp_b = NULL; xmlDocPtr doc; xmlNodePtr root; /** * Get artist name */ if(size < 4 || strncmp(data, "<res",4)) { g_log(LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Invalid XML"); return NULL; } doc = xmlParseMemory(data...
false
false
false
false
false
0
fa_from_re(struct re *re) { struct fa *result = NULL; switch(re->type) { case UNION: { result = fa_from_re(re->exp1); if (result == NULL) goto error; struct fa *fa2 = fa_from_re(re->exp2); if (fa2 == NULL) goto error; ...
false
false
false
false
false
0
segment_create(opal_shmem_ds_t *ds_buf, const char *file_name, size_t size) { int rc = OPAL_SUCCESS; pid_t my_pid = getpid(); /* the real size of the shared memory segment. this includes enough space * to store our segment header. */ size_t real_size = size + siz...
true
true
false
false
false
1
cached_local_get(struct cat_star *cst[], struct catalog *cat, char *name, int n) { GList *lcat = cat->data; int i = 0, ret; struct cat_star *cats; g_return_val_if_fail(n != 0, 0); g_return_val_if_fail(name != NULL, 0); if (cat->hash == NULL) { while (lcat != NULL && i < n) { if (!strcasecmp(name, ...
false
false
false
false
false
0
udp_make(struct sockaddr *laddr) { struct udp_transport *t = 0; int s, on, wildcardaddress = 0; char *tstr; t = calloc(1, sizeof *t); if (!t) { log_print("udp_make: calloc (1, %lu) failed", (unsigned long)sizeof *t); free(laddr); return 0; } t->src = laddr; s = socket(laddr->sa_family, SOCK_DGRAM,...
false
false
false
false
false
0
translate_gene_sequence(GBDATA *gb_gene, GB_ERROR& error, int& translated_length, char *startCodon) { // return translation of gene sequence // the start codon is copied into result buffer 'startCodon' (has to be sized 4 bytes) size_t gene_length; char *gene_seq = GBT_read_gene_sequence_and_leng...
false
false
false
false
false
0
icmLuLut_get_lutranges ( struct _icmLuBase *pp, double *inmin, double *inmax, /* Return maximum range of inspace values */ double *outmin, double *outmax /* Return maximum range of outspace values */ ) { icmLuLut *p = (icmLuLut *)pp; unsigned int i; for (i = 0; i < p->lut->inputChan; i++) { inmin[i] = 0.0; /...
false
false
false
false
false
0
s_string_available(stream *s, gs_offset_t *pl) { *pl = sbufavailable(s); if (*pl == 0 && s->close_at_eod) /* EOF */ *pl = -1; return 0; }
false
false
false
false
false
0
flags_to_string(int flags) { char * access_mode_str = NULL; if ((flags & O_ACCMODE) == O_WRONLY) access_mode_str = "O_WRONLY"; else if ((flags & O_ACCMODE) == O_RDWR) access_mode_str = "O_RDWR"; else if ((flags & O_ACCMODE) == O_RDONLY) access_mode_str = "O_RDONLY"; return g_strdup_printf("access_mode=%s,...
false
false
false
false
false
0
dmi_cache_types(uint16_t code, const char *sep, char *array) { /* 3.3.8.2 */ static const char *types[] = { "Other", /* 0 */ "Unknown", "Non-burst", "Burst", "Pipeline Burst", "Synchronous", "Asynchronous" /* 6 */ }; if ((code & 0x007F) == 0) strcpy(array, "None"); else { int i; for (i...
false
true
false
false
false
1
objalloc(long index) { OBJECTACTIONS *oap; OBJECT *op; VALUE *vp; int i; if (index < 0 || index > maxobjcount) { math_error("Allocating bad object index"); /*NOTREACHED*/ } oap = objects[index]; if (oap == NULL) { math_error("Object type not defined"); /*NOTREACHED*/ } i = oap->oa_count; if (i < USU...
false
false
false
true
false
1
fmodem_dial (qconn, puuconf, qsys, zphone, qdialer, ptdialerfound) struct sconnection *qconn; pointer puuconf; const struct uuconf_system *qsys; const char *zphone; struct uuconf_dialer *qdialer; enum tdialerfound *ptdialerfound; { char **pzdialer; *ptdialerfound = DIALERFOUND_FALSE; ...
false
false
false
false
false
0
awt_experiment_field_selection_list_rescan(GBDATA *gb_main, long bitfilter, awt_rescan_mode mode) { GB_push_transaction(gb_main); char **names; char **name; GBDATA *gb_species_data = GB_search(gb_main,"species_data",GB_CREATE_CONTAINER); names = GBT_scan_db(gb_species_data, EXPERIMENT_DATA_PAT...
false
false
false
false
false
0
snd_seq_event_input_pending(snd_seq_t *seq, int fetch_sequencer) { if (seq->ibuflen == 0 && fetch_sequencer) { return snd_seq_event_input_feed(seq, 0); } return seq->ibuflen; }
false
false
false
false
false
0
bcf_p1_init(int n) { bcf_p1aux_t *ma; int i; ma = calloc(1, sizeof(bcf_p1aux_t)); ma->n1 = -1; ma->n = n; ma->M = 2 * n; ma->q2p = calloc(256, sizeof(double)); ma->pdg = calloc(3 * ma->n, sizeof(double)); ma->phi = calloc(ma->M + 1, sizeof(double)); ma->phi1 = calloc(ma->M + 1, sizeof(double)); ma->phi2 = cal...
false
false
false
false
false
0
e_cal_recur_ensure_end_dates (ECalComponent *comp, gboolean refresh, ECalRecurResolveTimezoneFn tz_cb, gpointer tz_cb_data) { GSList *rrules, *exrules, *elem; gboolean changed = FALSE; /* Do the RRULEs. */ e_cal_component_get...
false
false
false
false
false
0
tracksCounted( QStringList res ) { if( !res.isEmpty() ) m_trackCount = res.first().toInt(); else m_trackCount = 0; m_isCounting = false; emit dataUpdated(); }
false
false
false
false
false
0
add(template_symbol const& ts) { BOOST_ASSERT(!scopes.empty()); BOOST_ASSERT(ts.lexical_parent); if (this->find_top_scope(ts.identifier)) { return false; } boost::spirit::classic::add(scopes.front().symbols, ts.identifier.c_str(), ts)...
false
false
false
false
false
0