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
del_tag(char *tag, char *taglist) { int ii, ftcc, atcc, found; char *temptags; cchar *pp; temptags = strdupz(taglist,0,"del_tag"); *taglist = 0; ftcc = found = 0; for (ii = 1; ; ii++) { pp = strField(temptags,tagdelims,ii); //...
false
false
false
false
false
0
new_adapter(void) { struct fritz_adapter *adapter; struct hisax_b_if *b_if[2]; int i; adapter = kzalloc(sizeof(struct fritz_adapter), GFP_KERNEL); if (!adapter) return NULL; adapter->isac.hisax_d_if.owner = THIS_MODULE; adapter->isac.hisax_d_if.ifc.priv = &adapter->isac; adapter->isac.hisax_d_if.ifc.l2l1 = ...
false
false
false
false
false
0
var_ns_delete_temporaries(Var_ns **root) { Var_ns *v; if (*root == NULL) return(0); v = *root; while (v != NULL) { if (v->flags & VAR_NS_TEMPORARY) v = do_delete(root, v); else v = v->next; } return(0); }
false
false
false
false
false
0
ck_used(const ckhunk_t *ck) { ckhunk_check(ck); if (NULL == ck) return FALSE; return ck->avail != ck->arena + ckalloc_round(sizeof(struct ckhunk)); }
false
false
false
false
false
0
__pyx_f_9xmmsvalue_18CollectionOperands_init_pylist(struct __pyx_obj_9xmmsvalue_CollectionOperands *__pyx_v_self) { struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_...
false
false
false
false
false
0
ends_with_gdbmi_prompt(struct ibuf *ibuf, enum newlinestyle style, int *success) { char *ibuf_string; int length; if (!ibuf) return -1; if (!success) return -1; *success = 0; length = ibuf_length(ibuf); /* If the string is not long enough, don't try */ if (st...
false
false
false
false
false
0
job_get_env_string(const lListElem *job, const char *variable) { const char *ret = NULL; DENTER(TOP_LAYER, "job_get_env_value"); ret = var_list_get_string(lGetList(job, JB_env_list), variable); DRETURN(ret); }
false
false
false
false
false
0
SetDistRange( LZCOMP *t, long length ) { const long len_min = 2; const long len_min3 = 3; const long len_width = 3; const long bit_Range = 3 - 1; /* == len_width - 1 */ const long dist_min = 1; const long dist_width = 3; t->num_DistRanges = 1; t->dist_max = ( dis...
false
false
false
false
false
0
RemoveStanzaHandler( XmppStanzaHandler* stanza_handler) { bool found = false; for (int level = 0; level < HL_COUNT; level += 1) { StanzaHandlerVector::iterator new_end = std::remove(stanza_handlers_[level]->begin(), stanza_handlers_[level]->end(), stanza_handler); if (new_end != stan...
false
false
false
false
false
0
srchk(s) SOCKET s; { char * p ; int status = 0 ; #if defined(_WIN32) struct thData *td; td = (struct thData*)TlsGetValue(tls_i); #endif p = rqstbuf ; marshall_LONG(p,status); serrno = 0; if ( netwrite_timeout(s, rqstbuf ,LONGSIZE, RFIO_CTRL_TIMEOUT) != LONGSIZE ) { log(LOG_ERR,"...
false
false
false
false
false
0
gm_pixbuf_create(const gchar * filename, int width, int height) { gchar *pathname = NULL, *ext; GdkPixbuf *pixbuf = NULL; GError *error = NULL; if (!filename || *filename == '\0') { return NULL; } pathname = gm_pixbuf_find(filename); if (!pathname) { gm_debug_msg(DEBUG_DEFAULT, "gm_pixbuf_create: couldn't...
false
false
false
false
false
0
circuit(Home home, int offset, const IntVarArgs& x, IntConLevel icl) { Int::Limits::nonnegative(offset,"Int::circuit"); if (x.size() == 0) throw Int::TooFewArguments("Int::circuit"); if (x.same(home)) throw Int::ArgumentSame("Int::circuit"); if (home.failed()) return; ViewArray<Int::IntV...
false
false
false
false
false
0
amd_powerplay_get_display_power_level(void *handle, struct amd_pp_dal_clock_info *output) { struct pp_hwmgr *hwmgr; PP_CHECK((struct pp_instance *)handle); if (output == NULL) return -EINVAL; hwmgr = ((struct pp_instance *)handle)->hwmgr; return phm_get_dal_power_level(hwmgr, output); }
false
false
false
false
false
0
calc_tuple_str_prob (BNTree *bntree, char *tuple, int conditional) { int *assignment = malloc (bntree->num_seqs * sizeof(int)); double result; int tuple_idx; int i, j; if ((int)strlen(tuple) != (bntree->order + 1) * (bntree->num_seqs + 1) - 1) { fprintf (stderr, "Wrong length for tuple %s\n", tuple); ...
false
true
false
false
false
1
drv_cp_harray_to_user(void __user *user_buf_uva, u64 *user_buf_size, struct vmci_handle_arr *handle_array, int *retval) { u32 array_size = 0; struct vmci_handle *handles; if (handle_array) array_size = vmci_handle_arr_get_size(handle_array); if (array_size * sizeof(*handles) > *user_buf_size) r...
false
false
false
false
false
0
demoFindData(bool errorIfNotFound) { static const char* g3dPath = getenv("G3DDATA"); if (g3dPath) { return g3dPath; # ifdef G3D_WIN32 } else if (FileSystem::exists("../data")) { // G3D install on Windows return "../data"; } else if (FileSystem::exists("../data-files")) { ...
false
false
false
false
false
0
hostlist_new(void) { int i; hostlist_t new = (hostlist_t) malloc(sizeof(*new)); if (!new) goto fail1; assert(new->magic = HOSTLIST_MAGIC); mutex_init(&new->mutex); new->hr = (hostrange_t *) malloc(HOSTLIST_CHUNK * sizeof(hostrange_t)); if (!new->hr) goto fail2; /* set entries in hostrange array to NULL *...
false
false
false
false
false
0
nss_arena_hash_free_entry ( void *pool, PLHashEntry *he, PRUintn flag ) { if( HT_FREE_ENTRY == flag ) { (void)nss_ZFreeIf(he); } }
false
false
false
false
false
0
gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer) { GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink); int n; GST_DEBUG ("render %d", GST_BUFFER_SIZE (buffer)); g_mutex_lock (interaudiosink->surface->mutex); n = gst_adapter_available (interaudiosink->surface->audio_adapter) ...
false
false
false
false
false
0
fso_gsm_constants_networkSignalIndicatorToPercentage (gint sig) { gint result = 0; gint _result_ = 0; gint _tmp0_ = 0; gint _tmp1_ = 0; gint _tmp2_ = 0; _tmp0_ = sig; _result_ = _tmp0_ * 20; _tmp1_ = _result_; if (_tmp1_ < 0) { result = 0; return result; } _tmp2_ = _result_; if (_tmp2_ > 100) { result...
false
false
false
false
false
0
ilReadBitPbm(PPMINFO *Info) { ILuint m, j, x, CurrByte; if (!ilTexImage(Info->Width, Info->Height, 1, (ILubyte)(Info->Bpp), 0, IL_UNSIGNED_BYTE, NULL)) { return IL_FALSE; } iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; x = 0; for (j = 0; j < iCurImage->SizeOfData;) { CurrByte = igetc(); for (m = 128; m > 0 &&...
false
false
false
false
false
0
OutputMove(FILE * fpOut, int side, const char *outBuf) { if ((side == 0) || (moveNum == 1)) { fprintf(fpOut, "%3d) ", moveNum); if (side == 1) fprintf(fpOut, "%28s", " "); moveNum++; } if (side == 0) fprintf(fpOut, "%-27s ", outBuf); else fprintf(fpOut...
false
false
false
false
false
0
AllocatePacket(int length) { Packet* p = new Packet; if(length > 0) { p->data = (uint8_t*)malloc(length); p->length = length; } return (XVDR::Packet*)p; }
false
false
false
false
false
0
Display_line_on_screen_wide(word x_pos,word y_pos,word width,byte * line) /* On affiche une ligne de pixels en les doublant. */ { int x; byte *dest; dest=Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_WIDTH; for(x=width;x>0;x--) { *(dest+1)=*dest=*line; dest+=ZOOMX; line++; } }
false
false
false
false
false
0
ucs4_str_width_a_to_b(UCS *ucsstr, int a, int b) { unsigned width = 0; int i, w; if(ucsstr) for(i = a; i <= b && ucsstr[i]; i++){ w = wcellwidth(ucsstr[i]); if(w != U4W_CTLSRGT) width += (w < 0 ? 1 : w); } return width; }
false
false
false
false
false
0
giggle_remote_remove_branches (GiggleRemote *self) { GiggleRemotePriv *priv; g_return_if_fail (GIGGLE_IS_REMOTE (self)); priv = GET_PRIV (self); g_list_free_full (priv->branches, g_object_unref); priv->branches = NULL; g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BRANCHES]); }
false
false
false
false
false
0
find_difference_bounds(Gif_OptData *bounds, Gif_Image *gfi, Gif_Image *last) { int lf, rt, lf_min, rt_max, tp, bt, x, y; Gif_OptBounds ob; /* 1.Aug.99 - use current bounds if possible, since this function is a speed bottleneck */ if (!last || last->disposal == GIF_DISPOSAL_NONE || last->disposal == ...
false
false
false
false
false
0
RCS_parsercsfile (const char *rcsfile) { FILE *fp; RCSNode *rcs; /* We're creating a new RCSNode, so there is no hope of finding it in the cache. */ rcsbuf_cache_close (); /* open the rcsfile */ if ((fp = CVS_FOPEN (rcsfile, FOPEN_BINARY_READ)) == NULL) { error (0, errno, "Couldn'...
false
false
false
false
true
1
ipoib_init_addr ( const void *hw_addr, void *ll_addr ) { const union ib_guid *guid = hw_addr; struct ipoib_mac *mac = ll_addr; memset ( mac, 0, sizeof ( *mac ) ); memcpy ( &mac->gid.s.guid, guid, sizeof ( mac->gid.s.guid ) ); }
false
false
false
false
false
0
autohelperendpat100(int trans, int move, int color, int action) { int a; UNUSED(color); UNUSED(action); a = AFFINE_TRANSFORM(648, trans, move); return is_halfeye(half_eye,a) && max_eye_value(a)>0 && !false_eye_territory[a]; }
false
false
false
false
false
0
set_object_name( FL_OBJECT * obj, const char * name, const char * cbname, const char * argname ) { int on = get_object_numb( obj ); if ( obj == NULL ) return; if ( on == -1 ) { if ( ( ! name || ! *name ) && ( ! c...
false
false
false
false
false
0
filter_butterworth(double* x, double* xout, int nx, const std::vector<double>& a, const std::vector<double>& b) { int nab = a.size(); if (nab >= nx) return false; double *z = (double*)NULL; GET_STORAGE(z, double, (size_t)nx); register int ix, iab; // pass 1 -- forward for (ix = 0; ix < n...
false
false
false
true
false
1
_trace_connattr_type (SQLINTEGER type) { char *ptr = "unknown connection attribute"; switch (type) { _S (SQL_ATTR_ACCESS_MODE); _S (SQL_ATTR_AUTOCOMMIT); _S (SQL_ATTR_AUTO_IPD); _S (SQL_ATTR_CONNECTION_DEAD); _S (SQL_ATTR_CONNECTION_TIMEOUT); _S (SQL_ATTR_CURRENT_CATALOG); ...
false
false
false
false
false
0
clutter_text_set_preedit_string (ClutterText *self, const gchar *preedit_str, PangoAttrList *preedit_attrs, guint cursor_pos) { ClutterTextPrivate *priv; g_return_if_fail (CLUTTER_IS_TEXT (self)); pri...
false
false
false
false
false
0
atom_stss_add_entry (AtomSTSS * stss, guint32 sample) { atom_array_append (&stss->entries, sample, 512); }
false
false
false
false
false
0
xgmac_stop(struct net_device *dev) { struct xgmac_priv *priv = netdev_priv(dev); if (readl(priv->base + XGMAC_DMA_INTR_ENA)) napi_disable(&priv->napi); writel(0, priv->base + XGMAC_DMA_INTR_ENA); netif_tx_disable(dev); /* Disable the MAC core */ xgmac_mac_disable(priv->base); /* Release and free the Rx/Tx...
false
false
false
false
false
0
atk_text_attribute_register (const gchar *name) { g_return_val_if_fail (name, ATK_TEXT_ATTR_INVALID); if (!extra_attributes) extra_attributes = g_ptr_array_new (); g_ptr_array_add (extra_attributes, g_strdup (name)); return extra_attributes->len + ATK_TEXT_ATTR_LAST_DEFINED; }
false
false
false
false
false
0
cmd_list_headers(LISTINFO *lp, int ac, char *av[]) { bool range; range = (ac > 2 && strcasecmp(av[2], "RANGE") == 0); if (ac > 2 && (strcasecmp(av[2], "MSGID") != 0) && !range) { Reply("%d Syntax error in arguments\r\n", NNTP_ERR_SYNTAX); return; } Reply("%d %s\r\n", NNTP_O...
false
false
false
false
false
0
alx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state) { struct alx_priv *alx = pci_get_drvdata(pdev); struct net_device *netdev = alx->dev; pci_ers_result_t rc = PCI_ERS_RESULT_NEED_RESET; dev_info(&pdev->dev, "pci error detected\n"); rtnl_lock(); if (netif_running(netdev)) { ne...
false
false
false
false
false
0
u132_remove(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); if (hcd) { struct u132 *u132 = hcd_to_u132(hcd); if (u132->going++ > 1) { dev_err(&u132->platform_dev->dev, "already being remove" "d\n"); return -ENODEV; } else { int rings = MAX_U132_RINGS; int endps ...
false
false
false
false
false
0
m_vaul_print_to_ostream (pIIR_AccessType n, ostream &o) { if (n->declaration == NULL) o << "access to " << n->designated_type; else o << n->declaration->declarator; }
false
false
false
false
false
0
_wind_stringprep_map(const uint32_t *in, size_t in_len, uint32_t *out, size_t *out_len, wind_profile_flags flags) { unsigned i; unsigned o = 0; for (i = 0; i < in_len; ++i) { struct translation ts = {in[i], 0, 0, 0}; const struct translation *s; s = (const struct translation *) bsear...
false
false
false
false
false
0
nv50_crtc_lut_load(struct drm_crtc *crtc) { struct nv50_disp *disp = nv50_disp(crtc->dev); struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); void __iomem *lut = nvbo_kmap_obj_iovirtual(nv_crtc->lut.nvbo); int i; for (i = 0; i < 256; i++) { u16 r = nv_crtc->lut.r[i] >> 2; u16 g = nv_crtc->lut.g[i] >> 2; u16...
false
false
false
false
false
0
accelerateWidgets(QList<QWidget*> widgets, const QString &alphabet) { QStringList texts; foreach (QWidget *widget, widgets) { QLabel *label = qobject_cast<QLabel*>(widget); if (label && label->buddy() && !label->text().isEmpty()) { texts << label->text(); continue; ...
false
false
false
false
false
0
bc_free_line_number_table(JVM_METHOD *m) { Dlist tmp; dl_traverse(tmp, m->line_table) { free(dl_val(tmp)); } dl_delete_list(m->line_table); m->line_table = NULL; }
false
false
false
false
false
0
IntersectionRectCircle(const Vector2f &rectPos, const Vector2f &rectSize, const Vector2f &circleCenter, float circleRadius) { // compute the distance between the center of the circle and the center of the rectangle Vector2f rectSizePer2 = rectSize / 2.f; Vecto...
false
false
false
false
false
0
game (void) { int gameoverflag; shufflelevels(); level = 1; lives = START_LIVES; fastretract = 0; score = 0; havecheated = 0; resetmoney = 1; gameoverflag = 0; while (gameoverflag == 0) { switch (playlevel()) { case LEVEL_COMPLETE : level++; ...
false
false
false
false
false
0
paint(QPainter *p, const QRect &rc, int yOff, bool *more) { if(!m_part->xmlDocImpl()) return; khtml::RenderCanvas *root = static_cast<khtml::RenderCanvas *>(m_part->xmlDocImpl()->renderer()); if(!root) return; #ifdef SPEED_DEBUG d->firstRepaintPending = false; #endif QPaintDevice* opd = m_part->xml...
false
false
false
false
false
0
_____lambda8_ (IndicatorKeyboardIBusMenu* self, GVariant* value) { GVariant* _tmp0_ = NULL; _tmp0_ = value; if (_tmp0_ != NULL) { gchar* key = NULL; GVariant* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; GeeHashMap* _tmp4_ = NULL; const gchar* _tmp5_ = NULL; gboolean _tmp6_ = FALSE;...
false
false
false
false
false
0
smscore_validate_client(struct smscore_device_t *coredev, struct smscore_client_t *client, int data_type, int id) { struct smscore_idlist_t *listentry; struct smscore_client_t *registered_client; if (!client) { pr_err("bad parameter.\n"); return -EINVAL; } registered_client = smscore_find_client...
false
false
false
false
false
0
ARCH_exit(void) { int i; ARCH_SYMBOL *sym; int pos_str; /* Write strings */ write_int_at(pos_start + sizeof(int), get_pos()); pos_str = 0; for (i = 0; i < TABLE_count(arch_table); i++) { sym = (ARCH_SYMBOL *)TABLE_get_symbol(arch_table, i); write_string(sym->sym.name, sym->sym.len); } /...
false
false
false
false
false
0
jshSaveToFlash() { FILE *f = fopen("espruino.state","wb"); if (f) { unsigned int jsVarCount = jsvGetMemoryTotal(); jsiConsolePrintf("\nSaving %d bytes...", jsVarCount*sizeof(JsVar)); JsVarRef i; for (i=1;i<=jsVarCount;i++) { fwrite(_jsvGetAddressOf(i),1,sizeof(JsVar),f); } fclose(f); ...
false
false
false
false
false
0
r100_vram_get_type(struct radeon_device *rdev) { uint32_t tmp; rdev->mc.vram_is_ddr = false; if (rdev->flags & RADEON_IS_IGP) rdev->mc.vram_is_ddr = true; else if (RREG32(RADEON_MEM_SDRAM_MODE_REG) & RADEON_MEM_CFG_TYPE_DDR) rdev->mc.vram_is_ddr = true; if ((rdev->family == CHIP_RV100) || (rdev->family =...
false
false
false
false
false
0
borg_cheat_equip(void) { int i; char buf[256]; /* Extract the equipment */ for (i = INVEN_WIELD; i < ALL_INVEN_TOTAL; i++) { /* skip non items */ if (!p_ptr->inventory[i].kind) { /* Be sure to wipe it from the borg equip */ WIPE(&borg_items[i], borg_item); } /* Default to "n...
false
false
false
false
false
0
dc1394_MONO8_to_YUV422(uint8_t *restrict src, uint8_t *restrict dest, uint32_t width, uint32_t height, uint32_t byte_order) { if ((width%2)==0) { // do it the quick way register int i = width*height - 1; register int j = (width*height << 1) - 1; register int y0, y1; switch (...
false
false
false
false
false
0
hasTimeConflict() const { if(!isFavourite()) // if it's not favourite, it can't have time-conflict return false; return conflictEvents(id(),conferenceId()).count() > 0 ? true : false; }
false
false
false
false
false
0
drv_EA232graphic_clear_display() { char cmd[4]; switch (Model->protocol) { case 1: case 3: /* Clear Display */ cmd[0] = 'D'; cmd[1] = 'L'; drv_EA232graphic_send(cmd, 2); break; case 2: /* Clear Display */ cmd[0] = ESC; cmd[1] = 'D'; cmd[2] = 'L'; drv_EA232graphic_send(cmd, 3); usleep(500...
false
false
false
false
false
0
queue_function_memberpenalty_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) { int penalty; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(queuename); AST_APP_ARG(interface); ); /* Make sure the returned value on error is NULL. */ buf[0] = '\0'; if (ast_strlen_zero(data)) { ast_l...
false
false
false
false
false
0
read_buffer_mpi (EggBuffer *buffer, gsize *offset, GckBuilder *builder, gulong attribute_type) { const guchar *data; gsize len; if (!egg_buffer_get_byte_array (buffer, *offset, offset, &data, &len)) return FALSE; gck_builder_add_data (builder, attribute_type, d...
false
false
false
false
false
0
append_charstring ___P((___STRING_TYPE(___ERR_CODE_CE_SELECT) buf, int *pos, const char *str), (buf, pos, str) ___STRING_TYPE(___ERR_CODE_CE_SELECT) buf; int *pos; const char *str;) { int i = 0; int p = *pos; while (str[i] != '\0') { if (p >= ___ERR_MAX_LE...
false
false
false
false
false
0
cifs_posix_convert_flags(unsigned int flags) { u32 posix_flags = 0; if ((flags & O_ACCMODE) == O_RDONLY) posix_flags = SMB_O_RDONLY; else if ((flags & O_ACCMODE) == O_WRONLY) posix_flags = SMB_O_WRONLY; else if ((flags & O_ACCMODE) == O_RDWR) posix_flags = SMB_O_RDWR; if (flags & O_CREAT) { posix_flags |...
false
false
false
false
false
0
econv_args(int argc, VALUE *argv, volatile VALUE *snamev_p, volatile VALUE *dnamev_p, const char **sname_p, const char **dname_p, rb_encoding **senc_p, rb_encoding **denc_p, int *ecflags_p, VALUE *ecopts_p) { VALUE opt, flags_v, ecopts; int sidx, didx; const char *sname, *dname; rb_e...
false
false
false
false
false
0
gog_series_labels_set_property (GObject *obj, guint param_id, GValue const *value, GParamSpec *pspec) { GogSeriesLabels *labels = GOG_SERIES_LABELS (obj); switch (param_id) { case SERIES_LABELS_PROP_POSITION: { char const *name = g_value_get_string (value); if (!strcmp (name, "centered")) gog_series_labe...
false
false
false
false
false
0
show_stats(struct patch *patch) { struct strbuf qname = STRBUF_INIT; char *cp = patch->new_name ? patch->new_name : patch->old_name; int max, add, del; quote_c_style(cp, &qname, NULL, 0); /* * "scale" the filename */ max = max_len; if (max > 50) max = 50; if (qname.len > max) { cp = strchr(qname.buf ...
false
false
false
false
false
0
update_queue_push(uq_callback_t callback, struct update_queue_data *uq_data) { update_queue_hash_replace(update_queue, callback, uq_data); if (!update_queue_has_idle_callback && !update_queue_is_frozen()) { update_queue_has_idle_callback = TRUE; add_idle_callback(...
false
false
false
false
false
0
print_sector(AFFILE *af,unsigned char *buf) { for(unsigned int i=0;i<af->image_sectorsize;i++){ if(isprint(buf[i])){ putchar(buf[i]); } else { putchar('.'); } if(i%64==63) putchar('\n'); } }
false
false
false
false
false
0
cword_is_not_variable(PLcword *cword, int location) { ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("\"%s\" is not a known variable", NameListToString(cword->idents)), parser_errposition(location))); }
false
false
false
false
false
0
getCalleeSavedRegs(const MachineFunction *MF) const { bool callsEHReturn = false; bool ghcCall = false; if (MF) { callsEHReturn = MF->getMMI().callsEHReturn(); const Function *F = MF->getFunction(); ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); } static const unsigned GhcCalle...
false
false
false
false
false
0
seamove_no_bombard(const struct tile *ptile, enum direction8 dir, const struct tile *ptile1, const struct pf_parameter *param) { if (is_native_tile_to_class(param->uclass, ptile1)) { return single_move_cost(param, ptile, ptile1); } else if (is_allied_c...
false
false
false
false
false
0
rem_lookup(ventry *ve, const char *name, void **newp) { int res; int type; struct entry *prev = rem_ventry_entry(ve); struct remfs *fs = rem_ventry_filesys(ve); struct entry *ent; if(prev != NULL) { res = rem_node_type(fs, prev); if(res < 0) return res; ...
false
false
false
false
false
0
GDALPDFFind4Corners(const GDAL_GCP* pasGCPList, int& iUL, int& iUR, int& iLR, int& iLL) { double dfMeanX = 0, dfMeanY = 0; int i; iUL = 0; iUR = 0; iLR = 0; iLL = 0; for(i = 0; i < 4; i++ ) { dfMeanX += pasGCPList[i].dfGCPPixel; dfMeanY += pasGC...
false
false
false
false
false
0
OnEvent(const SEvent& event) { if (IsEnabled) { bool changeEvent = false; switch(event.EventType) { case EET_MOUSE_INPUT_EVENT: switch(event.MouseInput.Event) { case EMIE_MOUSE_WHEEL: { f32 val = getValue() + (StepSize * event.MouseInput.Wheel); setValue(val); changeE...
false
false
false
false
false
0
loadTemplates() { if (!BoardLayerTemplates.value(moduleID(), "").isEmpty()) return; QFile file(m_filename); if (!file.open(QIODevice::ReadOnly)) return; QString svg = file.readAll(); if (svg.isEmpty()) return; BoardLayerTemplates.insert(moduleID(), getShapeForRenderer(svg, ViewLayer::Board));...
false
false
false
false
false
0
e1000_set_page_igp(struct e1000_hw *hw, u16 page) { e_dbg("Setting page 0x%x\n", page); hw->phy.addr = 1; return e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, page); }
false
false
false
false
false
0
dc_ftello64(FILE *fp) { off64_t rc; struct vsp_node *node; node = get_vsp_node(FILE_NO(fp)); if( node == NULL ) { return system_ftello64(fp); } if (fp == NULL) { return -1; } rc = dc_real_lseek( node, (off64_t)0, SEEK_CUR); m_unlock(&node->mux); return rc; }
false
false
false
false
false
0
custom_list_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter) { GtkTreePath *path; CustomRecord *record; CustomList *custom_list; g_return_val_if_fail (CUSTOM_IS_LIST(tree_model), NULL); g_return_val_if_fail (iter != NULL, NULL); g_return_val_if_fail (iter->user_da...
false
false
false
false
false
0
fso_gsm_gsm_sim_service_real_get_home_zone_parameters_data_free (gpointer _data) { FsoGsmGsmSimServiceGetHomeZoneParametersData* _data_; _data_ = _data; _data_->result = (_vala_FreeSmartphoneGSMSIMHomeZone_array_free (_data_->result, _data_->result_length1), NULL); _g_object_unref0 (_data_->self); g_slice_free (Fs...
false
false
false
false
false
0
del_line(struct edwin *w) { u8 buf[40]; int y; for (y = w->y; y < H-1; ++y) { xio_get_line(w->xw, y+1, buf); xio_put_line(w->xw, y, buf); } }
false
false
false
false
false
0
scsi_sgtable_index(unsigned short nents) { unsigned int index; BUG_ON(nents > SCSI_MAX_SG_SEGMENTS); if (nents <= 8) index = 0; else index = get_count_order(nents) - 3; return index; }
false
false
false
false
false
0
distance2( const HepLorentzRotation & lt ) const { HepBoost b1; HepRotation r1; decompose( b1, r1 ); HepBoost b2; HepRotation r2; lt.decompose (b2, r2); double db2 = b1.distance2( b2 ); double dr2 = r1.distance2( r2 ); return ( db2 + dr2 ); }
false
false
false
false
false
0
getOperationMode(Slice::Operation::Mode mode) { string result; switch(mode) { case Operation::Normal: result = "Ice.OperationMode.Normal"; break; case Operation::Nonmutating: result = "Ice.OperationMode.Nonmutating"; break; case Operation::Idempotent: resu...
false
false
false
false
false
0
fsbe_write_option_log(fsbe_context *cx) { int i; for (i = 1; i <= get_num_of_option_lines(); i++) { char *optline = get_option_line(i); fsbe_printf(cx, "Colog <%s>\n", optline); free(optline); } }
false
false
false
false
false
0
arcfb_release(struct fb_info *info, int user) { struct arcfb_par *par = info->par; int count = atomic_read(&par->ref_count); if (!count) return -EINVAL; atomic_dec(&par->ref_count); return 0; }
false
false
false
false
false
0
transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid, List **attnamelist, int16 *attnums, Oid *atttypids, Oid *opclasses) { List *indexoidlist; ListCell *indexoidscan; HeapTuple indexTuple = NULL; Form_pg_index indexStruct = NULL; Datum indclassDatum; bool isnull; oidvector ...
false
false
false
false
false
0
do_percent_subst (EggDesktopFile *desktop_file, char code, GString *str, GSList **documents, gboolean in_single_quotes, gboolean in_double_quotes) { GSList *d; char *doc; switch (code) { case '%': g_string_append_c (str, '%'); break; ...
false
false
false
false
false
0
qmonSubmitGetScript(Widget w, XtPointer cld, XtPointer cad) { static char filename[4*BUFSIZ]; static char directory[4*BUFSIZ]; static char pattern[BUFSIZ]; Boolean status = False; DENTER(GUI_LAYER, "qmonSubmitGetScript"); status = XmtAskForFilename(w, NULL, "@{Please t...
true
true
false
false
false
1
selectDel() { clear(); delete DataTheme.bases.takeAt( _idBase ); _idBase = std::min( _idBase, DataTheme.bases.count() - 1 ); init(); }
false
false
false
false
false
0
e_ilist_icon_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { Eina_List *l = NULL; E_Ilist_Item *si = NULL; API_ENTRY return; if ((sd->iw == w) && (sd->ih == h)) return; sd->iw = w; sd->ih = h; EINA_LIST_FOREACH(sd->items, l, si) { Evas_Coord mw = 0, mh = 0; if (!si) ...
false
false
false
false
false
0
acdHelpExpectInt(const AcdPAcd thys, AjBool table, AjPStr* str) { ajint i; acdAttrValueStr(thys, "default", "0", &acdTmpStr); if(ajStrToInt(acdTmpStr, &i)) ajFmtPrintAppS(str, "%d", i); else { if(table) ajFmtPrintAppS(str, "<i>calculated value</i>"); } return; }
false
false
false
false
false
0
init_gen_rand(uint32_t seed) { int i; psfmt32[idxof(0)] = seed; for (i = 1; i < N32; i++) { psfmt32[idxof(i)] = 1812433253UL * (psfmt32[idxof(i - 1)] ^ (psfmt32[idxof(i - 1)] >> 30)) + i; } idx = N32; period_certification(); initialized = 1; }
false
false
false
false
false
0
output_sif(ostream& out, short indent_size, short indent_level, SifOutputControl& soc) { UserInterface* gui = (UserInterface*)model->getGui(); static char gui_value_buffer[1025]; static char value_buffer[1025]; static char variable_buffer[1025]; char QM = '\"'; ParameterField* order_fld = getFieldBySifNa...
false
false
false
false
false
0
digest() { size_t length = pImpl_->getDigestLength(); auto buf = make_unique<unsigned char[]>(length); pImpl_->digest(buf.get()); return std::string(&buf[0], &buf[length]); } }
false
false
false
false
false
0
print_memory_access16(int datasize, const char *seg, const char *index, Bit16u disp) { print_datasize(datasize); if (intel_mode) { if (index == NULL) { dis_sprintf("%s:0x%x", seg, (unsigned) disp); } else { if (disp != 0) dis_sprintf("%s:[%s+0x%x]", seg, in...
false
false
false
false
false
0
bcmgenet_init_rx_queues(struct net_device *dev) { struct bcmgenet_priv *priv = netdev_priv(dev); u32 i; u32 dma_enable; u32 dma_ctrl; u32 ring_cfg; int ret; dma_ctrl = bcmgenet_rdma_readl(priv, DMA_CTRL); dma_enable = dma_ctrl & DMA_EN; dma_ctrl &= ~DMA_EN; bcmgenet_rdma_writel(priv, dma_ctrl, DMA_CTRL); d...
false
false
false
false
false
0
slot_delRace() { if( DataTheme.creatures.countRace() > 1 ) { save(); removeRace(); _creature = 0; init(); } }
false
false
false
false
false
0
esl_rootfinder_CreateFDF(int (*fdf)(double, void*, double*, double*), void *params) { int status; ESL_ROOTFINDER *R = NULL; ESL_ALLOC(R, sizeof(ESL_ROOTFINDER)); R->func = NULL; R->fdf = fdf; R->params = params; R->xl = -eslINFINITY; R->fl = 0.; /* unused...
false
false
false
false
false
0
Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps, int pkt_size) { curl_off_t min_sleep = 0; curl_off_t rv = 0; if(rate_bps == 0) return 0; /* If running faster than about .1% of the desired speed, slow * us down a bit. Use shift instead of division as the 0.1% ...
false
false
false
false
false
0
zx_zlib_raw_deflate(struct zx_ctx* c, int in_len, const char* in, int* out_len) { int ret, dlen; char* out; z_stream z; *out_len = 0; ZERO(&z, sizeof(z_stream)); z.zalloc = zx_zlib_zalloc; z.zfree = zx_zlib_zfree; z.opaque = c; z.next_in = (unsigned char*)in; z.avail_in = in_len; ret = deflateInit...
false
false
false
false
false
0
qh_init_qhull_command(int argc, char *argv[]) { int i; strcpy (qh qhull_command, argv[0]); for (i=1; i<argc; i++) { if (strlen (qh qhull_command) + strlen(argv[i]) + 1 < sizeof(qh qhull_command)) { strcat (qh qhull_command, " "); strcat (qh qhull_command, argv[i]); }else qhull_fatal(67); }...
false
false
false
false
false
0
CDB___db_txnlist_delete(listp, name, lid, deleted) void *listp; char *name; u_int32_t lid; int deleted; { DB_TXNHEAD *hp; DB_TXNLIST *p; int ret; hp = (DB_TXNHEAD *)listp; for (p = hp->head.lh_first; p != NULL; p = p->links.le_next) { if (p->type == TXNLIST_DELETE) if (strcmp(name, p->u.d.fname) == 0) { ...
false
false
false
false
false
0