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
util_ldap_set_trusted_global_cert(cmd_parms *cmd, void *dummy, const char *type, const char *file, const cha...
false
false
false
false
false
0
buf2hex(BYTE *bytes, INT len , CHAR *szStr) { INT i; CHAR *oldstr; oldstr = szStr; for(i=0;i<len;i++,bytes++) { *szStr = int_to_hexchar((*bytes & 0xF0) / 0x10); szStr++; *szStr = int_to_hexchar(*bytes & 0xF); szStr++; //*szStr = ' '; //szStr++; } *szStr = 0; return oldstr; }
false
false
false
false
false
0
si4713_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { struct si4713_device *sdev = to_si4713_device(sd); struct si4713_rnl *rnl = arg; u16 frequency; int rval = 0; if (!arg) return -EINVAL; switch (cmd) { case SI4713_IOC_MEASURE_RNL: frequency = v4l2_to_si4713(rnl->frequency); if (sdev->po...
false
false
false
false
false
0
gst_matroska_demux_handle_seek_push (GstMatroskaDemux * demux, GstPad * pad, GstEvent * event) { GstSeekFlags flags; GstSeekType cur_type, stop_type; GstFormat format; gdouble rate; gint64 cur, stop; gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur, &stop_type, &stop); /* s...
false
false
false
false
false
0
cg_transform_flags (GHashTable *table, const gchar *index, const CgElementEditorFlags *flags) { const CgElementEditorFlags *flag; GString *res_str; gchar *flags_str; gchar *prev; gchar *pos; flags_str = g_hash_table_lookup (table, index); res_str = g_string_sized_new (128...
false
false
false
false
false
0
yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR y...
false
false
false
false
false
0
os_is_file_absolute(const char *fname) { /* if the name starts with a path separator, it's absolute */ if (fname[0] == OSPATHCHAR || strchr(OSPATHALT, fname[0]) != 0) return TRUE; #ifdef _WIN32 /* on DOS, a file is absolute if it starts with a drive letter */ if (isalpha(fname[0]) && f...
false
false
false
false
false
0
dns_byaddr_create(isc_mem_t *mctx, isc_netaddr_t *address, dns_view_t *view, unsigned int options, isc_task_t *task, isc_taskaction_t action, void *arg, dns_byaddr_t **byaddrp) { isc_result_t result; dns_byaddr_t *byaddr; isc_event_t *ievent; byaddr = isc_mem_get(mctx, sizeof(*byaddr)); if (byaddr == NULL...
false
false
false
false
false
0
luaK_goiftrue (FuncState *fs, expdesc *e) { int pc; /* pc of last jump */ luaK_dischargevars(fs, e); switch (e->k) { case VK: case VKNUM: case VTRUE: { pc = NO_JUMP; /* always true; do nothing */ break; } case VJMP: { invertjump(fs, e); pc = e->u.s.info; break; } ...
false
false
false
false
false
0
text_Read(GF_Box *s, GF_BitStream *bs) { u16 pSize; GF_TextSampleEntryBox *ptr = (GF_TextSampleEntryBox*)s; gf_bs_read_data(bs, ptr->reserved, 6); ptr->dataReferenceIndex = gf_bs_read_u16(bs); ptr->displayFlags = gf_bs_read_u32(bs); /*Display flags*/ ptr->textJustification = gf_bs_read_u32(bs); /*Text justific...
false
false
false
false
false
0
PortalHashTableDeleteAll(void) { HASH_SEQ_STATUS status; PortalHashEnt *hentry; if (PortalHashTable == NULL) return; hash_seq_init(&status, PortalHashTable); while ((hentry = hash_seq_search(&status)) != NULL) { Portal portal = hentry->portal; /* Can't close the active portal (the one running the comman...
false
false
false
false
false
0
acpi_sbs_battery_get_property(struct power_supply *psy, enum power_supply_property psp, union power_supply_propval *val) { struct acpi_battery *battery = to_acpi_battery(psy); if ((!battery->present) && psp != POWER_SUPPLY_PROP_PRESENT) return -ENODEV; acpi_battery_get_state(battery); switch (psp) {...
false
false
false
false
false
0
Reset() { this->SetName(0); this->SetDataType(VTK_VOID); this->SetImageMin(0); this->SetImageMax(0); this->AttributeValues->Clear(); this->AttributeNames->Clear(); this->VariableNames->Reset(); this->DimensionNames->Reset(); this->DimensionLengths->Reset(); if (this->StringStore) { this->Str...
false
false
false
false
false
0
gst_ffmpegcsp_transform (GstBaseTransform * btrans, GstBuffer * inbuf, GstBuffer * outbuf) { GstFFMpegCsp *space; gint result; space = GST_FFMPEGCSP (btrans); GST_DEBUG ("from %d -> to %d", space->from_pixfmt, space->to_pixfmt); if (G_UNLIKELY (space->from_pixfmt == PIX_FMT_NB || space->to_pi...
false
false
false
false
false
0
writeMemVObject(char *s, int *len, VObject *o) { OFile ofp; initMemOFile(&ofp,s,len?*len:0); writeVObject_(&ofp,o); if (len) *len = ofp.len; appendcOFile(&ofp,0); return ofp.s; }
false
false
false
false
false
0
stringify() { if (StringifyResult.valid()) return StringifyResult.result(); if (Disassembler.printInst(String, *Inst)) return StringifyResult.setResult(-1); String.push_back('\n'); return StringifyResult.setResult(0); }
false
false
false
false
false
0
gtk_plot_parse_label(GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label) { gdouble auxval; gint intspace = 0; gint power = 0.0; gfloat v = 0.0; GtkPlotScale scale = axis->ticks.scale; auxval = fabs(val); switch(style){ case GTK_PLOT_LABEL_EXP: g_snprintf (label, LABEL...
false
false
false
false
false
0
_nc_getenv_num(const char *name) { char *dst = 0; char *src = getenv(name); long value; if ((src == 0) || (value = strtol(src, &dst, 0)) < 0 || (dst == src) || (*dst != '\0') || (int) value < value) value = -1; return (int) value; }
false
false
false
false
false
0
contact_maybe_set_client_types (TpContact *self, const gchar * const *types) { if (self == NULL) return; if (self->priv->client_types != NULL) g_strfreev (self->priv->client_types); self->priv->has_features |= CONTACT_FEATURE_FLAG_CLIENT_TYPES; self->priv->client_types = g_strdupv ((gchar **) type...
false
false
false
false
false
0
_load_segments(void) { FILE *fp; char line[1024]; struct map_segment_desc seg; memheap_context.n_segments = 0; fp = fopen("/proc/self/maps", "r"); if (NULL == fp) { MEMHEAP_ERROR("Failed to open /proc/self/maps"); return OSHMEM_ERROR; } while (NULL != fgets(line, sizeo...
true
true
false
false
true
1
TrackTimerCallback(void *arg) { opl_track_data_t *track = arg; midi_event_t *event; // Get the next event and process it. if (!MIDI_GetNextEvent(track->iter, &event)) { return; } ProcessEvent(track, event); // End of track? if (event->event_type == MIDI_EVENT_META &...
false
false
false
false
false
0
do_clean_all(pTHX_ SV *const sv) { dVAR; if (sv == (const SV *) PL_fdpid || sv == (const SV *)PL_strtab) { /* don't clean pid table and strtab */ return; } DEBUG_D((PerlIO_printf(Perl_debug_log, "Cleaning loops: SV at 0x%"UVxf"\n", PTR2UV(sv)) )); SvFLAGS(sv) |= SVf_BREAK; SvREFCNT_dec_NN(sv);...
false
false
false
false
false
0
argument_conflicts(struct argument * argument, char * key) { struct argument_exclusive * exclusive = argument->exclusive; /* iterate through the list of possibly mutually exclusive things */ for (; exclusive; exclusive = exclusive->next) { struct argument_exclusive * chil...
false
false
false
false
false
0
lj_snap_grow_map_(jit_State *J, MSize need) { if (need < 2*J->sizesnapmap) need = 2*J->sizesnapmap; else if (need < 64) need = 64; J->snapmapbuf = (SnapEntry *)lj_mem_realloc(J->L, J->snapmapbuf, J->sizesnapmap*sizeof(SnapEntry), need*sizeof(SnapEntry)); J->cur.snapmap = J->snapmapbuf; J->sizesn...
false
false
false
false
false
0
longest_line_width(char *text) { int width = 0; char *line_start = text; for (; TRUE; text++) { // Find the end of the current line. if (*text != '\n' && *text != '\0') { continue; } // Get the width of the current line. char tmp = *text; *text = '\0'; int line_width = TextWidth(line_start); *te...
false
false
false
false
false
0
art_item_free (ArtItem * item) { /* delete temporary file */ if (item->art_file && item->is_temp) { char * unixname = uri_to_filename (item->art_file); if (unixname) { unlink (unixname); free (unixname); } } free (item->data); free (item->...
false
false
false
false
false
0
logTotals() { double avg_response_time = 0; int job_count = 0; long totalExecutionTime = 0; long totalCPUTime = 0; float totalCost = 0; list<double> response_times; map<long,int>::iterator it; list<Worker *>::iterator worker; for (worker = workers.begin(); worker != workers.end(); ++worker) { t...
false
false
false
false
false
0
lcc_ipq806x_probe(struct platform_device *pdev) { u32 val; struct regmap *regmap; regmap = qcom_cc_map(pdev, &lcc_ipq806x_desc); if (IS_ERR(regmap)) return PTR_ERR(regmap); /* Configure the rate of PLL4 if the bootloader hasn't already */ val = regmap_read(regmap, 0x0, &val); if (!val) clk_pll_configure_sr...
false
false
false
false
false
0
setColor (const xmlChar ** attrs, XMLParserData * data, gint i) { const gchar *tmp; gint value = data->defaults.color; GGobiData *d = getCurrentXMLData (data); colorschemed *scheme = data->gg->activeColorScheme; tmp = getAttribute (attrs, "color"); if (tmp) { value = strToInteger (tmp); } /* * this...
false
false
false
false
false
0
gamgi_mesa_translate_layer_list (double *shift) { gamgi_window *window; gamgi_layer *layer; gamgi_dlist *dlist; for (dlist = gamgi->layers; dlist != NULL; dlist = dlist->next) { layer = GAMGI_CAST_LAYER dlist->data; window = GAMGI_CAST_WINDOW layer->object.object; if (window->axes == FALSE) gamgi_mesa_tran...
false
false
false
false
false
0
gst_rtp_session_get_caps_for_pt (GstRtpSession * rtpsession, guint payload) { GstCaps *caps = NULL; GValue args[2] = { {0}, {0} }; GValue ret = { 0 }; GST_RTP_SESSION_LOCK (rtpsession); caps = g_hash_table_lookup (rtpsession->priv->ptmap, GINT_TO_POINTER (payload)); if (caps) { gst_caps_ref (caps...
false
false
false
false
false
0
xmms_karaoke_update_coeffs (xmms_karaoke_data_t *data) { double A, B, C; g_return_if_fail (data); C = exp (-2 * M_PI * data->width / data->srate); B = -4*C / (1+C) * cos (2 * M_PI * data->band / data->srate); A = sqrt (1- B*B / (4*C)) * (1-C); data->a = A; data->b = B; data->c = C; data->y1 = 0.0; data->y...
false
false
false
false
false
0
Browser_Album_List_Set_Row_Appearance (GtkTreeIter *iter) { GList *l; gboolean not_all_saved = FALSE; // Change the style (red/bold) of the row if one of the files was changed for (gtk_tree_model_get (GTK_TREE_MODEL (albumListModel), iter, ALBUM_ETFILE_LIST_POINTER, &l, -1...
false
false
false
false
false
0
__ecereMethod_ProjectView_OpenNode(struct __ecereNameSpace__ecere__com__Instance * this, struct ProjectNode * node, unsigned int noParsing) { struct ProjectView * __ecerePointer_ProjectView = (struct ProjectView *)(this ? (((char *)this) + __ecereClass_ProjectView->offset) : 0); char filePath[797]; __ecereMethod_Proje...
true
true
false
false
false
1
xmlSchemaFreeAttributeGroup(xmlSchemaAttributeGroupPtr attrGr) { if (attrGr == NULL) return; if (attrGr->annot != NULL) xmlSchemaFreeAnnot(attrGr->annot); if (attrGr->attrUses != NULL) xmlSchemaItemListFree(WXS_LIST_CAST attrGr->attrUses); xmlFree(attrGr); }
false
false
false
false
false
0
splitpath(const char* path, char* drv, char* dir, char* name, char* ext) { const char* end; /* end of processed string */ const char* p; /* search pointer */ const char* s; /* copy pointer */ /* extract drive name */ if (path[0] && path[1]==':') { if (drv) { *drv++ = *path++; *drv++ = *path...
false
false
false
false
false
0
WriteResponse(const std::string &Data) /*{{{*/ { return Out.Read(Data); }
false
false
false
false
false
0
compute_hash(const char *s, size_t l) const { uint acc; /* * add up all the character values in the string, treating case as * significant */ for (acc = 0 ; l != 0 ; ++s, --l) { uchar c; c = (uchar)*s; acc += c; } /* return the accum...
false
false
false
false
false
0
L3AddTimer(struct L3Timer *t, int millisec, int event) { if (timer_pending(&t->tl)) { printk(KERN_WARNING "L3AddTimer: timer already active!\n"); return -1; } init_timer(&t->tl); t->event = event; t->tl.expires = jiffies + (millisec * HZ) / 1000; add_timer(&t->tl); return 0; }
false
false
false
false
false
0
getCurrentMostLikelyPath( std::deque<TPose3D> &outPath ) const { double maxW = -1, w; size_t mostLik=0; for (size_t i=0;i<mapPDF.particlesCount();i++) { w = mapPDF.getW(i); if (w>maxW) { maxW = w; mostLik = i; } } mapPDF.getPath( mostLik, outPath ); }
false
false
false
false
false
0
brcms_c_antsel_attach(struct brcms_c_info *wlc) { struct antsel_info *asi; struct ssb_sprom *sprom = &wlc->hw->d11core->bus->sprom; asi = kzalloc(sizeof(struct antsel_info), GFP_ATOMIC); if (!asi) return NULL; asi->wlc = wlc; asi->pub = wlc->pub; asi->antsel_type = ANTSEL_NA; asi->antsel_avail = false; asi...
false
false
false
false
false
0
task_list_event ( widget, event ) GtkWidget *widget; GdkEvent *event; { GdkEventButton *eb; GtkWidget *menu; int row, col; if ( event->type == GDK_BUTTON_PRESS ) { eb = (GdkEventButton *)event; if ( eb->button == 3 ) { gtk_clist_get_selection_info ( GTK_CLIST ( task_list ), eb->x, eb->y, ...
false
false
false
false
false
0
gray_level(normal) float *normal; { REAL cosine; REAL denom; denom = sqrt(dotf(normal,normal,3)); if ( denom == 0.0 ) return 0.0; cosine = normal[1]/denom; if ( (REAL)normal[2] < 0.0 ) return brightness - 0.9*(1-brightness)*cosine; return brightness + 0.9*(1-brightness)*cosine; }
false
false
false
false
false
0
on_ui_playlist_save(GtkWidget *widget, gpointer user_data) { GtkEntry *entry = GTK_ENTRY(gtk_builder_get_object(builder, "entry_playlist_name")); gchar *name = (gchar *)gtk_entry_get_text(entry); GlurpPl *pl; if( !mpd_check_connected(glurp->mpd) ) { debug("We're not connected, how can this be? Ignoring"); ...
false
false
false
false
false
0
GC_enqueue_all_finalizers() { struct finalizable_object * curr_fo, * prev_fo, * next_fo; ptr_t real_ptr; register int i; int fo_size; fo_size = (log_fo_table_size == -1 ) ? 0 : (1 << log_fo_table_size); GC_words_finalized = 0; for (i = 0; i < fo_size; i++) { curr_fo = fo_head[i]...
false
false
false
false
false
0
btr_validate_report2( /*=================*/ const dict_index_t* index, /*!< in: index */ ulint level, /*!< in: B-tree level */ const buf_block_t* block1, /*!< in: first index page */ const buf_block_t* block2) /*!< in: second index page */ { fprintf(stderr, "InnoDB: Error in pages %lu and %lu of ", buf_block_g...
false
false
false
false
false
0
qib_set_cntr_6120_sample(struct qib_pportdata *ppd, u32 intv, u32 start) { struct qib_chip_specific *cs = ppd->dd->cspec; if (start && intv) { cs->pma_sample_status = IB_PMA_SAMPLE_STATUS_STARTED; mod_timer(&cs->pma_timer, jiffies + usecs_to_jiffies(start)); } else if (intv) { cs->pma_sample_status =...
false
false
false
false
false
0
time_t2str(time_t t, char *str, size_t len, int include_time) { if(t) { if(include_time) strftime(str, len, "%Y-%m-%d %H:%M:%S UTC", gmtime(&t)); else strftime(str, len, "%Y-%m-%d", gmtime(&t)); } else snprintf(str, len, "never"); }
false
false
false
false
false
0
connectiv (void) /* builds connectivity array triaunb which contains all the triangle numbers having i for vertex in triaunb[triauptr[i]...triauptr[i+1]-1] */ { long i, j, k; float aux1, aux2 = 0.F; triauptr = new int[ns+1]; triaunb = new int[3*nt]; memset (triauptr, 0, (ns+1)*size...
false
false
false
false
false
0
bExistsAnyAltPath( BN_STRUCT *pBNS, BN_DATA *pBD, inp_ATOM *at, int num_atoms, int nVert2, int nVert1, int path_type ) { int nRet1, nRet2; nRet1 = bExistsAltPath( pBNS, pBD, NULL, at, num_atoms, nVert2, nVert1, path_type ); if ( nRet1 > 0 ) return nRet1; nRet2 = bExistsAltP...
false
false
false
false
false
0
cms_signerinfo_verify_cert(CMS_SignerInfo *si, X509_STORE *store, STACK_OF(X509) *certs, STACK_OF(X509_CRL) *crls, unsigned int flags) { X509_STORE_CTX ctx; X509 *signer; int i, j, r = 0; CMS_SignerInfo_get0_algs(si, NULL, &signer, NULL, NULL); if (!X509_STORE_CTX_init(&ctx, store, signer, cer...
false
false
false
false
false
0
drawAirEnemy( SDL_Surface *screen ) { if ( !ENEMY_FLYING[ enemyType ] ) return; SDL_Rect destR; destR.x = lroundf(pos.getX()) - spriteEnemy->w / 2; destR.y = lroundf(pos.getY()) - spriteEnemy->h / 2; destR.w = spriteEnemy->w; destR.h = spriteEnemy->h; SDL_BlitSurface( spriteEnemy, 0, screen, &destR ); ...
false
false
false
false
false
0
tp_account_get_storage_specific_information_async (TpAccount *self, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *result; g_return_if_fail (TP_IS_ACCOUNT (self)); result = g_simple_async_result_new (G_OBJECT (self), callback, user_data, tp_account_get_storage_specific_inf...
false
false
false
false
false
0
sys_io_setup(struct tcb *tcp) { if (entering(tcp)) tprintf("%ld, ", tcp->u_arg[0]); else { if (syserror(tcp)) tprintf("0x%0lx", tcp->u_arg[1]); else { unsigned long user_id; if (umove(tcp, tcp->u_arg[1], &user_id) == 0) tprintf("{%lu}", user_id); else tprintf("{...}"); } } return 0; }
false
false
false
false
false
0
expose_parent_dirs(struct zip *zip, const char *name, size_t name_length) { struct archive_string str; struct zip_entry *dir; char *s; archive_string_init(&str); archive_strncpy(&str, name, name_length); for (;;) { s = strrchr(str.s, '/'); if (s == NULL) break; *s = '\0'; /* Transfer the parent direct...
false
false
false
false
false
0
mac_filter_add(const char *addr, void *client) { int n[ETH_ALEN]; struct mac_t *mac; int i; if (sscanf(addr, "%x:%x:%x:%x:%x:%x", n + 0, n + 1, n + 2, n + 3, n + 4, n + 5) != 6) { cli_send(client, "invalid format\r\n"); return; } mac = _malloc(sizeof(*mac)); for (i = 0; i < ETH_ALEN; i++) { if (n[i] > ...
false
false
false
false
false
0
deviceModel() { QString ret; QStringList sysfsNames; sysfsNames << "/sys/class/dmi/id/product_name"; sysfsNames << "/sys/class/dmi/id/board_name"; foreach (const QString &filename, sysfsNames) { QFile file(filename); if (file.open(QIODevice::ReadOnly)) { QString tmp = fil...
false
false
false
false
false
0
get_sysfs_mountpoint(char *mnt, int *mnt_size) { FILE *fp; struct mntent *mntent; int rc; fp = fopen("/etc/mtab", "r"); if (!fp) { rc = -errno; goto out; } while ((mntent = getmntent(fp))) if (strcmp(mntent->mnt_type, "sysfs") == 0) { *mnt_size = strlen(mntent->mnt_dir); if (mnt) memcpy(mnt, mnt...
false
true
true
false
true
1
set_supp_group(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (!group_list) group_list = xdico_list_c...
false
false
false
false
false
0
use_config(char *m, int slen) { char *s = alloca(slen+1); char *p; if (is_defined_config(m, slen)) return; define_config(m, slen); memcpy(s, m, slen); s[slen] = 0; for (p = s; p < s + slen; p++) { if (*p == '_') *p = '/'; else *p = tolower((int)*p); } printf(" $(wildcard include/config/%s....
false
false
false
false
false
0
isEqual(const BitTracker::RegisterCell &RC1, uint16_t B1, const BitTracker::RegisterCell &RC2, uint16_t B2, uint16_t W) { for (uint16_t i = 0; i < W; ++i) { // If RC1[i] is "bottom", it cannot be proven equal to RC2[i]. if (RC1[B1+i].Type == BitTracker::BitValue::Ref && RC1[B1+i].RefI.Reg == 0) ...
false
false
false
false
false
0
json_write_binary(OutputStream * out, const void * data, size_t size) { if (data == NULL) { write_string(out, "null"); } else { JsonWriteBinaryState state; json_write_binary_start(&state, out, size); json_write_binary_data(&state, data, size); json_write_binary_end(&s...
false
false
false
false
false
0
CgAmlWriteWalk ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context) { /* * Print header at level 0. Alignment assumes 32-bit pointers */ if (!Level) { DbgPrint (ASL_TREE_OUTPUT, "Final parse tree used for AML output:\n"); ...
false
false
false
false
false
0
e_cal_backend_notify_error (ECalBackend *backend, const gchar *message) { EDataCal *data_cal; g_return_if_fail (E_IS_CAL_BACKEND (backend)); g_return_if_fail (message != NULL); data_cal = e_cal_backend_ref_data_cal (backend); if (data_cal != NULL) { e_data_cal_report_error (data_ca...
false
false
false
false
false
0
rb_spawn_dst_brick (glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo) { glusterd_conf_t *priv = NULL; runner_t runner = {0,}; int ret = -1; int32_t port = 0; priv = T...
false
false
false
false
false
0
Read(void *buffer) { unsigned int dim; const unsigned int dimensions = this->GetNumberOfDimensions(); unsigned int numberOfPixels = 1; char *const p = static_cast< char * >( buffer ); for ( dim = 0; dim < dimensions; dim++ ) { numberOfPixels *= this->m_Dimensions[dim]; } /* ...
false
false
false
false
false
0
set( const char *name, const char *value ) { for ( int i=0; i<nEntry_; i++ ) { if ( strcmp( name, entry_[i].name ) == 0 ) { if ( !value ) return; // annotation if ( strcmp( value, entry_[i].value ) != 0 ) { if ( entry_[i].value ) free( entry_[i].value ); entry_[i].value = strdup( value ); dirty_...
false
false
false
false
false
0
pt3_proc_dma(struct pt3_adapter *adap) { int idx, ofs; idx = adap->buf_idx; ofs = adap->buf_ofs; if (adap->buffer[idx].data[ofs] == PT3_BUF_CANARY) return 0; while (*next_unit(adap, &idx, &ofs) != PT3_BUF_CANARY) { u8 *p; p = &adap->buffer[adap->buf_idx].data[adap->buf_ofs]; if (adap->num_discard > 0) ...
false
false
false
false
false
0
roles_cache_wait_on_change(void * arg) { roles_cache_def *roles_def = (roles_cache_def*)arg; slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_wait_on_change\n"); slapi_lock_mutex(roles_def->stop_lock); slapi_lock_mutex(roles_def->change_lock); while ( roles_def->keeprunning) { ...
false
false
false
false
false
0
Compiler_gammaFvarsize(CTX ctx, ksfp_t *sfp _RIX) { RETURNi_(DP(ctx->gma)->fvarsize); }
false
false
false
false
false
0
new_host(const char *name, struct sockaddr *addr, size_t addr_len, unsigned int proximity, unsigned int weight, unsigned int options) { struct host *new; struct sockaddr *tmp2; char *tmp1; if (!name || !addr) return NULL; tmp1 = strdup(name); if (!tmp1) return NULL; tmp2 = malloc(a...
false
false
false
false
true
1
fs_rid_set_contains(fs_rid_set *s, fs_rid val) { if (val == FS_RID_NULL) return 0; struct rid_entry *e = &s->entry[FS_RID_ENTRY_HASH(val)]; if (e->val == FS_RID_NULL) return 0; if (e->val == val) return 1; while (e->val != FS_RID_NULL && e->next) { if (e->val == val) return 1; e = e->next; ...
false
false
false
false
false
0
upd_cmyk_icolor(gx_device *pdev, const gx_color_value cv[]) { const upd_p upd = ((upd_device *)pdev)->upd; gx_color_index rv; gx_color_value c, m, y, k; c = cv[0]; m = cv[1]; y = cv[2]; k = cv[3]; /** All 4-Component-Modi have to deal with the Problem, that a value with all bits set can be produced, w...
false
false
false
false
false
0
print_slot(struct cache_slot *slot) { ssize_t i, j; i = lseek(slot->cache_fd, slot->keylen + 1, SEEK_SET); if (i != slot->keylen + 1) return errno; do { i = j = xread(slot->cache_fd, slot->buf, sizeof(slot->buf)); if (i > 0) j = xwrite(STDOUT_FILENO, slot->buf, i); } while (i > 0 && j == i); if (i < 0...
false
false
false
false
false
0
db_err1(fatal, s) int fatal; char *s; { if (fatal) fprintf(stderr, "error, "); else fprintf(stderr, "warning, "); fprintf(stderr, "data base \"%s\", line %d - %s\n", dbname, dbline, s); if (fatal) exit(EXIT_FAILURE); }
false
false
false
false
false
0
setdump (setp, mask) /* Dump a set specification */ register char * setp; /* Set to be dumped */ register int mask; /* Mask for bit to be dumped */ { register int cnum; /* Next character's number */ register int firstnz; /* Number of first NZ character */ register int numnz; /* Number of NZ...
false
false
false
false
false
0
tag_all_host_gdil(lListElem *jatep) { lList *gdil = lGetList(jatep, JAT_granted_destin_identifier_list); lListElem *gdil_ep; for_each (gdil_ep, gdil) { const char *host = lGetHost(gdil_ep, JG_qhostname); /* only the first gdil_ep for a host is tagged * if the pe job spawns multiple queues t...
false
false
false
false
false
0
_equalRemoveFuncStmt(RemoveFuncStmt *a, RemoveFuncStmt *b) { COMPARE_SCALAR_FIELD(kind); COMPARE_NODE_FIELD(name); COMPARE_NODE_FIELD(args); COMPARE_SCALAR_FIELD(behavior); COMPARE_SCALAR_FIELD(missing_ok); return true; }
false
false
false
false
false
0
setPasswordMode(bool b) { if(b) { KConfigGroup cg(KGlobal::config(), "Passwords"); const QString val = cg.readEntry("EchoMode", "OneStar"); if (val == "NoEcho") setEchoMode(NoEcho); else { d->threeStars = (val == "ThreeStars"); setEchoMode(Pass...
false
false
false
false
false
0
findExtFontFile() { static char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL }; static char *ttExts[] = { ".ttf", ".ttc", NULL }; if (name) { if (type == fontType1) { extFontFile = globalParams->findFontFile(name, type1Exts); } else if (type == fontTrueType) { extFontFile = globalParams->...
false
false
false
false
false
0
ethr_get_tmp_ts_event__(ethr_ts_event **tsepp) { int res; ethr_ts_event *tsep = *tsepp; if (!tsep) { tsep = ts_event_alloc(); if (!tsep) return ENOMEM; } if ((tsep->iflgs & ETHR_TS_EV_INITED) == 0) { res = ethr_event_init(&tsep->event); if (res != 0) { ts_event_free(tsep); retur...
false
false
false
false
false
0
coordsMess(int argc, t_atom *argv) { if (argc % 2) { error("must have a even number of coordinates"); return; } int numVals = argc / 2; if (numVals != m_numCoords) { if(m_coords)delete [] m_coords; m_coords = NULL; if(m_rectcoords)delete[]m_rectcoords; m_rectc...
false
false
false
false
false
0
run_command (DriveButton *self, const char *command) { GFile *file; char *mount_path, *device_path; GMount *mount; if (!self->volume) return; mount = g_volume_get_mount (self->volume); if (!mount) return; file = g_mount_get_root (mount); g_object_unref (mount); g_assert (file); mount_path = g_file...
false
false
false
false
false
0
OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f) { switch(init->type) { case 0: { struct MemberInit * member; if(init->dataMembers) { for(member = (*init->dataMembers).first; member; member = member->next) { OutputMemberInit(member, f); if(member->next) ((unsigned int (*)...
false
false
false
false
false
0
SetLatticeWeightMap(float *wm) { //make sure wm is not NULL if(!wm) { ErrorHandler("MeanShift", "SetWeightMap", "Specified weight map is NULL."); return; } //populate weightMap using wm int i; for(i = 0; i < L; i++) weightMap[i] = wm[i]; //indicate that a lattice weight map has been specif...
false
false
false
false
false
0
get_color(GLEPcode& pcode) throw (ParserError) { int vtype = 1; int result = 0; string& token = m_tokens.next_token(); if (pass_color_hash_value(token, &result, &m_tokens)) { GLEColor color; color.setHexValue(result); pcode.addDoubleExpression(color.getDoubleEncoding()); } else if (is_float(token)) { ...
false
false
false
false
false
0
agent_free(void) { if (agent_watch > 0) g_dbus_remove_watch(connection, agent_watch); agent_watch = 0; g_free(agent_sender); agent_sender = NULL; g_free(agent_path); agent_path = NULL; connman_agent_cancel(NULL); }
false
false
false
false
false
0
fullyQualifiedName() const { QString name; if (GooString *goo = m_formData->fm->getFullyQualifiedName()) { name = UnicodeParsedString(goo); } return name; }
false
false
false
false
false
0
isAudio(const char *ext) { return !(strcmp(ext, "mp3") && strcmp(ext, "m4a") && // strcmp(ext, "m4p") && // strcmp(ext, "ogg") && // strcmp(ext, "flac") && // strcmp(ext, "wma") && // strcmp(ext, "wav") && // strcmp(ext, "oga") && // strcmp(ext, "m4b") && // strcmp(ext, "aac") && // str...
false
false
false
false
false
0
kml_track_hdr(const route_head* header) { computed_trkdata* td; track_recompute(header, &td); if (header->rte_waypt_ct > 0 && (export_lines || export_points)) { kml_output_header(header, td); } xfree(td); }
false
false
false
false
false
0
hex2bin (const char *string, void *buffer, size_t length) { int i; const char *s = string; for (i=0; i < length; ) { if (!hexdigitp (s) || !hexdigitp (s+1)) return -1; /* Invalid hex digits. */ ((unsigned char*)buffer)[i++] = xtoi_2 (s); s += 2; } if (*s && (!isascii...
false
false
false
false
false
0
keyQtToCodeX( int keyQt, int* keyCode ) { int sym; uint mod; keyQtToSymX(keyQt, &sym); keyQtToModX(keyQt, &mod); // Get any extra mods required by the sym. // E.g., XK_Plus requires SHIFT on the en layout. uint modExtra = getModsRequired(sym); // Get the X modifier equivalent. if( ...
false
false
false
false
false
0
ProcessResponse(const CUInt128& target, uint32_t fromIP, uint16_t fromPort, ContactList *results) { // We got a response to a kad lookup. CSearch *s = NULL; SearchMap::const_iterator it = m_searches.find(target); if (it != m_searches.end()) { s = it->second; } // If this search was deleted before this response...
false
false
false
false
false
0
integral_init8v( uint16_t *sum8, int stride ) { for( int x = 0; x < stride-8; x++ ) sum8[x] = sum8[x+8*stride] - sum8[x]; }
false
false
false
false
false
0
NPP_Destroy(NPP instance, NPSavedData ** save) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; NPError rv = NPERR_NO_ERROR; CPlugin *pPlugin = (CPlugin *) instance->pdata; if (pPlugin != NULL) { pPlugin->shut(); delete pPlugin; } return rv; }
false
false
false
false
false
0
aclParsePortRange(void *curlist) { intrange **Tail; char *a; for (Tail = curlist; *Tail; Tail = &((*Tail)->next)); while ((a = strtokFile())) { char *b = strchr(a, '-'); unsigned short port1, port2; if (b) *b++ = '\0'; port1 = xatos(a); if (b) port2 = xatos(b); else port2 = port1; ...
false
false
false
false
false
0
sftp_handle_remove(sftp_session sftp, void *handle) { int i; for (i = 0; i < SFTP_HANDLES; i++) { if (sftp->handles[i] == handle) { sftp->handles[i] = NULL; break; } } }
false
false
false
false
false
0
moreprompt() { short key; char *xx, attr; char *menu = "\nPossible responses:\n\ q : Discard the rest of the output.\n\ c : Continuously print the rest of the output.\n\ h,? : Print this help message.\n\ other : Print the next page of output.\n"; if (ypos >= ysize) { ...
false
false
false
false
false
0
apei_read_mce(struct mce *m, u64 *record_id) { struct cper_mce_record rcd; int rc, pos; rc = erst_get_record_id_begin(&pos); if (rc) return rc; retry: rc = erst_get_record_id_next(&pos, record_id); if (rc) goto out; /* no more record */ if (*record_id == APEI_ERST_INVALID_RECORD_ID) goto out; rc = erst_...
false
false
false
false
false
0
v_udp_instance(void) #else v_udp_instance() #endif { #line 1682 "./verilog.g" zzRULE; zzBLOCK(zztasp1); zzMake0; { #line 1682 "./verilog.g" v_name_of_udp_instance(); #line 1682 "./verilog.g" zzmatch(V_LP); zzCONSUME; #line 1682 "./verilog.g" v_terminal(); #line 1683 "./verilog.g" { zzBLOCK(zztasp2);...
false
false
false
false
false
0