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
ReassociateOps(unsigned Opc, DebugLoc DL, SDValue N0, SDValue N1) { EVT VT = N0.getValueType(); if (N0.getOpcode() == Opc && isa<ConstantSDNode>(N0.getOperand(1))) { if (isa<ConstantSDNode>(N1)) { // reassoc. (op (op x, c1), c2) -> (op x, (op c1, c2)) SDValue OpNo...
false
false
false
false
false
0
radio_si4713_g_modulator(struct file *file, void *p, struct v4l2_modulator *vm) { return v4l2_device_call_until_err(get_v4l2_dev(file), 0, tuner, g_modulator, vm); }
false
false
false
false
false
0
section_entry_str_new(struct section *psection, const char *name, const char *value, bool escaped) { struct entry *pentry = entry_new(psection, name); if (NULL != pentry) { pentry->type = ENTRY_STR; pentry->string.value = fc_strdup(NUL...
false
false
false
false
false
0
option_gui_update(struct option *poption) { if (NULL != option_dialog && ODM_OPTSET == option_dialog->mode && option_optset(poption) == option_dialog->optset.poptset && option_category(poption) == option_dialog->optset.category) { option_widget_update(poption); } }
false
false
false
false
false
0
ppp_recv_proto_rej(struct ppp_t *ppp, uint16_t proto) { struct ppp_handler_t *ppp_h; list_for_each_entry(ppp_h, &ppp->chan_handlers, entry) { if (ppp_h->proto == proto) { if (ppp_h->recv_proto_rej) ppp_h->recv_proto_rej(ppp_h); return; } } list_for_each_entry(ppp_h, &ppp->unit_handlers, entry) { i...
false
false
false
false
false
0
pathconf_inner(const char *path, int arg) { long result; errno = EINVAL; /* IRIX 5.2 fails to set on errors */ result = pathconf(path, arg); if (result < 0) { switch (errno) { case ENOSYS: /* lotsa systems say this for EINVAL */ #ifdef EOPNOTSUPP case EOPN...
false
false
false
false
false
0
printLinkageType(GlobalValue::LinkageTypes LT) { switch (LT) { case GlobalValue::InternalLinkage: Out << "GlobalValue::InternalLinkage"; break; case GlobalValue::PrivateLinkage: Out << "GlobalValue::PrivateLinkage"; break; case GlobalValue::AvailableExternallyLinkage: Out << "GlobalValue::AvailableE...
false
false
false
false
false
0
drv_EFN_send(const char *data, const unsigned int len) { int n; // transport command string to EUG 100 n = write(DataSocket, data, len); if (n < 0) { error("%s:drv_EFN_send: Failed to write to data socket\n", Name); } }
false
false
false
false
false
0
getFCmpValue(bool isordered, unsigned code, Value *LHS, Value *RHS, InstCombiner::BuilderTy *Builder) { CmpInst::Predicate Pred; switch (code) { default: llvm_unreachable("Illegal FCmp code!"); case 0: Pred = isordered ? FCmpInst::FCMP_ORD : FCmpInst::FCMP_U...
false
false
false
false
false
0
dbind_send_and_allow_reentry (DBusConnection * bus, DBusMessage * message, DBusError *error) { DBusPendingCall *pending; SpiReentrantCallClosure *closure; const char *unique_name = dbus_bus_get_unique_name (bus); const char *destination = dbus_message_get_destination (message); struct timeval tv; DBusMessag...
false
false
false
false
false
0
dragEnterEvent( QDragEnterEvent *event ) { // We want to indicate to the user that dropping to the same collection is not possible. // CollectionTreeItemModel therefore needs to know what collection the drag originated // so that is can play with Qt::ItemIsDropEnabled in flags() const AmarokMimeData *mi...
false
false
false
false
false
0
__kmem_cache_free_bulk(struct kmem_cache *s, size_t nr, void **p) { size_t i; for (i = 0; i < nr; i++) kmem_cache_free(s, p[i]); }
false
false
false
false
false
0
find_link(node *n) { while (n) { if (n->type == node::link) { attribute *rel = find_attribute(n, "REL"); attribute *href = find_attribute(n, "HREF"); if (rel && href && rel->value && href->value) { if (strcasecmp(rel->value, "previous") == 0) { ...
false
false
false
false
false
0
decode_3d_i830(struct drm_intel_decode *ctx) { unsigned int idx; uint32_t opcode; uint32_t *data = ctx->data; struct { uint32_t opcode; unsigned int min_len; unsigned int max_len; const char *name; } opcodes_3d[] = { { 0x02, 1, 1, "3DSTATE_MODES_3" }, { 0x03, 1, 1, "3DSTATE_ENABLES_1" }, { 0x04, 1, ...
false
false
false
false
false
0
ImportDERPrivateKey(PK11SlotInfo* slot, const std::vector<uint8>& input, const std::string& name) { SECItem der_private_key_info; SECStatus rv; der_private_key_info.data = const_cast<unsigned char*>(&input.front()); der_private_key_info.len = input.size(); //The private key is set to be used for ...
false
false
false
false
false
0
thermal_of_populate_trip(struct device_node *np, struct thermal_trip *trip) { int prop; int ret; ret = of_property_read_u32(np, "temperature", &prop); if (ret < 0) { pr_err("missing temperature property\n"); return ret; } trip->temperature = prop; ret = of_property_read_u32(np, "hysteresis", &prop)...
false
false
false
false
false
0
SmiAddConstant(Register dst, Register src, Smi* constant) { if (constant->value() == 0) { if (!dst.is(src)) { movq(dst, src); } return; } else if (dst.is(src)) { ASSERT(!dst.is(kScratchRegister)); switch (constant->value()) { case 1: addq(dst, kSmiConstantRegister); r...
false
false
false
false
false
0
mprRelease(void *ptr) { MprMem *mp; if (ptr) { mp = GET_MEM(ptr); if (VALID_BLK(mp)) { mprAssert(!IS_FREE(mp)); /* Lock-free update of mp->gen */ SET_FIELD2(mp, GET_SIZE(mp), heap->active, UNMARKED, 0); } } }
false
false
false
false
false
0
error(ErrorCategory category, Goffset pos, const char *msg, ...) { va_list args; GooString *s, *sanitized; // NB: this can be called before the globalParams object is created if (!errorCbk && globalParams && globalParams->getErrQuiet()) { return; } va_start(args, msg); s = GooString::formatv(msg, arg...
false
false
false
false
false
0
fill_response_items(krb5_context context, krb5_init_creds_context ctx, krb5_pa_data **in_padata) { struct krb5_preauth_context_st *pctx = context->preauth_context; krb5_get_init_creds_opt *opt = (krb5_get_init_creds_opt *)ctx->opte; krb5_error_code ret; krb5_pa_data *pa; clpreaut...
false
false
false
false
false
0
asn1PE_H245NetworkAccessParameters_networkAddress (OOCTXT* pctxt, H245NetworkAccessParameters_networkAddress* pvalue) { static Asn1SizeCnst e164Address_lsize1 = { 0, 1, 128, 0 }; int stat = ASN_OK; ASN1BOOL extbit; /* extension bit */ extbit = (ASN1BOOL)(pvalue->t > 3); encodeBit (pctxt, extbit); ...
false
false
false
false
false
0
channel_detach_buffers(struct dim_channel *ch, u16 buffers_number) { if (buffers_number > ch->done_sw_buffers_number) return dim_on_error(DIM_ERR_UNDERFLOW, "Channel underflow"); ch->done_sw_buffers_number -= buffers_number; return true; }
false
false
false
false
false
0
mapprime() { register char *lp; register char *up; register int c; register int i; static char lower[] = "abcdefghijklmnopqrstuvwxyz"; static char upper[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (lp = lower, up = upper; *lp != '\0'; lp++, up++) { c = *lp; cmap[c+OFFSET] = c; cmap[*up+OFFSET] = c; } for (i =...
false
false
false
false
false
0
PruneLinedefs(void) { int i; int new_num; DisplayTicker(); // scan all linedefs for (i=0, new_num=0; i < num_linedefs; i++) { linedef_t *L = lev_linedefs[i]; // handle duplicated vertices while (L->start->equiv) { L->start->ref_count--; L->start = L->start->equiv; L->sta...
false
false
false
false
false
0
xaccAccountConvertBalanceToCurrency(const Account *acc, /* for book */ gnc_numeric balance, const gnc_commodity *balance_currency, const gnc_commodity *new_currency) { QofBook *book; GNCPriceDB *pdb; ...
false
false
false
false
false
0
stringContains(char* string, char c) { int len = stringLength(string); for (int i = 0; i < len; i++) { if (string[i] == c) { return true; } } return false; }
false
false
false
false
false
0
deceleration_new_frame_cb (ClutterTimeline *timeline, gint frame_num, MxKineticScrollView *scroll) { MxKineticScrollViewPrivate *priv = scroll->priv; ClutterActor *child = mx_bin_get_child (MX_BIN (scroll)); if (child) { MxAdjust...
false
false
false
false
false
0
lookahead(int vert, int color, int upper_bound, Graph* graph, int* satur_degree){ int i; int adj_satur; int adj_num = graph[vert].adj_size; int* adjs = graph[vert].adjacents; //Recorro los vecinos del nodo for (i=0; i<adj_num; ++i){ //Tomo la saturacion del vecino adj_...
false
false
false
false
false
0
fdshq_lt(FieldDoc *fd1, FieldDoc *fd2) { int c = 0, i; Comparable *cmps1 = fd1->comparables; Comparable *cmps2 = fd2->comparables; for (i = 0; i < fd1->size && c == 0; i++) { int type = cmps1[i].type; switch (type) { case SORT_TYPE_SCORE: if (cmps1[i].val.f <...
false
false
false
false
false
0
appendCols(const int numcols, const CoinPackedVectorBase * const * cols) { if (colOrdered_) appendMajorVectors(numcols, cols); else appendMinorVectors(numcols, cols); }
false
false
false
false
false
0
getLoadStoreMultipleOpcode(unsigned Opcode, ARM_AM::AMSubMode Mode) { switch (Opcode) { default: llvm_unreachable("Unhandled opcode!"); case ARM::LDRi12: ++NumLDMGened; switch (Mode) { default: llvm_unreachable("Unhandled submode!"); case ARM_AM::ia: return ARM::LDMIA; case ARM_AM::da: return ...
false
false
false
false
false
0
remove_fixup_regions (void) { int i; rtx insn, note; struct eh_region *fixup; /* Walk the insn chain and adjust the REG_EH_REGION numbers for instructions referencing fixup regions. This is only strictly necessary for fixup regions with no parent, but doesn't hurt to do it for all regions. */ ...
false
false
false
false
false
0
sanei_w_control_option_req (Wire *w, SANE_Control_Option_Req *req) { sanei_w_word (w, &req->handle); sanei_w_word (w, &req->option); sanei_w_word (w, &req->action); /* Up to and including version 2, we incorrectly attempted to encode the option value even the action was SANE_ACTION_SET_AUTO. */ if (w->...
false
false
false
false
false
0
enableWindowMode(bool enable) { d->mWindowMode = enable; if (enable && d->mCloseButton) { d->mCloseButton->show(); } else if (d->mCloseButton) { d->mCloseButton->hide(); } }
false
false
false
false
false
0
st_tree_dump_conn(st_tree_t *node, conn_t *conn) { int ret; enum_t *etmp; range_t *rtmp; if (!node) { return 1; /* not an error */ } if (node->left) { ret = st_tree_dump_conn(node->left, conn); if (!ret) { return 0; /* write failed in the child */ } } if (!send_to_one(conn, "SETINFO %s \"%s\"\n",...
true
true
false
false
false
1
ActiveObjectsNearGrid(uint32 x, uint32 y) const { MANGOS_ASSERT(x < MAX_NUMBER_OF_GRIDS); MANGOS_ASSERT(y < MAX_NUMBER_OF_GRIDS); CellPair cell_min(x * MAX_NUMBER_OF_CELLS, y * MAX_NUMBER_OF_CELLS); CellPair cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord + MAX_NUMBER_OF_CELLS); ...
false
false
false
false
false
0
unnest_nesting_tree (struct nesting_info *root) { struct nesting_info *n; FOR_EACH_NEST_INFO (n, root) unnest_nesting_tree_1 (n); }
false
false
false
false
false
0
pps_unregister_cdev(struct pps_device *pps) { pr_debug("unregistering pps%d\n", pps->id); pps->lookup_cookie = NULL; device_destroy(pps_class, pps->dev->devt); }
false
false
false
false
false
0
__log_inmem_chkspace(dblp, len) DB_LOG *dblp; size_t len; { DB_LSN active_lsn, old_active_lsn; ENV *env; LOG *lp; struct __db_filestart *filestart; size_t offset; int ret; env = dblp->env; lp = dblp->reginfo.primary; DB_ASSERT(env, lp->db_log_inmemory); /* * Allow room for an extra header so that we do...
false
false
false
false
false
0
balloon_page_dequeue(struct balloon_dev_info *b_dev_info) { struct page *page, *tmp; unsigned long flags; bool dequeued_page; dequeued_page = false; spin_lock_irqsave(&b_dev_info->pages_lock, flags); list_for_each_entry_safe(page, tmp, &b_dev_info->pages, lru) { /* * Block others from accessing the 'page' w...
false
false
false
false
false
0
max77693_haptic_close(struct input_dev *dev) { struct max77693_haptic *haptic = input_get_drvdata(dev); int error; cancel_work_sync(&haptic->work); max77693_haptic_disable(haptic); error = regulator_disable(haptic->motor_reg); if (error) dev_err(haptic->dev, "failed to disable regulator: %d\n", error); m...
false
false
false
false
false
0
read_grammar(struct grammar* g, const char* filename) { char line[MAX_LINE_LEN + 3]; int counter = 0; FILE* file = fopen(filename, "r"); if (file == NULL) { fatal("Failed to open a file with grammar: %s\n", filename); } while (1) { if (fgets(line, MAX_LINE_LEN, file) == 0) break;...
true
true
false
false
true
1
ifoPrint_VTS_ATTRIBUTES(vts_attributes_t *vts_attributes) { int i; printf("VTS_CAT Application type: %08x\n", vts_attributes->vts_cat); printf("Video attributes of VTSM_VOBS: "); ifo_print_video_attributes(5, &vts_attributes->vtsm_vobs_attr); printf("\n"); printf("Number of Audio streams: %i\n", ...
false
false
false
false
false
0
ssl3_NewSessionID(sslSocket *ss, PRBool is_server) { sslSessionID *sid; sid = PORT_ZNew(sslSessionID); if (sid == NULL) return sid; if (is_server) { const SECItem * srvName; SECStatus rv = SECSuccess; ssl_GetSpecReadLock(ss); /********************************/ ...
false
false
false
false
false
0
prism2_ioctl_siwnickn(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *nickname) { struct hostap_interface *iface; local_info_t *local; iface = netdev_priv(dev); local = iface->local; memset(local->name, 0, sizeof(local->name)); memcpy(local->name, nickname, data->len...
false
true
false
false
false
1
store_global_handler(const Handler &h) { for (int i = 0; i < nglobalh; i++) if (globalh[i]._name == h._name) { globalh[i] = h; globalh[i]._use_count = 1; return; } if (nglobalh >= globalh_cap) { int n = (globalh_cap ? 2 * globalh_cap : 4); Handler *hs = new Handler[n]; if (!hs) // out o...
false
false
false
false
false
0
traceGcEvent_stderr (Capability *cap, EventTypeNum tag) { ACQUIRE_LOCK(&trace_utx); tracePreface(); switch (tag) { case EVENT_REQUEST_SEQ_GC: // (cap) debugBelch("cap %d: requesting sequential GC\n", cap->no); break; case EVENT_REQUEST_PAR_GC: // (cap) debugBelch...
false
false
false
false
false
0
cnic_alloc_context(struct cnic_dev *dev) { struct cnic_local *cp = dev->cnic_priv; if (BNX2_CHIP(cp) == BNX2_CHIP_5709) { int i, k, arr_size; cp->ctx_blk_size = CNIC_PAGE_SIZE; cp->cids_per_blk = CNIC_PAGE_SIZE / 128; arr_size = BNX2_MAX_CID / cp->cids_per_blk * sizeof(struct cnic_ctx); cp->ctx_arr ...
false
false
false
false
false
0
zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */ { int ret1, ret2; long lval1, lval2; double dval1, dval2; if ((ret1=is_numeric_string(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0)) && (ret2=is_numeric_string(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0))) { if ((ret1==IS_DOUBLE) || (re...
false
false
false
false
false
0
mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; unsigned int i, entries; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; sc = st->priv_data; get_byte(pb); /* version */ get_be24(pb); /* flags */ ...
false
false
false
false
false
0
parse_opt(int key, char *arg, struct argp_state *state) { struct perf_event_attr *current_attr = perf_ctrs.tail ? &perf_ctrs.tail->attr : &perf_base_attr; switch (key) { case 'e': if (!strcmp("help", arg)) events_usage(); else if (is_sw_event(arg)) init_s...
false
false
false
false
false
0
buffer_destroy(t_buffer *buffer) { if (buffer->ptr != NULL && buffer->class->free != NULL) { if (buffer->class->free(buffer) != 0) { return -1; } buffer->ptr = NULL; } free(buffer); return 0; }
false
false
false
false
false
0
Init() { static ClassDocumentation<ClusterHadronizationHandler> documentation ("This is the main handler class for the Cluster Hadronization", "The hadronization was performed using the cluster model of \\cite{Webber:1983if}.", "%\\cite{Webber:1983if}\n" "\\bibitem{Webber:1983if}\n" " B.~R.~...
false
false
false
false
false
0
create_iopin_map() { int i; // Define the physical package. // The Package class, which is a parent of all of the modules, // is responsible for allocating memory for the I/O pins. // create_pkg(number_of_pins); // Define the I/O pins and assign them to the package. // There are two things hap...
false
false
false
false
false
0
ath10k_conf_tx_uapsd(struct ath10k *ar, struct ieee80211_vif *vif, u16 ac, bool enable) { struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); struct wmi_sta_uapsd_auto_trig_arg arg = {}; u32 prio = 0, acc = 0; u32 value = 0; int ret = 0; lockdep_assert_held(&ar->conf_mutex); if (arvif->vdev_type != WMI_VD...
false
false
false
false
false
0
mpd_song_get_tag(const struct mpd_song *song, enum mpd_tag_type type, unsigned idx) { const struct mpd_tag_value *tag = &song->tags[type]; if ((int)type < 0) return NULL; if (tag->value == NULL) return NULL; while (idx-- > 0) { tag = tag->next; if (tag == NULL) return NULL; } return tag->value; ...
false
false
false
false
false
0
via_free_sg_info(struct pci_dev *pdev, drm_via_sg_info_t *vsg) { struct page *page; int i; switch (vsg->state) { case dr_via_device_mapped: via_unmap_blit_from_device(pdev, vsg); case dr_via_desc_pages_alloc: for (i = 0; i < vsg->num_desc_pages; ++i) { if (vsg->desc_pages[i] != NULL) free_page((unsigne...
false
false
false
false
false
0
guess_repository_DIRs(git_repository *repo, const char *repository_path) { char path_aux[GIT_PATH_MAX], *last_DIR; int path_len; if (gitfo_isdir(repository_path) < GIT_SUCCESS) return GIT_ENOTAREPO; path_len = strlen(repository_path); strcpy(path_aux, repository_path); if (path_aux[path_len - 1] != '/') { ...
true
true
true
false
false
1
AddKeysFromJSArray(JSArray* array) { ASSERT(!array->HasPixelElements() && !array->HasExternalArrayElements()); switch (array->GetElementsKind()) { case JSObject::FAST_ELEMENTS: return UnionOfKeys(FixedArray::cast(array->elements())); case JSObject::DICTIONARY_ELEMENTS: { NumberDictionary* dict =...
false
false
false
false
false
0
load_indent_settings(GeanyFiletype *ft, GKeyFile *config, GKeyFile *configh) { ft->indent_width = utils_get_setting(integer, configh, config, "indentation", "width", -1); ft->indent_type = utils_get_setting(integer, configh, config, "indentation", "type", -1); /* check whether the indent type is OK */ switch (ft->i...
false
false
false
false
false
0
setCurrentView(TemplatesView *view) { // if (view) // qWarning() << "TemplatesViewActionHandler" << view; // disconnect old view if (m_CurrentView) { // disconnect(m_CurrentView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), // this, SLOT(templatesViewItem...
false
false
false
false
false
0
listen(Q_UINT16 port, bool udp) { stop(); if(!d->serv.listen(port)) return false; if(udp) { d->sd = new Q3SocketDevice(Q3SocketDevice::Datagram); #ifdef Q_OS_UNIX ::fcntl(d->sd->socket(), F_SETFD, FD_CLOEXEC); #endif d->sd->setBlocking(false); if(!d->sd->bind(QHostAddress(), port)) { delete d->sd; d-...
false
false
false
false
false
0
snapshot_copy_from( libspectrum_snap *snap ) { int error; libspectrum_machine machine; module_snapshot_enabled( snap ); machine = libspectrum_snap_machine( snap ); settings_current.late_timings = libspectrum_snap_late_timings( snap ); if( machine != machine_current->machine ) { error = machine_selec...
false
false
false
false
false
0
VGZ_NewUngzip(struct sess *sp, const char *id) { struct vgz *vg; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); vg = vgz_alloc_vgz(sp, id); vg->dir = VGZ_UN; VSC_C_main->n_gunzip++; /* * Max memory usage according to zonf.h: * mem_needed = "a few kb" + (1 << (windowBits)) * Since we don't control windowBits, we have ...
false
false
false
true
false
1
dump_driver_feature(int length) { struct bdb_block *block; struct bdb_driver_feature *feature; block = find_section(BDB_DRIVER_FEATURES, length); if (!block) { printf("No Driver feature data block\n"); return; } feature = block->data; printf("Driver feature Data Block:\n"); printf("\tBoot Device Algorithm...
false
false
false
false
false
0
Vect_find_node(struct Map_info *Map, double ux, double uy, double uz, double maxdist, int with_z) { int i, nnodes, node; BOUND_BOX box; struct ilist *NList; double x, y, z; double cur_dist, dist; G_debug(3, "Vect_find_node() for %f %f %f maxdist = %f", ux, uy, uz, maxdist); NLi...
false
false
false
false
false
0
gfs_surface_segment_normal (GfsGenericSurface * s, FttCell * cell, GfsSegment * I, GtsVector n) { g_return_if_fail (s != NULL); g_return_if_fail (cell != NULL); g_return_if_fail (I != NULL); g_return_if_fail (I->n > 0); g_return_if_fail (n != NULL); g_assert (GFS_GENERIC_SURFACE_CLASS (GTS_O...
false
false
false
false
false
0
lpss_dma_filter(struct dma_chan *chan, void *param) { struct dw_dma_slave *dws = param; if (dws->dma_dev != chan->device->dev) return false; chan->private = dws; return true; }
false
false
false
false
false
0
altos_puts(struct altos_file *file, char *string) { char c; while ((c = *string++)) altos_putchar(file, c); }
false
false
false
false
false
0
city_change_callback(Widget w, XtPointer client_data, XtPointer call_data) { XawListReturnStruct *ret=XawListShowCurrent(city_list); struct city *pcity; struct universal production; if(ret->list_index!=XAW_LIST_NONE && (pcity=cities_in_list[ret->list_index])) { cid my_cid = (cid) XTPOINTER_TO_IN...
false
false
false
false
false
0
closeIncrblobChannels(SqliteDb *pDb){ IncrblobChannel *p; IncrblobChannel *pNext; for(p=pDb->pIncrblob; p; p=pNext){ pNext = p->pNext; /* Note: Calling unregister here call Tcl_Close on the incrblob channel, ** which deletes the IncrblobChannel structure at *p. So do not ** call Tcl_Free() here...
false
false
false
false
false
0
get_pi (struct ip_vs_service_entry *se, char *pi, size_t size) { struct in_addr addr; int len = 0; if ((NULL == se) || (NULL == pi)) return 0; addr.s_addr = se->addr; /* inet_ntoa() returns a pointer to a statically allocated buffer * I hope non-glibc systems behave the same */ len = ssnprintf (pi, size, "...
false
false
false
false
false
0
StrEqVerbose(const string& a, const string& b, const string& text) { if (a != b) { printf("EXPECTED: %s\n", a.c_str()); printf("ACTUAL: %s\n", b.c_str()); printf("TEXT: %s\n", text.c_str()); return false; } return true; }
false
false
false
false
false
0
xml_emit_att_value(struct parser *parser, char *a, char *b) { struct element *head = parser->head; struct attribute *att = head->atts; char *s; int c; /* entities are all longer than UTFmax so runetochar is safe */ s = att->value = fz_malloc(parser->ctx, b - a + 1); while (a < b) { if (*a == '&') { a += xm...
false
false
false
false
false
0
nfs4_xdr_enc_fs_locations(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs4_fs_locations_arg *args) { struct compound_hdr hdr = { .minorversion = nfs4_xdr_minorversion(&args->seq_args), }; uint32_t replen; encode_compound_hdr(xdr, req, &hdr); encode_sequence(xdr, &args->seq_args, &hd...
false
false
false
false
false
0
L52() {register object *base=vs_base; register object *sup=base+VM52; VC52 vs_check; bds_check; {object V204; object V205; V204=(base[0]); V205=(base[1]); vs_top=sup; goto TTL; TTL:; bds_bind(((object)VV[47]),((object)VV[103])); base[3]= ((object)VV[95]); base[4]= (V204); base[5]= (V205); vs_top=(vs_base=...
false
false
false
false
false
0
vpn_provider_set_index(struct vpn_provider *provider, int index) { DBG("index %d provider %p", index, provider); if (provider->ipconfig_ipv4 == NULL) { provider->ipconfig_ipv4 = __vpn_ipconfig_create(index, AF_INET); if (provider->ipconfig_ipv4 == NULL) { DBG("Couldnt create ipconfig for IPv4"); go...
false
false
false
false
false
0
writedict(fp) FILE *fp; { u_char *buf; long i, j, max; if (fputbegin("dicttblbuf", fp) < 0) return(-1); for (i = 0L; i < maxdict; i++) { if (!(dictlist[i].size)) continue; buf = &(strbuf[dictlist[i].ptr]); if (fputbuf(buf, dictlist[i].klen, fp) < 0) return(-1); for (j = max = 0L; j < dictlist[i].max; j++) ...
false
false
false
false
false
0
playername_ok(const char *cp) { /* Don't allow - or _ as first character in the name */ if (*cp == '-' || *cp == '_') return 0; for (; *cp != '\0'; cp++) if (!((*cp >= 'a' && *cp <= 'z') || (*cp >= 'A' && *cp <= 'Z')) && *cp != '-' && *cp != '_') return 0; re...
false
false
false
false
false
0
hpi_volume_auto_fade_profile(u32 h_control, short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms, u16 profile) { struct hpi_message hm; struct hpi_response hr; hpi_init_message_response(&hm, &hr, HPI_OBJ_CONTROL, HPI_CONTROL_SET_STATE); if (hpi_handle_indexes(h_control, &hm.adapter_index, &hm.obj_index)...
false
true
false
false
false
1
RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) { vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkInformation *outInfo = outputVector->GetInformationObject(0); vtkPolyData *input = vtkPolyData::SafeDownCast( ...
false
false
false
false
false
0
read_dlpoly_is_shell(gchar *name) { /* check for postfixes: -shell _shell -shel _shel -shl _shl -sh _sh * and return postfix length */ int len = strlen(name); if (len > 6 && (g_ascii_strcasecmp(name+len-6, "-shell") == 0 || g_ascii_strcasecmp(name+len-6, "_shell") == 0)) ret...
false
false
false
false
false
0
gtksharp_clipboard_target_list_to_array (GSList *list) { GtkTargetEntry *targets; GSList *iter; int i; targets = g_new0 (GtkTargetEntry, g_slist_length (list)); for (iter = list, i = 0; iter; iter = iter->next, i++) { GtkTargetEntry *t = (GtkTargetEntry *) iter->data; targets[i].tar...
false
false
false
false
false
0
drm_context_switch(struct drm_device * dev, int old, int new) { if (test_and_set_bit(0, &dev->context_flag)) { DRM_ERROR("Reentering -- FIXME\n"); return -EBUSY; } DRM_DEBUG("Context switch from %d to %d\n", old, new); if (new == dev->last_context) { clear_bit(0, &dev->context_flag); return 0; } return...
false
false
false
false
false
0
fs_value_boolean(int b) { fs_value v = fs_value_blank(); v.attr = fs_c.xsd_boolean; v.valid = fs_valid_bit(FS_V_IN); v.in = b ? 1 : 0; if (v.in) { v.lex = "true"; } else { v.lex = "false"; } return v; }
false
false
false
false
false
0
readLanguage(Lexer & lex) { enum LanguageTags { LA_AS_BABELOPTS = 1, LA_BABELNAME, LA_ENCODING, LA_END, LA_GUINAME, LA_INTERNAL_ENC, LA_LANG_CODE, LA_LANG_VARIETY, LA_POLYGLOSSIANAME, LA_POLYGLOSSIAOPTS, LA_POSTBABELPREAMBLE, LA_PREBABELPREAMBLE, LA_RTL }; // Keep these sorted alphabetical...
false
false
false
false
false
0
sgen_is_thread_in_current_stw (SgenThreadInfo *info) { /* A thread explicitly asked to be skiped because it holds no managed state. This is used by TP and finalizer threads. FIXME Use an atomic variable for this to avoid everyone taking the GC LOCK. */ if (info->client_info.gc_disabled) { return FALSE; } /* ...
false
false
false
false
false
0
set_facet_fe(f_id,fe) facet_id f_id; facetedge_id fe; { if ( inverted(f_id) ) { invert(fe); invert(f_id); } fptr(f_id)->fe_id = fe; if ( web.representation == STRING ) { body_id b_id = get_facet_body(f_id); if ( valid_id(b_id) ) set_body_facet(b_id,f_id); b_id = get_facet_body(inverse_id(f_id)); ...
false
false
false
false
false
0
createActions() { // Flow control actions m_stopAct = new KToggleAction(KIcon(":/images/stop.png"), i18n("&Break at Next Statement"), this ); m_stopAct->setIconText(i18n("Break at Next")); actionCollection()->addAction( "stop", m_stopAct ); m_stopAct->setEnabled(true); connect(m_stopAct, SIGNAL(...
false
false
false
false
false
0
SetGeoTransform( double * padfTransform ) { if( eAccess == GA_ReadOnly ) { CPLError( CE_Failure, CPLE_NoWriteAccess, "Unable to update geotransform on readonly file." ); return CE_Failure; } if( padfTransform[2] != 0.0 || padfTransform[4] != 0.0 ) { CPLEr...
false
false
false
false
false
0
zf_ping(unsigned long data) { unsigned int ctrl_reg = 0; unsigned long flags; zf_writeb(COUNTER_2, 0xff); if (time_before(jiffies, next_heartbeat)) { dprintk("time_before: %ld\n", next_heartbeat - jiffies); /* * reset event is activated by transition from 0 to 1 on * RESET_WD1 bit and we assume that it ...
false
false
false
false
false
0
s48_get_os_string_encoding(void) { static char setlocale_called = PSFALSE; char *codeset; static char* encoding = NULL; /* Mike has no clue what the rationale for needing this is. */ if (!setlocale_called) { setlocale(LC_CTYPE, ""); setlocale_called = PSTRUE; } if (encoding == NULL) ...
false
false
false
false
false
0
set_default(log_slow_config *conf) { if (conf) { conf->enabled = 0; conf->long_request_time = DEFAULT_LOG_SLOW_REQUEST; conf->filename= NULL; conf->timeformat= NULL; conf->buffered_logs= 0; conf->log_buffer= NULL; conf->fd = NULL; } }
false
false
false
false
false
0
jas_icccurv_output(jas_iccattrval_t *attrval, jas_stream_t *out) { jas_icccurv_t *curv = &attrval->data.curv; unsigned int i; if (jas_iccputuint32(out, curv->numents)) goto error; for (i = 0; i < curv->numents; ++i) { if (jas_iccputuint16(out, curv->ents[i])) goto error; } return 0; error: return -1; }
false
false
false
false
false
0
div_day(VALUE d, VALUE *f) { if (f) *f = f_mod(d, INT2FIX(1)); return f_floor(d); }
false
false
false
false
false
0
dump(ostream&out, unsigned ind) const { out << setw(ind) << "" << "disable " << scope_ << "; /* " << get_fileline() << " */" << endl; }
false
false
false
false
false
0
uqabort () { #if ! HAVE_HDB_LOGGING /* When using HDB logging, it's a pain to have no system name. */ ulog_system ((const char *) NULL); #endif ulog_user ((const char *) NULL); if (fQunlock_directory) (void) fsysdep_unlock_uuxqt_dir (iQlock_seq); if (zQunlock_file != NULL) (void) fsysdep_unlock_uu...
true
true
false
false
true
1
print(STD_NAMESPACE ostream &out, const size_t flags, const int level, const char *pixelFileName, size_t *pixelCounter) { out << OFendl; if (flags & DCMTypes::PF_useANSIEscapeCodes) out << DCMDATA_ANS...
false
false
false
false
false
0
clearHistoryDialog() { if (m_history && QMessageBox::question(0, tr("Clear History"), tr("Do you want to clear the history?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) { m_history->clear(); } }
false
false
false
false
false
0
CheckRootTransparentButtons(ButtonArray *array) { Button *button; Bool r = 0; if (!CSET_IS_TRANSPARENT_ROOT(iconcolorset) && !CSET_IS_TRANSPARENT_ROOT(focuscolorset)) { return r; } for(button=array->head; button!=NULL; button=button->next) { if ((button->iconified && CSET_IS_TRANSPARENT_ROOT(ico...
false
false
false
false
false
0