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
media_keys_dbus_register_object (DBusConnection* connection, const char* path, void* object) { if (!g_object_get_data (object, "dbus_object_path")) { g_object_set_data (object, "dbus_object_path", g_strdup (path)); dbus_connection_register_object_path (connection, path, &_media_keys_dbus_path_vtable, object); g_...
false
false
false
false
false
0
_load_env_cache(const char *username) { char *state_save_loc, fname[MAXPATHLEN]; char *line, name[256], *value; char **env = NULL; FILE *fp; int i; state_save_loc = slurm_get_state_save_location(); i = snprintf(fname, sizeof(fname), "%s/env_cache/%s", state_save_loc, username); xfree(state_save_loc); i...
false
false
false
false
false
0
bfd_close (bfd *abfd) { bfd_boolean ret; bfd *nbfd; bfd *next; if (bfd_write_p (abfd)) { if (! BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd))) return FALSE; } /* Close nested archives (if this bfd is a thin archive). */ for (nbfd = abfd->nested_archives; nbfd; nbfd = next) { ne...
false
false
false
false
false
0
setnetgrent(const char *netgroup) { if (!global_netgroup_head) global_netgroup_head = netgroup_parse_all(); struct netgroup *group = netgroup_find(global_netgroup_head, netgroup); if (!group) { netgroup_free_all(global_netgroup_head); global_netgroup_head = NULL; return 0; } netgroup_iter_i...
false
false
false
false
false
0
usX2Y_usbpcm_urbs_allocate(struct snd_usX2Y_substream *subs) { int i; unsigned int pipe; int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; struct usb_device *dev = subs->usX2Y->dev; pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) : usb_rcvisocpipe(dev, subs->endpoint); subs->ma...
false
false
false
false
false
0
fileBtreeUpdateMeta(Btree *pBt, int *aMeta){ PageOne *pP1; int rc, i; if( !pBt->inTrans ){ return pBt->readOnly ? SQLITE_READONLY : SQLITE_ERROR; } pP1 = pBt->page1; rc = sqlitepager_write(pP1); if( rc ) return rc; for(i=0; i<sizeof(pP1->aMeta)/sizeof(pP1->aMeta[0]); i++){ pP1->aMeta[i] = SWA...
false
false
false
false
false
0
usif_notify_put(struct drm_file *f, void *data, u32 size, void *argv, u32 argc) { struct nouveau_cli *cli = nouveau_cli(f); struct nvif_client *client = &cli->base; union { struct nvif_ioctl_ntfy_put_v0 v0; } *args = data; struct usif_notify *ntfy; int ret; if (nvif_unpack(args->v0, 0, 0, true)) { if (!(ntf...
false
false
false
false
false
0
gnutls_pkcs12_generate_mac (gnutls_pkcs12_t pkcs12, const char *pass) { opaque salt[8], key[20]; int result; const int iter = 1; digest_hd_st td1; gnutls_datum_t tmp = { NULL, 0 }; opaque sha_mac[20]; if (pkcs12 == NULL) { gnutls_assert (); return GNUTLS_E_INVALID_REQUEST; } /* Gen...
false
false
false
false
false
0
cavan_net_bridge_init(struct cavan_net_bridge *bridge) { int ret; struct cavan_thread *thread; ret = pthread_mutex_init(&bridge->lock, NULL); if (ret < 0) { pr_error_info("pthead_mutex_init"); return ret; } thread = &bridge->thread; thread->name = "NET_BRIDGE"; thread->wake_handker = NULL; thread->handl...
false
false
false
false
false
0
jabber_dcc_digest(char *sid, char *initiator, char *target) { EKG2_SHA1_CTX ctx; unsigned char digest[20]; static char result[41]; int i; SHA1Init(&ctx); SHA1Update(&ctx, sid, xstrlen(sid)); SHA1Update(&ctx, initiator, xstrlen(initiator)); SHA1Update(&ctx, target, xstrlen(target)); SHA1Final(digest, &ctx); ...
false
false
false
false
false
0
remove_all_signals() { int i; spectrumdock->clear(); spectrumdock->dock->hide(); for(i=0; i<MAXSPECTRUMDIALOGS; i++) { if(spectrumdialog[i] != NULL) { delete spectrumdialog[i]; spectrumdialog[i] = NULL; } } for(i=0; i<MAXAVERAGECURVEDIALOGS; i++) { if(averagecurvedialog[i...
false
false
false
false
false
0
final_check_s(const struct ebt_u_entry *entry, const struct ebt_entry_target *target, const char *name, unsigned int hookmask, unsigned int time) { struct ebt_nat_info *natinfo = (struct ebt_nat_info *)target->data; if (BASE_CHAIN && (natinfo->target | ~EBT_VERDICT_BITS) == EBT_RETURN) { ebt_print_error("--s...
false
false
false
false
false
0
PointIsExtremum(int row, int col, GDALOctaveLayer *bot, GDALOctaveLayer *mid, GDALOctaveLayer *top, double threshold) { //Check that point in middle layer has all neighbours if (row <= top->radius || col <= top->radius || row + top->radius >= top->height || col + top-...
false
false
false
false
false
0
gth_screensaver_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { GthScreensaver *self; self = GTH_SCREENSAVER (object); switch (property_id) { case PROP_APPLICATION: if (self->priv->application != NULL) g_object_unref (self-...
false
false
false
false
false
0
of_translate_one(struct device_node *parent, struct of_bus *bus, struct of_bus *pbus, __be32 *addr, int na, int ns, int pna, const char *rprop) { const __be32 *ranges; unsigned int rlen; int rone; u64 offset = OF_BAD_ADDR; /* * Normally, an absence of a "ranges" property means we are * crossing ...
false
false
false
false
false
0
Command_destroy(Command *cmd) { int i = 0; bdestroy(cmd->progname); bdestroy(cmd->name); if(cmd->extra) { list_destroy_nodes(cmd->extra); list_destroy(cmd->extra); } if(cmd->options) { hash_free_nodes(cmd->options); hash_destroy(cmd->options); } // fi...
false
false
false
false
false
0
param_name(int i, int j)const { if (j == 0) { return param_name(i); }else if (j == 1) { switch (MODEL_BUILT_IN_MOS2::param_count() - 1 - i) { case 0: return ""; case 1: return ""; case 2: return ""; case 3: return ""; case 4: return ""; case 5: return ""; case 6: return ""...
false
false
false
false
false
0
deps_init_id (idata_t id, insn_t insn, bool force_unique_p) { struct deps_desc _dc, *dc = &_dc; deps_init_id_data.where = DEPS_IN_NOWHERE; deps_init_id_data.id = id; deps_init_id_data.force_unique_p = force_unique_p; deps_init_id_data.force_use_p = false; init_deps (dc, false); memcpy (&deps_init_id_sc...
false
true
false
false
false
1
WriteMolecule(OBBase* pOb, OBConversion* pConv) { OBMol* pmol = dynamic_cast<OBMol*>(pOb); if(pmol==NULL) return false; ostream& ofs = *pConv->GetOutStream(); OBMol workingmol(*pmol); // Copy the molecule //*** Coordinate generation *** //Generate coordinates only if no existing 2D coordinates if...
false
false
false
false
false
0
maybe_setup_fallback () { isc_result_t status; struct interface_info *fbi = (struct interface_info *)0; if (setup_fallback (&fbi, MDL)) { if_register_fallback (fbi); status = omapi_register_io_object ((omapi_object_t *)fbi, if_readsocket, 0, fallback_discard, 0, 0); if (status != ISC_R_SUCCES...
false
true
false
false
false
1
ipw2100_start_scan(struct ipw2100_priv *priv) { struct host_command cmd = { .host_command = BROADCAST_SCAN, .host_command_sequence = 0, .host_command_length = 4 }; int err; IPW_DEBUG_HC("START_SCAN\n"); cmd.host_command_parameters[0] = 0; /* No scanning if in monitor mode */ if (priv->ieee->iw_mode == I...
false
false
false
false
false
0
reg_fits_class_p (const_rtx operand, reg_class_t cl, int offset, enum machine_mode mode) { int regno = REGNO (operand); if (cl == NO_REGS) return false; return (HARD_REGISTER_NUM_P (regno) && in_hard_reg_set_p (reg_class_contents[(int) cl], mode, regno + offset)); }
false
false
false
false
false
0
gfn_to_page_many_atomic(struct kvm_memory_slot *slot, gfn_t gfn, struct page **pages, int nr_pages) { unsigned long addr; gfn_t entry; addr = gfn_to_hva_many(slot, gfn, &entry); if (kvm_is_error_hva(addr)) return -1; if (entry < nr_pages) return 0; return __get_user_pages_fast(addr, nr_pages, 1, pag...
false
false
false
false
false
0
insertBendpoint(QPointF p, int bendpointIndex) { prepareGeometryChange(); m_oldPolygon = m_legPolygon; insertBendpointAux(p, bendpointIndex); InfoGraphicsView * infoGraphicsView = InfoGraphicsView::getInfoGraphicsView(this); if (infoGraphicsView != NULL) { infoGraphicsView->prepLegBendpointChange(this, m_oldPo...
false
false
false
false
false
0
notify_track_change(const GMTrack & track,FXImage * cover){ FXString body = GMStringFormat(fxtrformat("%s\n%s (%d)"),track.artist.text(),track.album.text(),track.year); /// Dirty Hack. According to the spec, we shouldn't have to do this, /// but try finding a notification notifydaemon that actually implements it....
false
false
false
false
false
0
delete_column (StfDialogData *pagedata, int col, gboolean test_only) { int colcount = stf_parse_options_fixed_splitpositions_count (pagedata->parseoptions); if (col < 0 || col >= colcount - 1) return FALSE; if (!test_only) { int nextstart = stf_parse_options_fixed_splitpositions_nth (pagedata->parseoptions, col...
false
false
false
false
false
0
drmSLLookup(void *l, unsigned long key, void **value) { SkipListPtr list = (SkipListPtr)l; SLEntryPtr update[SL_MAX_LEVEL + 1]; SLEntryPtr entry; entry = SLLocate(list, key, update); if (entry && entry->key == key) { *value = entry; return 0; } *value = NULL; return -1; }
false
false
false
false
false
0
_IO_seekwmark (fp, mark, delta) _IO_FILE *fp; struct _IO_marker *mark; int delta; { if (mark->_sbuf != fp) return EOF; if (mark->_pos >= 0) { if (_IO_in_backup (fp)) _IO_switch_to_main_wget_area (fp); fp->_wide_data->_IO_read_ptr = (fp->_wide_data->_IO_read_base + mark->...
false
false
false
false
false
0
LC_Card_SelectDf(LC_CARD *card, const char *fname) { GWEN_XMLNODE *n; GWEN_DB_NODE *dbReq; GWEN_DB_NODE *dbRsp; const char *cmd; int fid; LC_CLIENT_RESULT res; n=LC_Card_FindFile(card, "DF", fname); if (!n) { DBG_ERROR(LC_LOGDOMAIN, "DF \"%s\" not found", fname); return LC_Client_ResultCmdError...
false
false
false
false
false
0
_csngen_local_tester_main (void *data) { CSNGen *gen = (CSNGen*)data; PR_ASSERT (gen); while (!s_must_exit) { /* sleep for 30 seconds */ DS_Sleep (PR_SecondsToInterval(60)); g_sampled_time -= slapi_rand () % 100; csngen_dump_state (gen); } PR_AtomicDecrement (&s_thread_count); }
false
false
false
false
false
0
DoDraw(float frametime) { if (HighlightStatus == 1) { gr_set_color_fast(&Color_text_active); } else if (HighlightStatus == 2) { gr_set_color_fast(&Color_text_selected); } else { gr_set_color_fast(&Color_text_normal); } draw_open_rect(CheckCoords[0], CheckCoords[1], CheckCoords[2], CheckCoords[3], false); ...
false
false
false
false
false
0
save_to_qmem_pingordata(int userid, struct query *q) { /* Our CMC is a bit more than the "official" CMC; we store 4 bytes just because we can, and because it may prevent some false matches. For ping, we save the 4 decoded bytes: userid + seq/frag + CMC. For data, we save the 4 _un_decoded chars in lowercas...
false
false
false
false
false
0
get_Em(void) { int i; double Em, numerator, denominator; misc.Qobs_mean = 0.0; numerator = 0.0; for (i = 0; i < input.ntimestep; i++) { misc.Qobs_mean += misc.Qobs[i]; numerator += pow(misc.Qobs[i] - misc.Qt[i], 2.0); } misc.Qobs_mean /= input.ntimestep; denominator = 0.0; for (...
false
false
false
false
false
0
removeTechnique(unsigned short index) { assert (index < mTechniques.size() && "Index out of bounds."); Techniques::iterator i = mTechniques.begin() + index; OGRE_DELETE(*i); mTechniques.erase(i); mSupportedTechniques.clear(); clearBestTechniqueList(); mCompila...
false
false
false
false
false
0
v_bignum_raw_export(const VBigDig *x, void *bits) { unsigned char *bytes = bits; int i; for(i = *x++ - 1; i >= 0; i--) { *bytes++ = x[i] >> 8; *bytes++ = (unsigned char) x[i]; } }
false
false
false
false
false
0
fxtrace(unsigned int level,const char* format,...){ if(fxTraceLevel>level){ #ifndef WIN32 va_list arguments; va_start(arguments,format); vfprintf(stderr,format,arguments); fflush(stderr); va_end(arguments); #else #ifdef _WINDOWS char msg[MAXMESSAGESIZE]; va_list arguments; va_start(arg...
false
false
false
false
false
0
test_remove() { // we only need to test the middle remove case since push/shift // already tests the other cases char *val = List_remove(list, list->first->next); mu_assert(val == test2, "Wrong removed element."); mu_assert(List_count(list) == 2, "Wrong count after remove."); mu_assert(List_fi...
false
false
false
false
false
0
resize(int n, int lb, int ub) { REPORT if (ub != 0) { Tracer tr("LowerBandMatrix::resize"); Throw(ProgramException("LowerBandMatrix with non-zero upper band" )); } BandMatrix::resize(n, lb, ub); }
false
false
false
false
false
0
pcpt_to_XYZ(pcpt *s, double *out, double *in) { int e; double inv[MXTD]; if (s->xmask == s->nmask) { for (e = 0; e < s->di; e++) inv[e] = in[e]; } else { for (e = 0; e < s->di; e++) inv[e] = 1.0 - in[e]; } if (s->luo2 != NULL) s->luo2->lookup(s->luo2, out, inv); else if (s->mlu != NULL) s->mlu->l...
false
false
false
false
false
0
NYTP_close(NYTP_file file, int discard) { FILE *raw_file = file->file; int result; ERRNO_PROBE; #ifdef HAS_ZLIB if (!discard && FILE_STATE(file) == NYTP_FILE_DEFLATE) { const double ratio = file->zs.total_in / (double) file->zs.total_out; flush_output(file, Z_FINISH); fprintf(ra...
false
false
false
false
false
0
gitno_recv(gitno_buffer *buf) { int ret; ret = recv(buf->fd, buf->data + buf->offset, buf->len - buf->offset, 0); if (ret < 0) return git__throw(GIT_EOSERR, "Failed to receive data"); if (ret == 0) /* Orderly shutdown, so exit */ return GIT_SUCCESS; buf->offset += ret; return ret; }
false
false
false
false
false
0
xread(int fd, void *buf, size_t count) { ssize_t nread = 0; ssize_t ret; while (nread < count) { ret = read(fd, buf, count); if (ret > 0) { nread += ret; } else if (ret < 0) { if (errno == EINTR) { continue; } else { return ret; } } else { /* ret is ...
false
true
false
false
true
1
UnrollFloatsToFloat(_cmsTRANSFORM* info, cmsFloat32Number wIn[], cmsUInt8Number* accum, cmsUInt32Number Stride) { int nChan = T_CHANNELS(info -> InputFormat); int DoSwap = T_DOSWAP(info ->InputF...
false
false
false
false
false
0
StyleSetFaceName(int style, const wxString& fontName) { SendMsg(SCI_STYLESETFONT, style, (uptr_t)(const char*)wx2sci(fontName)); }
false
false
false
false
false
0
display_init (int *argc, char ***argv) { const char *display_name; Display *xdisplay; display_name = g_getenv ("DISPLAY"); if (display_name == NULL) { g_warning ("DISPLAY is not set"); exit (1); } xdisplay = XOpenDisplay (display_name...
false
false
false
false
false
0
write_diffax(gchar *filename, struct model_pak *data) { gint i, j, n, tot_layer; gdouble pr, x[3]; GSList *list1, *list2; struct layer_pak *layer; struct core_pak *core; struct elem_pak elem; FILE *fp; printf("write_diffax()\n"); /* checks */ g_return_val_if_fail(data != NULL, 1); g_return_val_if_fail(filename != NUL...
false
false
false
false
true
1
jobAt( int i ) { QMutexLocker l( &d->mutex ); REQUIRE ( i >= 0 && i < d->elements->size() ); return d->elements->at( i )->payload(); }
false
false
false
false
false
0
GC_build_fl_clear4(h, ofl) struct hblk *h; ptr_t ofl; { register word * p = h -> hb_body; register word * lim = (word *)(h + 1); p[0] = (word)ofl; p[1] = 0; p[2] = 0; p[3] = 0; p += 4; for (; p < lim; p += 4) { PREFETCH_FOR_WRITE((ptr_t)(p+64)); p[0] = (word)(p-4); ...
false
false
false
false
false
0
gdm_display_store_clear (GdmDisplayStore *store) { g_return_if_fail (store != NULL); g_debug ("GdmDisplayStore: Clearing display store"); g_hash_table_remove_all (store->priv->displays); }
false
false
false
false
false
0
guess_user_and_switch(char *str, int fb_mode) { char *dstr, *d; char *p, *tstr = NULL, *allowed = NULL, *logins, **users = NULL; int dpy1, ret = 0; char **list; int lind; RAWFB_RET(0) d = DisplayString(dpy); /* pick out ":N" */ dstr = strchr(d, ':'); if (! dstr) { return 0; } if (sscanf(dstr, ":%d", &dp...
false
false
false
false
true
1
AcpiPsPushScope ( ACPI_PARSE_STATE *ParserState, ACPI_PARSE_OBJECT *Op, UINT32 RemainingArgs, UINT32 ArgCount) { ACPI_GENERIC_STATE *Scope; ACPI_FUNCTION_TRACE_PTR (PsPushScope, Op); Scope = AcpiUtCreateGenericState (); if (!Scope) ...
false
false
false
false
false
0
encode(struct rubin_state *rs, long A, long B, int symbol) { long i0, i1; int ret; while ((rs->q >= UPPER_BIT_RUBIN) || ((rs->p + rs->q) <= UPPER_BIT_RUBIN)) { rs->bit_number++; ret = pushbit(&rs->pp, (rs->q & UPPER_BIT_RUBIN) ? 1 : 0, 0); if (ret) return ret; rs->q &= LOWER_BITS_RUBIN; rs->q...
false
false
false
false
false
0
merge_init(MergeState *ms, Py_ssize_t list_size, int has_keyfunc) { assert(ms != NULL); if (has_keyfunc) { /* The temporary space for merging will need at most half the list * size rounded up. Use the minimum possible space so we can use the * rest of temparray for other things. In p...
false
false
false
false
false
0
print_value ( FILE *f, /* file to print to */ double x, /* value to print */ Int is_integer /* TRUE if printing as an integer */ ) { double y ; char s [MAXLINE], *p ; Int i, dest = 0, src = 0 ; int width, ok ; if (is_integer) { i = (Int) x ; ok = (fprintf (f, ID, i) > 0) ...
false
false
false
false
false
0
test_unit_ready (Ma1509_Scanner * s) { SANE_Status status; SANE_Byte buffer[0x04]; size_t size = sizeof (buffer); status = ma1509_cmd (s, scsi_test_unit_ready, buffer, &size); if (status != SANE_STATUS_GOOD) { DBG (1, "test_unit_ready: ma1509_cmd failed: %s\n", sane_strstatus (status)); r...
false
false
false
false
false
0
CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) { // Replace all uses. If any nodes become isomorphic to other nodes and // are deleted, make sure to remove them from our worklist. WorkListRemover DeadNodes(*this); DAG.ReplaceAllUsesOfValueWith(TLO.Old, TLO.New, &DeadNodes); // Push th...
false
false
false
false
false
0
Scalar(int index) const { if (index < 0 || index > E.u.polynom.poly_ord) return NULL; return E.scalar[index]; }
false
false
false
false
false
0
getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs*/, OfxPropertySetHandle outArgs) { // retrieve any instance data associated with this effect MyInstanceData *myData = getMyInstanceData(effect); // get the component type and bit depth of our main input int bitDepth; bool is...
false
false
false
false
false
0
rename_operand_next_array_entry(Operand *op, const int cm_entry, const int lm_entry, const Array_table *array_head) { Operand *opt; for (opt = op; opt != NULL; opt = opt->next) { rename_operand_array_entry(o...
false
false
false
false
false
0
edit_handle_key( Edit *edit, int keysym, int modifier, int unicode ) { int i, changed = 0; switch ( keysym ) { case SDLK_RIGHT: if ( edit->cursor_pos < strlen( edit->text ) ){ changed = 1; edit->cursor_pos++; } break; case SDLK_...
false
false
false
false
false
0
panel_applet_frame_dbus_get_size_hints_cb (PanelAppletContainer *container, GAsyncResult *res, PanelAppletFrame *frame) { GVariant *value; const gint *sz; gint *size_hints = NULL; gsize n_elements; GError *error = NULL; value = panel_applet_container_child_get_finish...
false
true
false
false
false
1
wl1271_op_sched_scan_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct cfg80211_sched_scan_request *req, struct ieee80211_scan_ies *ies) { struct wl1271 *wl = hw->priv; struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); int ret; wl1271_debug(DEBUG_MAC80211, "wl1271_op_...
false
false
false
false
false
0
elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option) { ELM_BG_CHECK(obj); ELM_BG_DATA_GET_OR_RETURN(obj, sd); sd->option = option; elm_layout_sizing_eval(obj); }
false
false
false
false
false
0
gt_simreads_readlen_from_dist( const GtSimreadsDistvalue *dist, const unsigned long value, const unsigned long nofvalues) { unsigned long l = 0, r = nofvalues - 1, m = r >> 1; while (value != dist[m].value) { if (value < dist[m].value) { gt_assert(l <= r); if (m == 0 || value > dist[m ...
false
false
false
false
false
0
__vxge_hw_vpath_addr_get( struct vxge_hw_vpath_reg *vpath_reg, u8 (macaddr)[ETH_ALEN], u8 (macaddr_mask)[ETH_ALEN]) { u32 i; u64 val64; u64 data1 = 0ULL; u64 data2 = 0ULL; u64 action = VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION_LIST_FIRST_ENTRY; enum vxge_hw_status status = VXGE_HW_OK; while (1) { val64 = VXGE_HW...
false
false
false
false
false
0
php_var_serialize(smart_str *buf, zval **struc, php_serialize_data_t *var_hash TSRMLS_DC) /* {{{ */ { php_var_serialize_intern(buf, *struc, *var_hash TSRMLS_CC); smart_str_0(buf); }
false
false
false
false
false
0
save_all (void) { GttErrCode errcode; char *errmsg = NULL; char * xml_filepath; xml_filepath = resolve_path (config_data_url); make_backup (xml_filepath); /* Try ... */ gtt_err_set_code (GTT_NO_ERR); gtt_xml_write_file (xml_filepath); /* Catch */ errcode = gtt_err_get_code(); if (GTT_NO_ERR != errcode) ...
false
false
false
false
false
0
ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { unsigned int key = usage->hid & HID_USAGE; if ((usage->hid & HID_USAGE_PAGE) != HID_UP_BUTTON) return -1; switch (usage->collection_index) { case 1:...
false
false
false
false
false
0
CompositeOut(const MagickPixelPacket *p, const MagickPixelPacket *q,MagickPixelPacket *composite) { MagickRealType Sa, Da, gamma; Sa=1.0-QuantumScale*p->opacity; /* simplify and speed up equations */ Da=1.0-QuantumScale*q->opacity; gamma=Sa*(1.0-Da); composite->opacity=(MagickRealType) Quantum...
false
false
false
false
false
0
disconn_filter_function(const Message &msg) { if (msg.is_signal(DBUS_INTERFACE_LOCAL,"Disconnected")) { debug_log("%p disconnected by local bus", conn); dbus_connection_close(conn); return true; } return false; }
false
false
false
false
false
0
_pgsql_drv_query_error (const char *error, const char *query) { FILE *file; char fn[MAX_FILENAME_LENGTH]; char buf[26]; LOG (LOG_WARNING, "query error: %s: see sql.errors for more details", error); snprintf (fn, sizeof (fn), "%s/sql.errors", LOGDIR); file = fopen (fn, "a"); if (file == NULL) ...
true
true
false
false
true
1
kgdb_hw_overflow_handler(struct perf_event *event, struct perf_sample_data *data, struct pt_regs *regs) { struct task_struct *tsk = current; int i; for (i = 0; i < 4; i++) if (breakinfo[i].enabled) tsk->thread.debugreg6 |= (DR_TRAP0 << i); }
false
false
false
false
false
0
setText(const gchar * pFontFamily) { UT_return_if_fail(pFontFamily); FREEP(m_drawString); UT_UCS4_cloneString_char (&m_drawString, pFontFamily); m_pFontPreview->setDrawString(m_drawString); }
false
false
false
false
false
0
Index_Strand_Width_fill(Index_Strand *index_strand){ register guint64 n; for(n = index_strand->header.max_index_length; n; n >>= 1) index_strand->width.max_index_len_width++; for(n = index_strand->header.total_index_length; n; n >>= 1) index_strand->width.total_index_len_width++; return;...
false
false
false
false
false
0
get_const_by_name (const char *name, int *err) { int id = const_lookup(name); if (id > 0) { return get_const_by_id(id); } else { if (err != NULL) { *err = E_UNKVAR; } return NADBL; } }
false
false
false
false
false
0
printromlist(const struct RomModule *romp,const char *basename) { const struct RomModule *region, *rom, *chunk; char buf[512]; if (!romp) return; #ifdef MESS if (!strcmp(basename,"nes")) return; #endif printf("This is the list of the ROMs required for driver \"%s\".\n" "Name Size ...
false
false
false
false
false
0
gog_child_button_free_additions (GogChildButton *child_button) { GSList *iter; for (iter = child_button->additions; iter != NULL; iter = iter->next) g_free (iter->data); g_slist_free (child_button->additions); child_button->additions = NULL; }
false
false
false
false
false
0
errDetectorInHcrLengths(SCHAR lengthOfLongestCodeword, SHORT lengthOfReorderedSpectralData, UINT *errorWord) { if ( lengthOfReorderedSpectralData < lengthOfLongestCodeword ) { *errorWord |= HCR_SI_LENGTHS_FAILURE; } }
false
false
false
false
false
0
print_token(GScanner * scan, GTokenType tok) { if (tok < G_TOKEN_NONE) d3_printf("tok: %c\n", tok); else { if (tok == G_TOKEN_STRING) d3_printf("tok: string val: %s\n", g_scanner_cur_value(scan).v_string); else if (tok == G_TOKEN_IDENTIFIER) d3_printf("tok: ident val: %s\n", g_scanner_cur_...
false
false
false
false
false
0
gc_db_get_conf(GcomprisProfile *profile, GcomprisBoard *board ) { GHashTable *hash_result = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); SUPPORT_OR_RETURN(hash_result); #ifdef USE_SQLITE return gc_db_conf_with_table_get( profile->profile_id, board->board_id, hash_result) ; #endif }
false
false
false
false
false
0
me2(const int , const Particle & inpart, const ParticleVector & decay, MEOption meopt) const { bool massless[2]; for(unsigned int ix=0;ix<2;++ix) massless[ix] = (decay[ix]->id()==ParticleID::gamma || decay[ix]->id()==ParticleID::g); if(meopt==Initialize) { VectorWave...
false
false
false
false
false
0
patch_stac922x(struct hda_codec *codec) { struct sigmatel_spec *spec; int err; err = alloc_stac_spec(codec); if (err < 0) return err; spec = codec->spec; spec->linear_tone_beep = 1; spec->gen.own_eapd_ctl = 1; snd_hda_add_verbs(codec, stac922x_core_init); /* Fix Mux capture level; max to 2 */ snd_hda_ov...
false
false
false
false
false
0
USBHwInit(void) { // configure P0.23 for Vbus sense PINSEL1 = (PINSEL1 & ~(3 << 14)) | (1 << 14); // P0.23 IODIR0 &= ~(1 << 23); // configure P0.31 for CONNECT PINSEL1 = (PINSEL1 & ~(3 << 30)) | (2 << 30); // P0.31 // enable PUSB PCONP |= (1 << 31); // initialise PLL PLL1CON = 1; // enable PLL PLL1CFG = (...
false
false
false
false
false
0
AuGetScratchFlowToBucket( AuServer *aud, AuBucketID bucket, int *import, AuStatus *ret_status ) { AuElement elements[2]; AuFlowID flow; AuBuck...
false
false
false
false
false
0
ParaUpOrDown(int direction, Selection::selTypes selt) { int lineDoc, savedPos = sel.MainCaret(); do { MovePositionTo(SelectionPosition(direction > 0 ? pdoc->ParaDown(sel.MainCaret()) : pdoc->ParaUp(sel.MainCaret())), selt); lineDoc = pdoc->LineFromPosition(sel.MainCaret()); if (direction > 0) { if (sel.MainC...
false
false
false
false
false
0
createPCZone(PCZSceneManager * pczsm, const String& zoneName) { return OGRE_NEW OctreeZone(pczsm, zoneName); }
false
false
false
false
false
0
gst_field_analysis_update_format (GstFieldAnalysis * filter, GstCaps * caps) { GstStructure *struc; guint32 fourcc; GstVideoFormat vformat; gint width, height, data_offset, sample_incr, line_stride; GQueue *outbufs; struc = gst_caps_get_structure (caps, 0); gst_structure_get_fourcc (struc, "format", &fou...
false
false
false
false
false
0
loadline(lua_State *L, GetLine *gl) { int status; lua_settop(L, 0); if (!pushline(L, true, gl)) return -1; /* no input */ for (;;) { /* repeat until gets a complete line */ status = luaL_loadbuffer(L, lua_tostring(L, 1), lua_strlen(L, 1), "=stdin"); if (!incomplete(L, status)) break; /* cannot tr...
false
false
false
false
false
0
run_list_tests(void) { if (this->formatter != NULL) formatter->setDisplayFullName(hasMultipleTestCase()); this->listener->onListingStart(); for(svutTestCasePtrList::iterator it=suites.begin();it!=suites.end();++it) { if (testFilter == NULL || testFilter->accept((*it)->getName())) (*it)->listTestMethods(*list...
false
false
false
false
false
0
on_skim_start_clicked () { if (g_pReciteWord->firstrecite_skim->started) { if (g_pReciteWord->firstrecite_skim->timeout) { g_source_remove (g_pReciteWord->firstrecite_skim->timeout); g_pReciteWord->firstrecite_skim->timeout = 0; } g_pReciteWord->firstrecite_skim->pause_button. set_enable (FALSE); g...
false
false
false
false
false
0
check_mount(mount_list_t * mount) { struct stat buf; if (lstat(mount->mount_point, &buf) == -1) return 0; if (buf.st_dev == mount_point_dev) return 0; return 1; }
false
false
false
false
false
0
write_int (guint8 *buffer, gint buffer_length, guint32 value, gsize *offset) { if (*offset + 4 >= buffer_length) return; buffer[*offset] = value >> 24; buffer[*offset+1] = (value >> 16) & 0xFF; buffer[*offset+2] = (value >> 8) & 0xFF; buffer[*offset+3] = value & 0xFF; *offset += 4; }
false
false
false
false
false
0
cond_lock_tvar(StgTRecHeader *trec, StgTVar *s, StgClosure *expected) { StgClosure *result; StgWord w; TRACE("%p : cond_lock_tvar(%p, %p)", trec, s, expected); w = cas((void *)&(s -> current_value), (StgWord)expected, (StgWord)trec); result = (StgCl...
false
false
false
false
false
0
echoObjectAdd(echoScene *scene, echoObject *obj) { int idx; if (scene && obj) { idx = airArrayLenIncr(scene->rendArr, 1); scene->rend[idx] = obj; } return 0; }
false
false
false
false
false
0
mergeSvg(QDomDocument & doc1, const QString & svg, const QString & id) { QString errorStr; int errorLine; int errorColumn; if (doc1.isNull()) { return doc1.setContent(svg, &errorStr, &errorLine, &errorColumn); } QDomDocument doc2; if (!doc2.setContent(svg, &errorStr, &errorLine, &errorColumn)) return false; ...
false
false
false
false
false
0
_clearEmptyAttributes() { if(!m_pAttributes) return; UT_GenericStringMap<gchar*>::UT_Cursor _hc1(m_pAttributes); gchar * pEntry; for ( pEntry = _hc1.first(); _hc1.is_valid(); pEntry = _hc1.next()) { if (pEntry && !*pEntry) { UT_return_if_fail (!m_bIsReadOnly); m_pAttributes->remove(_hc1.key(),pEntry...
false
false
false
false
false
0
initialize_handler_parm (tree decl, tree exp) { tree init; tree init_type; /* Make sure we mark the catch param as used, otherwise we'll get a warning about an unused ((anonymous)). */ TREE_USED (decl) = 1; /* Figure out the type that the initializer is. Pointers are returned adjusted by value f...
false
false
false
false
false
0
decode_base64(const char * in, int len) { char * output, * out; int i, c1, c2, c3, c4, out_len; out_len = 0; output = malloc(OUTPUT_SIZE); if (output == NULL) return NULL; out = output; if (in[0] == '+' && in[1] == ' ') in += 2; for (i = 0; i < (len / 4); i++) { c1 = in[0]; c2 = ...
false
false
false
false
false
0
httpd_suspend(List *cgivars, int status_type) { Octstr *reply; if ((reply = httpd_check_authorization(cgivars, 0))!= NULL) return reply; if ((reply = httpd_check_status())!= NULL) return reply; if (bb_suspend() == -1) return octstr_create("Already suspended"); else return octstr_create(GW_NAME " ...
false
false
false
false
false
0
egg_editable_toolbar_dispose (GObject *object) { EggEditableToolbar *etoolbar = EGG_EDITABLE_TOOLBAR (object); EggEditableToolbarPrivate *priv = etoolbar->priv; GList *children; if (priv->fixed_toolbar != NULL) { g_object_unref (priv->fixed_toolbar); priv->fixed_toolbar = NULL; } if (pri...
false
false
false
false
false
0