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
find_temporary_table(THD *thd, const char *table_key, uint table_key_length) { for (TABLE *table= thd->temporary_tables; table; table= table->next) { if (table->s->table_cache_key.length == table_key_length && !memcmp(table->s->table_cache_key.str,...
false
false
false
false
false
0
dvb_device_group_create_and_add_device (DVBDeviceGroup* self, guint adapter, guint frontend) { DVBDevice* new_dev = NULL; guint _tmp0_ = 0U; guint _tmp1_ = 0U; DVBDevice* _tmp2_ = NULL; g_return_if_fail (self != NULL); _tmp0_ = adapter; _tmp1_ = frontend; _tmp2_ = dvb_device_new_with_type (_tmp0_, _tmp1_); new...
false
false
false
false
false
0
n_set_kill(struct Luser *lptr, struct NickInfo *nptr, int ac, char **av) { if (ac < 4) { notice(n_NickServ, lptr->nick, "Kill Protection for [\002%s\002] is [\002%s\002]", nptr->nick, (nptr->flags & NS_PROTECTED) ? "ON" : ((nptr->flags & NS_KILLIMMED) ? "IMMED" : "OFF")); return; } Reco...
false
false
false
false
false
0
get_scroll_tiles(int line, int scrollnum, UINT32 scrollbase, UINT32 *tiles, int *offset) { int linehscroll = vdp_gethscroll(scrollnum, line); int column; /* adjust for partial tiles and then pre-divide hscroll to get the tile offset */ *offset = -(linehscroll % 8); linehscroll /= 8; /* loop over column...
false
false
false
false
false
0
WriteJingleStream(const StreamParams& stream, buzz::XmlElement* parent_elem) { buzz::XmlElement* stream_elem = new buzz::XmlElement(QN_JINGLE_DRAFT_STREAM, false); AddXmlAttrIfNonEmpty(stream_elem, QN_NICK, stream.nick); AddXmlAttrIfNonEmpty(stream_elem, QN_NAME, stream.name); AddXm...
false
false
false
false
false
0
readOneFile(gchar* fileName, gint n0, gint* nP, gdouble* dt) { gint nPoints = 0; gdouble** Dipole= NULL; FILE* file; gchar t[BSIZE]; gint i; gint k; file = fopen(fileName,"rb"); if(!file) printf("I cannot open '%s'\n",fileName); if(!file) return 0; k = 0; *nP = 0; *dt = 0; while(!feof(file)) { if(!fgets...
false
false
false
false
true
1
clientsForFileOrDir(const QString& tpath, bool* isDir) const { QList<Client *> ret; KDE_struct_stat stat_buf; if (KDE::stat(tpath, &stat_buf) == 0) { *isDir = S_ISDIR(stat_buf.st_mode); const KDirWatch::WatchModes flag = *isDir ? KDirWatch::WatchSubDirs : KDirWatch::WatchFiles; Q_FOREACH(Client ...
false
false
false
false
false
0
flstory_draw_sprites(struct mame_bitmap *bitmap, const struct rectangle *cliprect, int pri) { int i; for (i = 0; i < 0x20; i++) { int pr = spriteram[spriteram_size-1 -i]; int offs = (pr & 0x1f) * 4; if ((pr & 0x80) == pri) { int code,sx,sy,flipx,flipy; code = spriteram[offs+2] + ((sprit...
false
false
false
false
false
0
enable_pef_commit (pstdout_state_t pstate, const struct config_keyvalue *kv, ipmi_ctx_t ipmi_ctx, struct config_arguments *cmd_args) { struct pef_control pc; config_err_t ret; assert (kv); assert (ipmi_ctx); assert (cmd_args); if ((ret = _get_pef_co...
false
false
false
false
false
0
library_deinit() { private_library_t *this = (private_library_t*)lib; bool detailed; if (!this || !ref_put(&this->ref)) { /* have more users */ return; } detailed = lib->settings->get_bool(lib->settings, "%s.leak_detective.detailed", TRUE, lib->ns); /* make sure the cache is clear before unloading p...
false
false
false
false
false
0
decode_base64() const { StringAccum sa; if (!decode_base64(sa)) return String(); return sa.take_string(); }
false
false
false
false
false
0
updateCode() { mLanguageTextEditTimer->stop(); if ( mLanguageTextEdit->isEnabled() ) { QString newGMNCode = mLanguageTextEdit->toPlainText(); if ( newGMNCode == mFirstSelectedItem->code() ) { return; } QApplication::setOverrideCursor(Qt::WaitCursor); mSceneHasChanged = true; if ( mFirstSelec...
false
false
false
false
false
0
checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient) { // must be on the same screen if ((screen && screen->screenNumber() != m_tray.window().screenNumber()) || (winclient && winclient->screenNumber() != m_tray.window()....
false
false
false
false
false
0
ComputeMessageRepresentative(RandomNumberGenerator &rng, const byte *recoverableMessage, size_t recoverableMessageLength, HashTransformation &hash, HashIdentifier hashIdentifier, bool messageEmpty, byte *representative, size_t representativeBitLength) const { assert(recoverableMessageLength == 0); assert(hashIden...
false
false
false
false
false
0
check_int32 (VALUE arg) { VALUE int32_max = INT2NUM (2147483647); VALUE int32_min = INT2NUM (-2147483647); if (!rb_obj_is_kind_of (arg, rb_cInteger)) rb_raise (rb_eTypeError, "wrong argument type %s (expected Integer)", rb_obj_classname (arg)); if (rb_funcall2 (arg, id_lt, 1, &int32_min)...
false
false
false
false
false
0
__rpm_get_callback(struct device *dev, size_t cb_offset) { pm_callback_t cb; const struct dev_pm_ops *ops; if (dev->pm_domain) ops = &dev->pm_domain->ops; else if (dev->type && dev->type->pm) ops = dev->type->pm; else if (dev->class && dev->class->pm) ops = dev->class->pm; else if (dev->bus && dev->bus->pm...
false
false
false
false
false
0
photos_collection_icon_watcher_destroy (PhotosCollectionIconWatcher *self) { PhotosCollectionIconWatcherPrivate *priv = self->priv; GHashTableIter iter; PhotosBaseItem *item; gpointer key; g_hash_table_iter_init (&iter, priv->item_connections); while (g_hash_table_iter_next (&iter, (gpointer) &key, (gpoint...
false
false
false
false
false
0
moveIsValid( const QPoint & cell, HeroAction direction ) const { // The short version return ( cellIsValid( cell ) && ( spriteTypeAt( cell ) == NoSprite || ( spriteTypeAt( cell ) == Junkheap && canPushJunkheap( m_spriteMap.value( cell ), direction ) ) ...
false
false
false
false
false
0
enet_address_get_host (const ENetAddress * address, char * name, size_t nameLength) { struct in_addr in; struct hostent * hostEntry = NULL; #ifdef HAS_GETHOSTBYADDR_R struct hostent hostData; char buffer [2048]; int errnum; in.s_addr = address -> host; #if defined(linux) || defined(__GLIBC__) ...
true
true
false
false
false
1
out_push_stream(out_stream_info *stream) { /* * if we're already in the formatter, and the new stream doesn't * match the enclosing recursion level's stream, tell the caller to * abort the operation */ if (G_recurse != 0 && G_cur_stream != stream) return FALSE; ...
false
false
false
false
false
0
xgbe_rx_buf1_len(struct xgbe_ring_data *rdata, struct xgbe_packet_data *packet) { /* Always zero if not the first descriptor */ if (!XGMAC_GET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES, FIRST)) return 0; /* First descriptor with split header, return header length */ if (rdata->rx.hdr_len) return r...
false
false
false
false
false
0
doBalance() { QLuaTextEditMode *mode = d->e->editorMode(); if (mode && mode->supportsBalance() && mode->doBalance()) return; showStatusMessage(tr("Cannot find enclosing expression."), 5000); QLuaApplication::beep(); }
false
false
false
false
false
0
put_file(struct mg_connection *conn, const char *path) { struct mgstat st; const char *range; int64_t r1, r2; FILE *fp; int rc; conn->status_code = mg_stat(path, &st) == 0 ? 200 : 201; if ((rc = put_dir(path)) == 0) { mg_printf(conn, "HTTP/1.1 %d OK\r\n\r\n", conn->status_code); } else if (rc == -...
false
false
false
false
false
0
e_kbd_buf_backspace(E_Kbd_Buf *kb) { Eina_List *l; l = eina_list_last(kb->keystrokes); if (l) { E_Kbd_Buf_Keystroke *ks; ks = l->data; if (ks->key) eina_stringshare_del(ks->key); _e_kbd_buf_layout_unref(ks->layout); free(ks); kb->keystrokes = ei...
false
false
false
false
false
0
_libssh2_dsa_new(libssh2_dsa_ctx ** dsactx, const unsigned char *p, unsigned long p_len, const unsigned char *q, unsigned long q_len, const unsigned char *g, unsigned long g_len, const unsigned char *y...
false
false
false
false
false
0
gsb_assistant_reconcile_config_page_add_new_reconcile ( GtkWidget *button, GtkWidget *label ) { gint reconcile_number; gchar *string; /* first, we check the date are valid */ if ( !gsb_date_check_entry ( reconcile_init_date_entry ) ) { string = make_red ( _("The init...
false
false
false
false
false
0
uv_tcp_keepalive(uv_tcp_t* handle, int on, unsigned int delay) { int err; if (uv__stream_fd(handle) != -1) { err =uv__tcp_keepalive(uv__stream_fd(handle), on, delay); if (err) return err; } if (on) handle->flags |= UV_TCP_KEEPALIVE; else handle->flags &= ~UV_TCP_KEEPALIVE; /* TODO S...
false
false
false
false
false
0
EnableDisableTrigger(Relation rel, const char *tgname, bool enable, bool skip_system) { Relation tgrel; int nkeys; ScanKeyData keys[2]; SysScanDesc tgscan; HeapTuple tuple; bool found; bool changed; /* Scan the relevant entries in pg_triggers */ tgrel = heap_open(TriggerRelationId, RowExclusiveLock)...
false
false
false
false
false
0
OTF_FileManager_touchFile( OTF_FileManager* m, OTF_File* file ) { if ( OTF_FILESTATUS_ACTIVE != OTF_File_status( file ) ) { return 0; } /* unlink 'file' from somewhere in the list and put it to head */ OTF_FileManager_listUnlinkAtHead( &(m->list), file ); OTF_FileManager_listInsertAtHead( &(m->list), file ...
false
false
false
false
false
0
resolve_limbo_wrapper(env, ip) ENV *env; DB_THREAD_INFO *ip; { int do_close, ret, t_ret; if ((ret = __repmgr_hold_master_role(env, NULL)) == DB_REP_UNAVAIL) return (0); if (ret != 0) return (ret); retry: if ((ret = __repmgr_setup_gmdb_op(env, ip, NULL, 0)) != 0) goto rlse; /* * A limbo resolution reque...
false
false
false
false
false
0
GenParser_h_Hdr(void) #else GenParser_h_Hdr() #endif { int i; fprintf(Parser_h, "/*\n"); fprintf(Parser_h, " * %s: P a r s e r H e a d e r \n", CurrentClassName); fprintf(Parser_h, " *\n"); fprintf(Parser_h, " * Generated from:"); for (i=0; i<NumFiles; i++) fprintf(Parser_h, " %s", FileStr[i]); fprintf(Parser_...
false
false
false
false
false
0
host_readlink(const char *pathname, char *target, int len ) { int rv; target[0] = '\0'; if ((rv=readlink(pathname,target,len))<0) return NULL; // put the trailing \0 target[rv] = '\0'; // relative host fs symlinks are converted to absolute ones (why?? PS 090830) if ( target[0] != '/' && target[0] != '\\' && ...
false
false
false
false
false
0
be_vlan_add_vid(struct net_device *netdev, __be16 proto, u16 vid) { struct be_adapter *adapter = netdev_priv(netdev); int status = 0; /* Packets with VID 0 are always received by Lancer by default */ if (lancer_chip(adapter) && vid == 0) return status; if (test_bit(vid, adapter->vids)) return status; set_b...
false
false
false
false
false
0
s5p_mfc_run_enc_frame(struct s5p_mfc_ctx *ctx) { struct s5p_mfc_dev *dev = ctx->dev; unsigned long flags; struct s5p_mfc_buf *dst_mb; struct s5p_mfc_buf *src_mb; unsigned long src_y_addr, src_c_addr, dst_addr; unsigned int dst_size; spin_lock_irqsave(&dev->irqlock, flags); if (list_empty(&ctx->src_queue) && ct...
false
false
false
false
false
0
ConvertToNative(const std::string& strRawFilename, const std::string& strTargetFilename, uint64_t iHeaderSkip, uint64_t iComponentSize, uint64_t, bool, bool, UINT64VECTOR3, FLOATVE...
false
false
false
false
false
0
csum(const void *phdr, const void *data, socklen_t datalen) { register unsigned long sum = 0; socklen_t count; uint16_t *addr; int i; /* caller must make sure datalen is even */ addr = (uint16_t *)phdr; for (i = 0; i < 20; i++) sum += *addr++; count = datalen; addr = (uint16_t *)data; while (count > 1) ...
false
false
false
false
false
0
Stage3end_output_cmp (const void *a, const void *b) { T x = * (T *) a; T y = * (T *) b; if (x->nmatches > y->nmatches) { return -1; } else if (y->nmatches > x->nmatches) { return +1; } else if (x->mapq_loglik > y->mapq_loglik) { return -1; } else if (y->mapq_loglik > x->mapq_loglik) { retur...
false
false
false
false
false
0
read_rule(void *closure, DCELL min, DCELL max, DCELL * val, int *r, int *g, int *b, int *norm, int *nval, int *dflt) { FILE *fp = closure; int tty = isatty(fileno(fp)); *norm = *nval = *dflt = 0; for (;;) { char buf[1024]; int ret, i; if (tty) fprintf(stderr, "> "); if (!G_get...
false
false
false
false
false
0
update_read_2byte_unsigned(STREAM* s, uint16* value) { uint8 byte; stream_read_uint8(s, byte); if (byte & 0x80) { *value = (byte & 0x7F) << 8; stream_read_uint8(s, byte); *value |= byte; } else { *value = (byte & 0x7F); } }
false
false
false
false
false
0
s_is_power_of_two(fp_digit b, int *p) { int x; /* fast return if no power of two */ if ((b==0) || (b & (b-1))) { return 0; } for (x = 0; x < DIGIT_BIT; x++) { if (b == (((fp_digit)1)<<x)) { *p = x; return 1; } } return 0; }
false
false
false
false
false
0
GWEN_Gui_Internal_HideBox(GWEN_GUI *gui, uint32_t id) { GWEN_DIALOG *dlg; if (id) { dlg=GWEN_Dialog_List_First(gui->activeDialogs); while(dlg) { if (GWEN_Dialog_GetGuiId(dlg)==id) break; dlg=GWEN_Dialog_List_Next(dlg); } } else dlg=GWEN_Dialog_List_Last(gui->activeDialogs); if (...
false
false
false
false
false
0
nautilus_directory_moved_internal (GFile *old_location, GFile *new_location) { CollectData collection; NautilusDirectory *directory; GList *node, *affected_files; GFile *new_directory_location; char *relative_path; collection.container = old_location; collection.directories = NULL; g_hash_table_foreach...
false
false
false
false
false
0
QCC_FinishCompile(void) { pbool donesomething; int crc; // int p; currentchunk = NULL; if (setjmp(pr_parse_abort)) QCC_Error(ERR_INTERNAL, ""); if (!QCC_PR_FinishCompilation ()) { QCC_Error (ERR_PARSEERRORS, "compilation errors"); } /* p = QCC_CheckParm ("-asm"); if (p) { for (p++ ; p<myargc ; p++) ...
false
false
false
false
false
0
sp_writer_recv (ShmPipe * self, ShmClient * client) { ShmBuffer *buf = NULL, *prev_buf = NULL; struct CommandBuffer cb; if (!recv_command (client->fd, &cb)) return -1; switch (cb.type) { case COMMAND_ACK_BUFFER: for (buf = self->buffers; buf; buf = buf->next) { if (buf->shm_area->id == ...
false
false
false
false
false
0
nodes_table_create(GtkWidget *window) { GtkTreeView *gv; GtkListStore *gls; GtkTreeModel *sort_model; int i; /* get the treeview */ gv = retrieve_treeview(window); if (!gv) { gv = GTK_TREE_VIEW (glade_xml_get_widget (appdata.xml, "nodes_table")); if (!gv) { g_critical("c...
false
false
false
false
false
0
ex_may_print(eap) exarg_T *eap; { if (eap->flags != 0) { print_line(curwin->w_cursor.lnum, (eap->flags & EXFLAG_NR), (eap->flags & EXFLAG_LIST)); ex_no_reprint = TRUE; } }
false
false
false
false
false
0
fz_paint_span_N(byte * restrict dp, byte * restrict sp, int n, int w) { while (w--) { int k = n; int t = FZ_EXPAND(255 - sp[n-1]); while (k--) { *dp = *sp++ + FZ_COMBINE(*dp, t); dp++; } } }
false
false
false
false
false
0
getWidgetByUid(const QString &uid) const { foreach (QObject *object, children()) { CalendarItemWidget *widget = qobject_cast<CalendarItemWidget*>(object); if (widget && widget->uid() == uid) return widget; } return 0; }
false
false
false
false
false
0
GDALPipeWrite_internal(GDALPipe* p, const void* data, int length) { if(!p->bOK) return FALSE; if( p->fout != CPL_FILE_INVALID_HANDLE ) { int nRet = CPLPipeWrite(p->fout, data, length); if( !nRet ) { CPLError(CE_Failure, CPLE_AppDefined, "Write to pipe failed"); ...
false
false
false
false
false
0
gkm_object_match (GkmObject *self, GkmSession *session, CK_ATTRIBUTE_PTR match) { CK_ATTRIBUTE attr; gboolean matched = FALSE; CK_RV rv; g_return_val_if_fail (GKM_IS_OBJECT (self), FALSE); if (!match->pValue) return FALSE; attr.type = match->type; attr.pValue = g_malloc0 (match->ulValueLen > 4 ? match->ulVa...
false
false
false
false
false
0
update() { int c; if(notenum >= songlen) { songend = true; notenum = last = 0; } for(c = 0; c < 9; c++) if(music[notenum * 9 + c] != music[last * 9 + c]) opl->write(0xb0 + c, 0); for(c = 0; c < 9; c++) { if(music[notenum * 9 + c]) play_note(c, music[notenum * 9 + c] % 12, music[...
false
false
false
false
false
0
bna_rxf_promisc_disable(struct bna_rxf *rxf) { struct bna *bna = rxf->rx->bna; int ret = 0; if (is_promisc_disable(rxf->rxmode_pending, rxf->rxmode_pending_bitmask) || (!(rxf->rxmode_active & BNA_RXMODE_PROMISC))) { /* Do nothing if pending disable or already disabled */ } else if (is_promisc_enable(rxf->r...
false
false
false
false
false
0
_on_cmd_service_move_after(__UNUSED__ char *cmd, char *args) { char *path, *service_path; E_Connman_Element *e; if (!args) { fputs("ERROR: missing the service path\n", stderr); return ECORE_CALLBACK_RENEW; } service_path = args; path = _tok(args); if (!path) { fputs("ERROR: missing...
false
false
false
false
false
0
sv_to_octets(U8 **octets_p, STRLEN *len_p, bool *must_free_p, SV *sv) { U8 *in_str = SvPV(sv, *len_p); bool is_utf8 = !!SvUTF8(sv); *octets_p = bytes_from_utf8(in_str, len_p, &is_utf8); if(is_utf8) croak("input must contain only octets"); *must_free_p = *octets_p != in_str; }
false
false
false
false
false
0
ocrdma_tx_dbg_stats(struct ocrdma_dev *dev) { int i; char *pstats = dev->stats_mem.debugfs_mem; struct ocrdma_rdma_stats_resp *rdma_stats = (struct ocrdma_rdma_stats_resp *)dev->stats_mem.va; struct ocrdma_tx_dbg_stats *tx_dbg_stats = &rdma_stats->tx_dbg_stats; memset(pstats, 0, (OCRDMA_MAX_DBGFS_MEM)); for...
false
false
false
false
false
0
extrainfo_get_by_descriptor_digest(const char *digest) { extrainfo_t *ei; tor_assert(digest); if (!routerlist) return NULL; ei = eimap_get(routerlist->extra_info_map, digest); return ei ? &ei->cache_info : NULL; }
false
false
false
false
false
0
set_maintenance_mode(void *send_info, bool enable) { struct smi_info *smi_info = send_info; if (!enable) atomic_set(&smi_info->req_events, 0); }
false
false
false
false
false
0
freesymtab(Cell *ap) /* free a symbol table */ { Cell *cp, *temp; Array *tp; int i; if (!isarr(ap)) return; tp = (Array *) ap->sval; if (tp == NULL) return; for (i = 0; i < tp->size; i++) { for (cp = tp->tab[i]; cp != NULL; cp = temp) { xfree(cp->nval); if (freeable(cp)) xfree(cp->sval); temp...
false
false
false
false
false
0
add_standard_paths (const char *sysroot, const char *iprefix, const char *imultilib, int cxx_stdinc) { const struct default_include *p; int relocated = cpp_relocated(); size_t len; if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0) { /* Look for directories that start with the standard prefix...
false
false
false
false
false
0
wm8350_get_supplies(struct wm8350 *wm8350) { u16 sm, ov, co, chrg; int supplies = 0; sm = wm8350_reg_read(wm8350, WM8350_STATE_MACHINE_STATUS); ov = wm8350_reg_read(wm8350, WM8350_MISC_OVERRIDES); co = wm8350_reg_read(wm8350, WM8350_COMPARATOR_OVERRIDES); chrg = wm8350_reg_read(wm8350, WM8350_BATTERY_CHARGER_CON...
false
false
false
false
false
0
dumpTSDictionary(Archive *fout, TSDictInfo *dictinfo) { PQExpBuffer q; PQExpBuffer delq; PQExpBuffer query; PGresult *res; int ntups; char *nspname; char *tmplname; /* Skip if not to be dumped */ if (!dictinfo->dobj.dump || dataOnly) return; q = createPQExpBuffer(); delq = createPQExpBuffer(); ...
false
false
false
false
false
0
gst_gsettings_audio_sink_switch_profile (GstGSettingsAudioSink * sink, GstGSettingsAudioSinkProfile profile) { if (sink->settings == NULL) return TRUE; GST_OBJECT_LOCK (sink); sink->profile = profile; GST_OBJECT_UNLOCK (sink); return gst_gsettings_audio_sink_change_child (sink); }
false
false
false
false
false
0
font_face_async_ready_cb (GObject *object, GAsyncResult *result, gpointer user_data) { SushiFontWidget *self = user_data; GError *error = NULL; self->priv->face = sushi_new_ft_face_from_uri_finish (result, &self->priv-...
false
false
false
false
false
0
WaypointReached(uint32 uiPointId) override { if (uiPointId == 24) { DoScriptText(SAY_BELNISTRASZ_START_RIT, m_creature); SetEscortPaused(true); } }
false
false
false
false
false
0
gpg_lookup_key (const std::string& query) { std::vector<std::string> fingerprints; // gpg --batch --with-colons --fingerprint --list-keys jsmith@example.com std::vector<std::string> command; command.push_back("gpg"); command.push_back("--batch"); command.push_back("--with-colons"); command.push_back("--fingerpr...
false
false
false
false
false
0
buildDirectory() { IFileList * list = Parent->createFileList(); if (!list) return; const u32 size = list->getFileCount(); for (u32 i=0; i < size; ++i) { io::path full = list->getFullFileName(i); full = full.subString(Path.size(), full.size() - Path.size()); if (!list->isDirectory(i)) { ...
false
false
false
false
false
0
ParseArguments(sint32_t argc, char *argv[], tConf *Conf) { sint32_t ch; #if defined(WIN32) && !defined(WINCE) // Platform HACK! service_parse_cli(argc, argv); #endif while( (ch = pal_getopt(argc, argv, "h?b?n?y?f:r:i:u:s:")) != -1 ) { switch( ch ) { case 'b': Conf->boot_mode = TRUE; ...
false
false
false
false
true
1
IoObject_symbols(IoObject *self, IoObject *locals, IoMessage *m) { /*doc System symbols Returns a List containing all Symbols currently in the system. */ IoList *list = IoList_new(IOSTATE); SHASH_FOREACH(IOSTATE->symbols, i, v, IoList_rawAppend_(list, v)); return list; }
false
false
false
false
false
0
rgbx_converter(const uchar *from, uchar *to, int w, int delta) { INNARDS32((unsigned(from[0])<<24)+(from[1]<<16)+(from[2]<<8)); }
false
false
false
false
false
0
checkRule(const AdBlockRule *rule, QWebPage *page, const QString &host) { if (!rule->isEnabled()) return; QString filter = rule->filter(); int offset = filter.indexOf(QLatin1String("##")); if (offset == -1) return; QString selectorQuery; if (offset > 0) { QString domain...
false
false
false
false
false
0
order_forward() {untested(); _nm[0] = 0; for (int node = 1; node <= _total_nodes; ++node) {untested(); _nm[node] = node; } }
false
false
false
false
false
0
gra_poly3( int n,float *x,float *y,float *z,float *u,float *v,float *w,float *c) { float coords[3][3], normal[3][3]; int i; for( i=0; i<n; i++ ) { normal[i][0] = u[i]; normal[i][1] = v[i]; normal[i][2] = w[i]; coords[i][0] = x[i]; coords[i][1] = y[i]; coords[i][2]...
false
false
false
false
true
1
s2255_cmd_status(struct s2255_vc *vc, u32 *pstatus) { int res; u32 chn_rev; struct s2255_dev *dev = to_s2255_dev(vc->vdev.v4l2_dev); __le32 *buffer = dev->cmdbuf; mutex_lock(&dev->cmdlock); chn_rev = G_chnmap[vc->idx]; dprintk(dev, 4, "%s chan %d\n", __func__, vc->idx); /* form the get vid status command */ b...
false
false
false
false
false
0
am335x_tscadc_need_adc(struct ti_tscadc_dev *tsadc) { DEFINE_WAIT(wait); u32 reg; reg = tscadc_readl(tsadc, REG_ADCFSM); if (reg & SEQ_STATUS) { tsadc->adc_waiting = true; prepare_to_wait(&tsadc->reg_se_wait, &wait, TASK_UNINTERRUPTIBLE); spin_unlock_irq(&tsadc->reg_lock); schedule(); spin_lock_irq...
false
false
false
false
false
0
is_preferable_to(CdlTransaction other) const { CYG_REPORT_FUNCNAMETYPE("CdlTransactionBody::preferable_to", "result %d"); CYG_REPORT_FUNCARG2XV(this, other); CYG_PRECONDITION_THISC(); CYG_PRECONDITION_CLASSC(other); CYG_PRECONDITIONC(this != other); bool result = false; unsigned int this_ch...
false
false
false
false
false
0
spank_stack_create (const char *file, enum spank_context_type type) { slurm_ctl_conf_t *conf; struct spank_stack *stack = xmalloc (sizeof (*stack)); conf = slurm_conf_lock(); stack->plugin_path = xstrdup (conf->plugindir); slurm_conf_unlock(); stack->type = type; stack->spank_optval = 0xfff; stack->plugin_lis...
false
false
false
false
false
0
generate_int2 (const Type *t, const char *gen_name) { Member *m; fprintf (headerfile, "%s int2%s(unsigned);\n", gen_name, gen_name); fprintf (codefile, "%s int2%s(unsigned n)\n" "{\n" "\t%s flags;\n\n" "\tmemset(&flags, 0, sizeof(flags));\n\n", gen_name, gen_name,...
false
false
false
false
false
0
safefclose(fp) XFILE *fp; { int fd, duperrno; if (!fp) return; duperrno = errno; fd = Xfileno(fp); if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO) VOID_C Xfclose(fp); errno = duperrno; }
false
false
false
false
false
0
gst_base_sink_pad_activate_push (GstPad * pad, gboolean active) { gboolean result; GstBaseSink *basesink; basesink = GST_BASE_SINK (gst_pad_get_parent (pad)); if (active) { if (!basesink->can_activate_push) { result = FALSE; basesink->pad_mode = GST_ACTIVATE_NONE; } else { result = T...
false
false
false
false
false
0
resetTimeRange() { setTimeRange(d->defaultMinTime(), d->defaultMaxTime(), QString(), QString()); }
false
false
false
false
false
0
Back(Queue *Q,void *result) { size_t idx; if (Q == NULL) { iError.RaiseError("iQueue.Front",CONTAINER_ERROR_BADARG); return CONTAINER_ERROR_BADARG; } idx = iList.Size(Q->Items); if (idx == 0) return 0; return iList.CopyElement(Q->Items,idx-1,result); }
false
false
false
false
false
0
normalize_find_opts( git_diff_list *diff, git_diff_find_options *opts, git_diff_find_options *given) { git_config *cfg = NULL; if (diff->repo != NULL && git_repository_config__weakptr(&cfg, diff->repo) < 0) return -1; if (given != NULL) memcpy(opts, given, sizeof(*opts)); else { const char *val = NULL;...
false
false
false
false
false
0
sortCompare(const void *s1, const void *s2) { const redisSortObject *so1 = s1, *so2 = s2; int cmp; if (!server.sort_alpha) { /* Numeric sorting. Here it's trivial as we precomputed scores */ if (so1->u.score > so2->u.score) { cmp = 1; } else if (so1->u.score < so2->u.sco...
false
false
false
false
false
0
mono_lock_free_array_nth (MonoLockFreeArray *arr, int index) { Chunk *chunk; g_assert (index >= 0); if (!arr->chunk_list) { chunk = alloc_chunk (arr); mono_memory_write_barrier (); if (InterlockedCompareExchangePointer ((volatile gpointer *)&arr->chunk_list, chunk, NULL) != NULL) free_chunk (chunk); } ...
false
false
false
false
false
0
Spawn_3(WamWord cmd_word, WamWord list_word, WamWord status_word) { WamWord word, tag_mask; WamWord save_list_word; WamWord *lst_adr; char *arg[MAX_SPAWN_ARGS]; char **p = arg; char err[64]; int status; save_list_word = list_word; *p++ = Rd_String_Check(cmd_word); for (;;) { DEREF(list_...
false
false
false
false
false
0
MyStringCompare(const char *s1, const char *s2) { while (true) { unsigned char c1 = (unsigned char)*s1++; unsigned char c2 = (unsigned char)*s2++; if (c1 < c2) return -1; if (c1 > c2) return 1; if (c1 == 0) return 0; } }
false
false
false
false
false
0
gnibbles_worm_queue_empty (GnibblesWorm * worm) { key_queue_entry *entry; int n = worm->number; if (!key_queue[n]) return; while (!g_queue_is_empty (key_queue[n])) { entry = g_queue_pop_head (key_queue[n]); g_free (entry); } }
false
false
false
false
false
0
DoWrap4args ( Obj self, Obj arg1, Obj arg2, Obj arg3, Obj arg4 ) { Obj result; /* value of function call, result */ Obj args; /* arguments list ...
false
false
false
false
false
0
linevector_copy (struct linevector *to, struct linevector *from) { unsigned int ln; for (ln = 0; ln < to->nlines; ++ln) { if (--to->vector[ln]->refcount == 0) free (to->vector[ln]); } if (from->nlines > to->lines_alloced) { if (to->lines_alloced == 0) to->lines_alloced = 10; while ...
false
true
false
false
false
1
get_column_header_vfunc(int column) { BaseClassType *const base = static_cast<BaseClassType*>( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. )...
false
false
false
false
false
0
unpack_delta_entry(struct packed_git *p, struct pack_window **w_curs, off_t curpos, unsigned long delta_size, off_t obj_offset, enum object_type *type, unsigned long *sizep) { void *delta_data, *result, *base; unsigned long base_size; off_t base_offset; base_offset = get_delta_base(p, w_cur...
false
false
false
false
false
0
UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { return; } // Immolate_Timer if (m_uiImmolateTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET...
false
false
false
false
false
0
ctts_dump(GF_Box *a, FILE * trace) { GF_CompositionOffsetBox *p; u32 i, nb_samples; p = (GF_CompositionOffsetBox *)a; fprintf(trace, "<CompositionOffsetBox EntryCount=\"%d\">\n", p->nb_entries); DumpBox(a, trace); gf_full_box_dump(a, trace); nb_samples = 0; for (i=0; i<p->nb_entries;i++) { fprintf(trace, "<C...
false
false
false
false
false
0
m_time(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { /* this is not rate limited, so end the grace period */ if(MyClient(source_p) && !IsFloodDone(source_p)) flood_endgrace(source_p); if(hunt_server(client_p, source_p, ":%s TIME :%s", 1, parc, parv) == HUNTED_ISME) sendto_one...
false
false
false
false
false
0
ti1570_transmit_transp_cell(struct pa_a1_data *d, ti1570_tx_dma_entry_t *tde, int atm_set_eop,int *buf_end) { m_uint32_t buf_size,len; int pkt_end,last_cell; pkt_end = tde->ctrl_buf & TI1570_TX_DMA_EOP; buf_size = tde->ctrl_buf &...
false
false
false
false
false
0
dump() const { QMap<QString, QStringList>::ConstIterator it; for ( it = mValues.begin(); it != mValues.end(); ++it ) { for ( int i = 0; i < it.value().count(); ++i ) { qDebug( "%s: %s", qPrintable( it.key() ), qPrintable( it.value()[ i ] ) ); } } qDebug( " " ); }
false
false
false
false
false
0
msi_mask(unsigned x) { /* Don't shift by >= width of type */ if (x >= 5) return 0xffffffff; return (1 << (1 << x)) - 1; }
false
false
false
false
false
0
InternalT(real X, real Y, real Z, real& deltaX, real& deltaY, real& deltaZ, bool gradp, bool correct) const throw() { // If correct, then produce the correct T = W - U. Otherwise, neglect the // n = 0 term (which is proportial to the dif...
false
false
false
false
false
0
ti_escape_memory (const char *in, const char *end) { static char out_buffer[256]; char c; char *out; out = out_buffer; do { c = *(in++); switch (c) { case '\e': *out++ = '\\'; *out++ = 'e'; break; case ' ': *out++ = '\\'; *out++ = 's'; break; case '\\': *out++ = '\\'; *out++ = '...
true
true
false
false
false
1
rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) { int len; u16 val16; __le16 le_tmp; unsigned char wpa_oui_type[] = {0x00, 0x50, 0xf2, 0x01}; u8 *pbuf = pie; int limit_new = limit; while (1) { pbuf = rtw_get_ie(pbuf, _WPA_IE_ID_, &len, limit_new); if (pbuf) { /* check if oui matches... */...
false
false
false
false
false
0