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
CreateWhile(IterationStatement* statement, HBasicBlock* loop_entry, HBasicBlock* cond_false, HBasicBlock* body_exit, HBasicBlock* break_block) { if (break_blo...
false
false
false
false
false
0
sge_ar_state_set_running(lListElem *ar) { u_long32 old_state = lGetUlong(ar, AR_state); if (old_state == AR_DELETED || old_state == AR_EXITED) { return; } if (sge_ar_has_errors(ar)) { lSetUlong(ar, AR_state, AR_ERROR); if (old_state != AR_WARNING && old_state != lGetUlong(ar, AR_state)) ...
false
false
false
false
false
0
e_cell_draw (ECellView *ecell_view, cairo_t *cr, gint model_col, gint view_col, gint row, ECellFlags flags, gint x1, gint y1, gint x2, gint y2) { ECellClass *class; g_return_if_fail (ecell_view != NUL...
false
false
false
false
false
0
cb_tree(Fl_Tree*, void*) { G_cb_counter++; // Increment callback counter whenever tree callback is invoked Fl_Tree_Item *item = tree->callback_item(); if ( item ) { fprintf(stderr, "TREE CALLBACK: label='%s' userdata=%ld reason=%s, changed=%d", item->label(), (long)(fl_intptr_t)tree->user_data()...
false
false
false
false
false
0
st21nfca_get_iso14443_3_atqa(struct nfc_hci_dev *hdev, u16 *atqa) { int r; struct sk_buff *atqa_skb = NULL; r = nfc_hci_get_param(hdev, ST21NFCA_RF_READER_14443_3_A_GATE, ST21NFCA_RF_READER_14443_3_A_ATQA, &atqa_skb); if (r < 0) goto exit; if (atqa_skb->len != 2) { r = -EPROTO; goto exit; } *at...
false
false
false
false
false
0
reshape_position_show(struct mddev *mddev, char *page) { if (mddev->reshape_position != MaxSector) return sprintf(page, "%llu\n", (unsigned long long)mddev->reshape_position); strcpy(page, "none\n"); return 5; }
false
false
false
false
false
0
amdtp_stream_destroy(struct amdtp_stream *s) { WARN_ON(amdtp_stream_running(s)); kfree(s->protocol); mutex_destroy(&s->mutex); }
false
false
false
false
false
0
GetFileList() { char **papszFileList = GDALPamDataset::GetFileList(); CPLString pszJSONFilename = GetJsonFilename(pszFilename); papszFileList = CSLAddString( papszFileList, pszJSONFilename ); return papszFileList; }
false
false
false
false
false
0
_e2_edit_dialog_blink (E2_ViewDialogRuntime *rt) { // printd (DEBUG, "edit dialog cursor visibility toggle cb"); // gdk_threads_enter (); // gboolean blinkme = TRUE; //GTK_WIDGET_HAS_FOCUS (rt->dialog); // if (blinkme) // { // g_source_remove (blink_id); if (GTK_IS_WIDGET (rt->textview)) { //the dialog hasn't been c...
false
false
false
false
false
0
instance_find_by_funit( funit_inst* root, /*!< Pointer to root functional unit instance of tree */ const func_unit* funit, /*!< Pointer to functional unit to find in tree */ /*@out@*/ int* ignore /*!< Pointer to number of matches to ignore */ ) { PROFILE(INSTANCE_FIND_BY_F...
false
false
false
false
false
0
asString(InsetMath const & inset) { odocstringstream os; WriteStream ws(os); inset.write(ws); return os.str(); }
false
false
false
false
false
0
net_flush(void) { struct sockinfo *i; i = sockets; while (i) { struct sockinfo *n; n = i->next; if (!i->closed) debug("Flushing undead %01x socket %d", i->type, i->sock); _net_free(i); i = n; } sockets = 0; /* Free up the ufds buffer */ net_poll(); return 0; }
false
false
false
false
false
0
add(string text, int column) { if (column > cols) { fprintf(stderr, "Such column does not exist!\n"); return; } flesh[column].push_back(text); }
false
false
false
false
false
0
UnitTargets( Unit *u ) const { bool rc = false; Unit *tg = static_cast<Unit *>( mission->GetUnits().Head() ); while ( tg && !rc ) { rc = u->CanHit( tg ); tg = static_cast<Unit *>( tg->Next() ); } if ( !rc ) rc = MinesweeperTargets( u ); return rc; }
false
false
false
false
false
0
parseRBGroupsArray( Array *rBGroupArray ) { if (! rBGroupArray) { return; } // This is an array of array(s) for (int i = 0; i < rBGroupArray->getLength(); ++i) { Object rbObj; rBGroupArray->get(i, &rbObj); if ( ! rbObj.isArray() ) { qDebug() << "expected inner array, got:" << ...
false
false
false
false
false
0
gdev_mem_set_line_ptrs(gx_device_memory * mdev, byte * base, int raster, byte **line_ptrs, int setup_height) { int num_planes = mdev->num_planes; gx_render_plane_t plane1; const gx_render_plane_t *planes; byte **pline = (line_ptrs ? (mdev->line_ptrs = line_ptrs) : mdev->li...
false
false
false
false
false
0
add_child(ralloc_header *parent, ralloc_header *info) { if (parent != NULL) { info->parent = parent; info->next = parent->child; parent->child = info; if (info->next != NULL) info->next->prev = info; } }
false
false
false
false
false
0
fsdbm_store(VALUE obj, VALUE keystr, VALUE valstr) { datum key, val; struct dbmdata *dbmp; DBM *dbm; if (valstr == Qnil) { fsdbm_delete(obj, keystr); return Qnil; } fdbm_modify(obj); ExportStringValue(keystr); ExportStringValue(valstr); key.dptr = RSTRING_PTR(keystr); key.ds...
false
false
false
false
false
0
intermediate_sources(__isl_keep isl_access_info *acc, struct isl_map **temp_rel, int j, int sink_level) { int k, level; int depth = 2 * isl_map_dim(acc->source[j].map, isl_dim_in) + 1; if (isl_map_plain_is_empty(temp_rel[j])) return 0; for (k = j - 1; k >= 0; --k) { int plevel, plevel2; plevel = acc->level...
false
false
false
false
false
0
fp_mul_2d(fp_int *a, int b, fp_int *c) { fp_digit carry, carrytmp, shift; int x; /* copy it */ fp_copy(a, c); /* handle whole digits */ if (b >= DIGIT_BIT) { fp_lshd(c, b/DIGIT_BIT); } b %= DIGIT_BIT; /* shift the digits */ if (b != 0) { carry = 0; shift = DIGIT_BIT...
false
false
false
false
true
1
_parse_stream(config_t *config, xmlDocPtr doc, xmlNodePtr node) { do { if (node == NULL) break; if (xmlIsBlankNode(node)) continue; if (strcmp(node->name, "metadata") == 0) _parse_metadata(NULL, config, doc, node->xmlChildrenNode); else if (strcmp(node->name, "input...
false
false
false
false
false
0
lastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client) { if (m_focused_list.empty() || m_screen.isShuttingdown()) return 0; Focusables::iterator it = m_focused_list.clientList().begin(); Focusables::iterator it_end = m_focused_list.clientList().end(); for (; it != it_end; ++it) { ...
false
false
false
false
false
0
regmap_encx24j600_write(void *context, const void *data, size_t len) { u8 *dout = (u8 *)data; u8 reg = dout[0]; ++dout; --len; if (reg > 0xa0) return regmap_encx24j600_spi_write(context, reg, dout, len); if (len > 2) return -EINVAL; return regmap_encx24j600_sfr_write(context, reg, dout, len); }
false
false
false
false
false
0
link_element_decl(ElementT *e) { if (e->router()->declaration_scope()) return "e" + String(cid(e->router())) + "-" + e->name(); else return "e-" + e->name(); }
false
false
false
false
false
0
actual_shutdown() { ASSERT_OMNI_TRACEDMUTEX_HELD(orb_lock, 1); OMNIORB_ASSERT(pd_shutdown_in_progress); //?? Is is safe to unlock orb_lock here? orb_lock.unlock(); // Shutdown object adapters. When this returns all // outstanding requests have completed. omniOrbPOA::shutdown(); // Shutdown incoming ...
false
false
false
false
false
0
enqueue(struct most_interface *most_iface, int ch_idx, struct mbo *mbo) { struct dim2_hdm *dev = iface_to_hdm(most_iface); struct hdm_channel *hdm_ch = dev->hch + ch_idx; unsigned long flags; BUG_ON(ch_idx < 0 || ch_idx >= DMA_CHANNELS); if (!hdm_ch->is_initialized) return -EPERM; if (mbo->bus_address =...
false
false
false
false
false
0
afr_sh_entry_done (call_frame_t *frame, xlator_t *this) { afr_local_t *local = NULL; afr_self_heal_t *sh = NULL; local = frame->local; sh = &local->self_heal; if (sh->healing_fd) fd_unref (sh->healing_fd); sh->healing_fd = NULL; sh->completi...
false
false
false
false
false
0
on_enterleave_call (pTHX_ SV *cb) { dSP; PUSHSTACK; PUSHMARK (SP); PUTBACK; call_sv (cb, G_VOID | G_DISCARD); SPAGAIN; POPSTACK; }
false
false
false
false
false
0
finalize (GObject *object) { NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (object); if (priv->request_status_id) g_source_remove (priv->request_status_id); if (priv->io_channel) nm_netlink_monitor_close_connection (NM_NETLINK_MONITOR (object)); if (priv->link_cache) { nl_cache_free (priv-...
false
false
false
false
false
0
DGG_is2stepValid(double alpha, double bht) { /* d */ double tau; /* ensure that alpha is not null or negative */ if ( alpha < DGG_MIN_ALPHA ) return 0; /* compute tau and tau_lim */ tau = ceil( bht / alpha ); /* make sure alpha is not a divisor of bht */ if ( DGG_is_a_multiple_of_b(alpha, bht) )...
false
false
false
false
false
0
CreateOrderList() { if (List != 0) return true; delete List; List = new pkgOrderList(&Cache); if (Debug && ImmConfigureAll) clog << "CreateOrderList(): Adding Immediate flag for all packages because of APT::Immediate-Configure-All" << endl; // Generate the list of affected packages ...
false
false
false
false
false
0
_sapi_cgibin_putenv(char *name, char *value TSRMLS_DC) { int name_len; #if !HAVE_SETENV || !HAVE_UNSETENV int len; char *buf; #endif if (!name) { return NULL; } name_len = strlen(name); /* when php is started by mod_fastcgi, no regular environment * is provided to PHP. It is always sent to PHP at the star...
false
false
false
false
false
0
push(const includings &ni) { last = new ifnode(new includings(ni), last); }
false
false
false
false
false
0
debug_output_data (const char *fmt, ...) { va_list ap; if (debug_open ()) return; va_start (ap, fmt); vfprintf (debug_fp, fmt, ap); va_end (ap); debug_close (); }
false
false
false
false
true
1
PrintSelf(std::ostream & os, Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Original Path: " << m_OriginalPath << std::endl; os << indent << "Correction Table: " << m_OrthogonalCorrectionTable << std::endl; }
false
false
false
false
false
0
getPcapPacketsDropped() { struct pcap_stat ps_stats; pcap_stats(sniffer, &ps_stats); if ((pcap_stats(sniffer, &ps_stats)) < 0) { printf("WARNING: Couldn't get pcap stats: %s", pcap_geterr(sniffer)); } return(ps_stats.ps_drop); }
false
false
false
false
false
0
udf_update_extent_cache(struct inode *inode, loff_t estart, struct extent_position *pos, int next_epos) { struct udf_inode_info *iinfo = UDF_I(inode); spin_lock(&iinfo->i_extent_cache_lock); /* Invalidate previously cached extent */ __udf_clear_extent_cache(inode); if (pos->bh) get_bh(pos->bh); memcpy(...
false
true
false
false
false
1
nvpair_database_remove( struct nvpair_database *db, const char *key ) { const char *nkey = strdup(key); struct nvpair *nv = hash_table_remove(db->table,nkey); if(db->logdir && nv) { log_delete(db,nkey); log_flush(db); } return nv; }
false
false
false
false
true
1
fm_path_entry_changed(GtkEditable *editable, gpointer user_data) { FmPathEntry *entry = FM_PATH_ENTRY(editable); FmPathEntryPrivate *priv = FM_PATH_ENTRY_GET_PRIVATE(entry); const gchar *path_str, *sep; #if GLIB_CHECK_VERSION(2, 36, 0) GTask *task; #endif if(priv->model == NULL) return; ...
false
false
false
false
false
0
zchar_show_width_only(const gs_text_enum_t * penum) { if (!gs_text_is_width_only(penum)) return false; switch (penum->orig_font->FontType) { case ft_encrypted: case ft_encrypted2: case ft_CID_encrypted: case ft_CID_TrueType: case ft_CID_bitmap: case ft_TrueType: return tr...
false
false
false
false
false
0
login_init_entry(struct logininfo *li, int pid, const char *username, const char *hostname, const char *line) { struct passwd *pw; memset(li, 0, sizeof(*li)); li->pid = pid; /* set the line information */ if (line) line_fullname(li->line, line, sizeof(li->line)); if (username) { strlcpy(li->username, u...
false
false
false
true
false
1
tkhd_dump(GF_Box *a, FILE * trace) { GF_TrackHeaderBox *p; p = (GF_TrackHeaderBox *)a; fprintf(trace, "<TrackHeaderBox "); fprintf(trace, "CreationTime=\""LLD"\" ModificationTime=\""LLD"\" TrackID=\"%u\" Duration=\""LLD"\"", LLD_CAST p->creationTime, LLD_CAST p->modificationTime, p->trackID, LLD_CAST p->duration...
false
false
false
false
false
0
get_CSR_from_symmMatrix(int n, const symmMatrix & A, std::vector<int> const & inversePermutationHML, csr_matrix_struct & CSR) { std::vector<int> rowind; std::vector<int> colind; std::vector<ergo_real> values; A.get_all_values(rowind, colind, values, inversePermutationHML, inversePer...
false
false
false
false
false
0
fr_connection_get(fr_connection_pool_t *fc) { time_t now; fr_connection_t *this, *next; if (!fc) return NULL; pthread_mutex_lock(&fc->mutex); now = time(NULL); for (this = fc->head; this != NULL; this = next) { next = this->next; if (!fr_connection_manage(fc, this, now)) continue; if (!this->used) goto...
false
false
false
false
false
0
epsv(char *proto) { socklen_t len; pdata = socket(ctrl_addr->sa_family, SOCK_STREAM, 0); if (pdata < 0) { perror_reply(425, "Can't open passive connection"); return; } pasv_addr->sa_family = ctrl_addr->sa_family; socket_set_address_and_port (pasv_addr, socket_get_address (ctrl_addr), 0); s...
false
false
false
false
false
0
resize(int n) { int add = n - m_Elems.size() + 1; while (add > 0) { m_Elems.push_back(NULL); add--; } }
false
false
false
false
false
0
totem_cmml_parse_time_str (const gchar *str) { if (G_UNLIKELY (str == NULL)) return -1.0; /* we need to choose parsing function to use */ if (g_str_has_prefix (str, "npt:")) return totem_cmml_parse_npt (str + 4); if (g_str_has_prefix (str, "smpte-24:")) return totem_cmml_parse_smpte (str + 9, 24.0); if (g...
false
false
false
false
false
0
nifti_copynsort(int nbricks, const int * blist, int ** slist, int ** sindex) { int * stmp, * itmp; /* for ease of typing/reading */ int c1, c2, spos, tmp; *slist = (int *)malloc(nbricks * sizeof(int)); *sindex = (int *)malloc(nbricks * sizeof(int)); if( !*slist || !*sind...
false
false
false
false
false
0
cd_client_create_device (CdClient *client, const gchar *id, CdObjectScope scope, GHashTable *properties, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { const gchar *value; GSimpleAsyncResult *res; GVariantBuilder builder; GList *list, *l; g_return_if_fail (C...
false
false
false
false
false
0
wep_data_decryptor(kis_packet *in_pack) { kis_datachunk *manglechunk = NULL; if (in_pack->error) return 0; // Grab the 80211 info, compare, bail kis_ieee80211_packinfo *packinfo; if ((packinfo = (kis_ieee80211_packinfo *) in_pack->fetch(_PCM(PACK_COMP_80211))) == NULL) return 0; if (packinfo->corrupt...
false
false
false
false
false
0
pasteClipboard( const KUrl& destUrl, QWidget* widget, bool move ) { Q_UNUSED(move); if ( !destUrl.isValid() ) { KMessageBox::error( widget, i18n( "Malformed URL\n%1", destUrl.prettyUrl() ) ); return 0; } // TODO: if we passed mimeData as argument, we could write unittests that don't // mess up the...
false
false
false
false
false
0
readBit() { int bit; int c, c2; if (inputBits == 0) { if ((c = iSource.getChar()) == EOF) return EOF; if (c == 0xff) { do { c2 = iSource.getChar(); } while (c2 == 0xff); if (c2 != 0x00) { ipeDebug("Bad DCT data: missing 00 after ff"); return EOF; } } inputBuf = c;...
false
false
false
false
false
0
ipw2100_wx_get_essid(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { /* * This can be called at any time. No action lock required */ struct ipw2100_priv *priv = libipw_priv(dev); /* If we are associated, trying to associate, or have a statically * configu...
false
true
false
false
false
1
dwceqos_get_ethtool_stats(struct net_device *ndev, struct ethtool_stats *stats, u64 *data) { struct net_local *lp = netdev_priv(ndev); unsigned long flags; size_t i; u8 *mmcstat = (u8 *)&lp->mmc_counters; spin_lock_irqsave(&lp->stats_lock, flags); dwceqos_read_mmc_counters(lp, lp->mmc_rx_counters_mask,...
false
true
false
false
false
1
fore200e_getstats(struct fore200e* fore200e) { struct host_cmdq* cmdq = &fore200e->host_cmdq; struct host_cmdq_entry* entry = &cmdq->host_entry[ cmdq->head ]; struct stats_opcode opcode; int ok; u32 stats_dma_addr; if (fore200e->stats == NULL) ...
false
false
false
false
false
0
index_path(unsigned char *sha1, const char *path, struct stat *st, unsigned flags) { int fd; struct strbuf sb = STRBUF_INIT; switch (st->st_mode & S_IFMT) { case S_IFREG: fd = open(path, O_RDONLY); if (fd < 0) return error("open(\"%s\"): %s", path, strerror(errno)); if (index_fd(sha1, fd, st, OBJ...
false
false
false
false
false
0
find_child(private_child_rekey_t *this, message_t *message) { notify_payload_t *notify; protocol_id_t protocol; u_int32_t spi; notify = message->get_notify(message, REKEY_SA); if (notify) { protocol = notify->get_protocol_id(notify); spi = notify->get_spi(notify); if (protocol == PROTO_ESP || protocol == ...
false
false
false
false
false
0
renderTo( QwtPlot *plot, QSvgGenerator &generator ) const { QRectF rect = generator.viewBoxF(); if ( rect.isEmpty() ) rect.setRect( 0, 0, generator.width(), generator.height() ); if ( rect.isEmpty() ) rect.setRect( 0, 0, 800, 600 ); // something QPainter p( &generator ); render...
false
false
false
false
false
0
list_remove_current(List *list) { if (!list || !list->lister) { set_errno(EINVAL); return; } lister_remove(list->lister); }
false
false
false
false
false
0
adis16480_read_raw(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, int *val, int *val2, long info) { struct adis16480 *st = iio_priv(indio_dev); switch (info) { case IIO_CHAN_INFO_RAW: return adis_single_conversion(indio_dev, chan, 0, val); case IIO_CHAN_INFO_SCALE: switch (chan->type) { case I...
false
false
false
false
false
0
cArgRead (cookedArgs *const current) { char* item; Assert (current != NULL); if (! argOff (current->args)) { item = argItem (current->args); current->shortOptions = NULL; Assert (item != NULL); if (strncmp (item, "--", (size_t) 2) == 0) { current->isOption = TRUE; current->longOption = TRUE; par...
false
false
false
false
false
0
emsgn(s, n) char_u *s; long n; { if (emsg_not_now()) return TRUE; /* no error messages at the moment */ vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n); return emsg(IObuff); }
false
false
false
false
false
0
hosts_expand_cyclic(int nsrchosts, char **srchosts, int *srcports, int ndsthosts, char **dsthosts, int *dstports) { int i, j; for (i = 0, j = 0; i < ndsthosts; i++, j++) { if (j >= nsrchosts) j = 0; dsthosts[i] = srchosts[j]; dstports[i] = dstports[j]; } }
false
false
false
false
false
0
cleanup_script(void *vptr) { struct cleanup_script_info *info = vptr; int sd; int rc; cgid_req_t req = {0}; pid_t pid; apr_status_t stat; rc = connect_to_daemon(&sd, info->r, info->conf); if (rc != OK) { return APR_EGENERAL; } /* we got a socket, and there is already a ...
false
false
false
false
false
0
stop_video() { bool was_already_stop = true; m_videothread_must_exit = true; if (isVideoStreamming()) { joinThread(m_videoThread); was_already_stop = false; } m_videoThread.clear(); return !was_already_stop; }
false
false
false
false
false
0
is_end_with(char *str, const char *pattern) { if (!strcmp(str + strlen(str) - strlen(pattern), pattern)) return TRUE; else return FALSE; }
true
true
false
false
true
1
afr_sh_data_trim_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *prebuf, struct iatt *postbuf, dict_t *xdata) { int call_count = 0; int child_index = 0; afr_private_t *...
false
false
false
false
false
0
Accept(SocketAddress *out_addr) { sockaddr_storage addr_storage; socklen_t addr_len = sizeof(addr_storage); sockaddr* addr = reinterpret_cast<sockaddr*>(&addr_storage); SOCKET s = ::accept(s_, addr, &addr_len); UpdateLastError(); if (s == INVALID_SOCKET) return NULL; enabled_events_ |=...
false
false
false
false
false
0
if_sdio_read_rx_len(struct if_sdio_card *card, int *err) { int ret; u16 rx_len; switch (card->model) { case MODEL_8385: case MODEL_8686: rx_len = if_sdio_read_scratch(card, &ret); break; case MODEL_8688: default: /* for newer chipsets */ rx_len = sdio_readb(card->func, IF_SDIO_RX_LEN, &ret); if (!ret) ...
false
false
false
false
false
0
fill_buffer(multipart_buffer *self) { int bytes_to_read, actual_read = 0; /* shift the existing data if necessary */ if(self->bytes_in_buffer > 0 && self->buf_begin != self->buffer) memmove(self->buffer, self->buf_begin, self->bytes_in_buffer); self->buf_begin = self->buffer; /* calculate the fr...
false
false
false
false
false
0
png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x, png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y, png_fixed_point *blue_x, png_fixed_point *blue_y) { png_debug1(1, "in %s retrieval function", "c...
false
false
false
false
false
0
show_confirm_dialog (CcBluetoothPanel *self, const char *name) { GtkWidget *dialog, *parent; gint response; parent = gtk_widget_get_toplevel (GTK_WIDGET (self)); dialog = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("Remove '%s' from th...
false
false
false
false
false
0
canvas_put_sprite_fogged(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite, bool fog, int fog_x, int fog_y) { if (pcanvas->type == CANVAS_PIXMAP) { pixmap_put_overlay_tile_draw(pcanvas->v.pixmap, canvas_x, canvas_y, psprite, fog); } }
false
false
false
false
false
0
__dns_make_fd6(void) { int tmp; struct sockaddr_in6 si; if (__dns_fd6>=0) return; tmp=socket(PF_INET6,SOCK_DGRAM,IPPROTO_UDP); if (tmp<0) return; fcntl(tmp,F_SETFD,FD_CLOEXEC); memset(&si,0,sizeof(si)); si.sin6_family=AF_INET6; if (bind(tmp,(struct sockaddr*)&si,sizeof(si))) return; __dns_fd6=tmp; }
false
false
false
false
false
0
atk_remove(struct acpi_device *device) { struct atk_data *data = device->driver_data; dev_dbg(&device->dev, "removing...\n"); device->driver_data = NULL; atk_debugfs_cleanup(data); atk_remove_files(data); atk_free_sensors(data); hwmon_device_unregister(data->hwmon_dev); if (data->disable_ec) { if (atk_ec_...
false
false
false
false
false
0
writeAsPOV() { //generate filename string fn=makeFilename(); // open file ofstream out_file(fn.c_str()); // work out object size Vec3 vmin,vmax; for(map<int,Vec3>::iterator iter=m_pos_map.begin(); iter!=m_pos_map.end(); iter++){ vmin=cmin(vmin,iter->second); vmax=cmax(vmax,iter->secon...
false
false
false
false
false
0
setGeometry( const QRect &rect ) { QLayout::setGeometry( rect ); if ( isEmpty() ) return; d_data->numCols = columnsForWidth( rect.width() ); d_data->numRows = itemCount() / d_data->numCols; if ( itemCount() % d_data->numCols ) d_data->numRows++; QList<QRect> itemGeometries = l...
false
false
false
false
false
0
InitAnimSystem(void) { D(bug("Start: InitAnimSystem!\n")); MyNewList(&DrawList); MyNewList(&GfxList); if (!use_window) { if (!ClipX || !ClipY) { ClipX = os_get_screen_width(); ClipY = os_get_screen_height(); } } return TRUE; }
false
false
false
false
false
0
parseCommandFile(const char *argValue, OFList<OFString> &argList) { E_ParseStatus result = PS_NoArguments; /* check for command file parameter (syntax: "@filename") */ if ((argValue != NULL) && (argValue[0] == COMMAND_FILE_PREFIX) && (argValue[1] ...
false
false
false
false
false
0
cmor_has_variable_attribute(int id, char *attribute_name) { extern cmor_var_t cmor_vars[]; int i,index; char type; char msg[CMOR_MAX_STRING]; cmor_add_traceback("cmor_has_variable_attribute"); cmor_is_setup(); index=-1; for (i=0;i<cmor_vars[id].nattributes;i++) { if (strcmp(cmor_vars[id].attributes[...
false
false
false
false
false
0
put_io_context_active(struct io_context *ioc) { unsigned long flags; struct io_cq *icq; if (!atomic_dec_and_test(&ioc->active_ref)) { put_io_context(ioc); return; } /* * Need ioc lock to walk icq_list and q lock to exit icq. Perform * reverse double locking. Read comment in ioc_release_fn() for * exp...
false
false
false
false
false
0
connection_link_connections(connection_t *conn_a, connection_t *conn_b) { tor_assert(! SOCKET_OK(conn_a->s)); tor_assert(! SOCKET_OK(conn_b->s)); conn_a->linked = 1; conn_b->linked = 1; conn_a->linked_conn = conn_b; conn_b->linked_conn = conn_a; }
false
false
false
false
false
0
ifpart (LexState *ls) { /* ifpart -> cond THEN block [ELSE block | ELSEIF ifpart] */ int c = cond(ls); int e; check(ls, THEN); block(ls); e = SaveWord(ls); switch (ls->token) { case ELSE: next(ls); block(ls); break; case ELSEIF: next(ls); ifpart(ls); break; }...
false
false
false
false
false
0
sinfo_log_pro(char* name_o, const char* pro_catg, int frm_type, cpl_frameset* ref_set, cpl_frameset** out_set, cpl_propertylist** plist, cpl_parameterlist* parlist, const char* recid) { cpl_frame* product_frame = NUL...
false
false
false
false
false
0
get_caller_no_reflection (MonoMethod *m, gint32 no, gint32 ilo, gboolean managed, gpointer data) { MonoMethod **dest = (MonoMethod **)data; /* skip unmanaged frames */ if (!managed) return FALSE; if (m->wrapper_type != MONO_WRAPPER_NONE) return FALSE; if (m->klass->image == mono_defaults.corlib && !strcmp (...
false
false
false
false
false
0
count_bits4(uint32_t mask) { unsigned int bits = 0; for (mask = ~ntohl(mask); mask != 0; mask >>= 1) ++bits; return 32 - bits; }
false
false
false
false
false
0
InsertStatesInNode(int ndtype) { switch (ndtype) { case BIF_nd: return 0; case MATP_nd: return 2; case MATL_nd: return 1; case MATR_nd: return 1; case BEGL_nd: return 0; case BEGR_nd: return 1; case ROOT_nd: return 2; case END_nd: return 0; default: cm_Fail("Bogus node type %d", ndty...
false
false
false
false
false
0
calc_evaluate(struct calc_object_s *object) { struct calc_variable_s *i; assert(object->type == CO_VARIABLE); for (i = calc_variable_list; i; i = i->next) if (!strcmp(object->u.s, i->name)) { *object = i->object; return 0; } calc_error(object, "undefined variable `%s'", object->u.s); retu...
false
false
false
false
false
0
rtw_cfg80211_set_auth_type(struct security_priv *psecuritypriv, enum nl80211_auth_type sme_auth_type) { DBG_8723A("%s, nl80211_auth_type =%d\n", __func__, sme_auth_type); switch (sme_auth_type) { case NL80211_AUTHTYPE_AUTOMATIC: psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Auto; break; case NL...
false
false
false
false
false
0
add_builtin(gssapi_mech_interface mech) { struct _gss_mech_switch *m; OM_uint32 minor_status; /* not registering any mech is ok */ if (mech == NULL) return 0; m = calloc(1, sizeof(*m)); if (m == NULL) return ENOMEM; m->gm_so = NULL; m->gm_mech = *mech; m->gm_mech_oid = mech->gm_m...
false
false
false
false
false
0
I_Squash1x(int x1, int y1, int x2, int y2) { byte *bufp, *screenp; int y; // Only works with full screen update if (x1 != 0 || y1 != 0 || x2 != SCREENWIDTH || y2 != SCREENHEIGHT) { return false; } bufp = src_buffer; screenp = (byte *) dest_buffer; for (y=0; y<SCREENHE...
false
false
false
false
false
0
setLock ( SemaphoreGroupPtr aGroup, Int aGid, Int aSid, Int aFlg ) { REQUIRE( aGroup != NULLPTR ); Int results(0); struct sembuf aSemBuf={ aSid, -1, aFlg}; if( aGroup->isPrivate() =...
false
false
false
false
false
0
hash_clear(Hash_tab *tab) { int i; List *l; for (i = 0; i < tab->size; i++) { for (l = tab->list_array[i]; l != NULL; l = l->next) { free(l->data); l->data = NULL; } list_free(tab->list_array[i]); tab->list_array[i] = NULL; } }
false
false
false
false
false
0
read_data(struct stream_t *stream, void *buffer, size_t size) { struct netsock_t *netsock = stream->netsock; int len = 0; /* how many bytes are stored in 'buffer' */ /* printf("read_data size = %d netsock->data_len = %d," " netsock->buffer_pos = %d\n", size,netsock->data_len, net...
false
true
false
false
false
1
amc6821_init_client(struct i2c_client *client) { int config; int err = -EIO; if (init) { config = i2c_smbus_read_byte_data(client, AMC6821_REG_CONF4); if (config < 0) { dev_err(&client->dev, "Error reading configuration register, aborting.\n"); return err; } config |= AMC6821_CONF4_MODE; if ...
false
false
false
false
false
0
MDI(Conf& conf, Encodings& enc) : _conf(conf), _encodings(enc) #ifdef ENABLE_PRINT , page_setup(PageSetup::create(_conf)), settings(PrintSettings::create(_conf)) #endif { signal_switch_page().connect(sigc::mem_fun(*this, &MDI::signal_switch_page_cb)); // 1 minute. Glib::signal_timeout().connect(sigc::mem_...
false
false
false
false
false
0
PyDict_GetItem(PyObject *op, PyObject *key) { Py_hash_t hash; PyDictObject *mp = (PyDictObject *)op; PyDictKeyEntry *ep; PyThreadState *tstate; PyObject **value_addr; if (!PyDict_Check(op)) return NULL; if (!PyUnicode_CheckExact(key) || (hash = ((PyASCIIObject *) key)->hash)...
false
false
false
false
false
0
fr_packet_list_socket_remove(fr_packet_list_t *pl, int sockfd) { fr_packet_socket_t *ps; if (!pl) return 0; ps = fr_socket_find(pl, sockfd); if (!ps) return 0; /* * FIXME: Allow the caller forcibly discard these? */ if (ps->num_outgoing != 0) return 0; ps->sockfd = -1; pl->mask &= ~(1 << ps->offset); ...
false
false
false
false
false
0
ipmi_sel_parse_ctx_create (ipmi_ctx_t ipmi_ctx, ipmi_sdr_cache_ctx_t sdr_cache_ctx) { struct ipmi_sel_parse_ctx *ctx = NULL; if (!(ctx = (ipmi_sel_parse_ctx_t)malloc (sizeof (struct ipmi_sel_parse_ctx)))) { ERRNO_TRACE (errno); return (NULL); } memset (ctx, '\0', sizeof (struct ipmi_sel_parse...
false
false
false
false
false
0
val_str(String *str) { String *res; DBUG_ASSERT(fixed == 1); if (!(res=args[0]->val_str(str))) { null_value= 1; return NULL; } if (!seeded && seed()) { null_value= 1; return NULL; } null_value= 0; res= copy_if_not_alloced(str, res, res->length()); crypto_transform(res); sql_cr...
false
false
false
false
false
0