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
filmSessionNAction(T_DIMSE_Message& rq, T_DIMSE_Message& rsp) { if (filmSession && (filmSession->isInstance(rq.msg.NActionRQ.RequestedSOPInstanceUID))) { storedPrintList.printSCPBasicFilmSessionAction(dviface, cfgname, rsp, presentationLUTList); } else { // film session does not exist or wrong instance UI...
false
false
false
false
false
0
_dxf_parent_RQ_message() { int ret; #if DEBUGMP DXMessage("writing to parent %d", exParent_RQwrite_fd); #endif ret = write(exParent_RQwrite_fd, "a", 1); if(ret != 1) _dxf_ExDie("Write Erroring notifying parent of job request, write returns %d, error number %d", ret, errno); return ERROR; ...
false
false
false
false
false
0
lzh_decode(struct lzh_stream *strm, int last) { struct lzh_dec *ds = strm->ds; int64_t avail_in; int r; if (ds->error) return (ds->error); avail_in = strm->avail_in; do { if (ds->state < ST_GET_LITERAL) r = lzh_read_blocks(strm, last); else r = lzh_decode_blocks(strm, last); } while (r == 100); st...
false
false
false
false
false
0
zinit(void) { static int initialized; if G_UNLIKELY(initialized) return; initialized = TRUE; addr_grows_upwards = vmm_grows_upwards(); #ifdef TRACK_ZALLOC z_leakset = leak_init(); #endif }
false
false
false
false
false
0
ff_mjpeg_encode_init(MpegEncContext *s) { MJpegContext *m; m = av_malloc(sizeof(MJpegContext)); if (!m) return -1; s->min_qcoeff=-1023; s->max_qcoeff= 1023; /* build all the huffman tables */ ff_mjpeg_build_huffman_codes(m->huff_size_dc_luminance, ...
false
false
false
false
false
0
tenmado_hit(tenm_object *my, tenm_object *your) { int n; /* sanity check */ if (my == NULL) { fprintf(stderr, "tenmado_hit: my is NULL\n"); return 0; } if (your == NULL) { fprintf(stderr, "tenmado_hit: your is NULL\n"); return 0; } if (!(your->attr & ATTR_PLAYER_SHOT)) return 0; ...
false
false
false
false
false
0
reliable_mark_deleted (struct reliable *rel, struct buffer *buf, bool inc_pid) { int i; for (i = 0; i < rel->size; ++i) { struct reliable_entry *e = &rel->array[i]; if (buf == &e->buf) { e->active = false; if (inc_pid) rel->packet_id = e->packet_id + 1; return; } } ASSERT (0); ...
false
false
false
false
false
0
ClearRules() { CritScope scope(&crit_); for (std::vector<FirewallSocketServer*>::const_iterator it = servers_.begin(); it != servers_.end(); ++it) { (*it)->ClearRules(); } }
false
false
false
false
false
0
GetKeywordSub( std::string osPath, int iSubscript, const char *pszDefault ) { const char *pszResult = oKeywords.GetKeyword( osPath.c_str(), NULL ); if( pszResult == NULL ) return pszDefault; if( pszResult[0] != '(' ...
false
false
false
false
false
0
gst_wrapper_camera_bin_src_start_capture (GstBaseCameraSrc * camerasrc) { GstWrapperCameraBinSrc *src = GST_WRAPPER_CAMERA_BIN_SRC (camerasrc); /* TODO should we access this directly? Maybe a macro is better? */ if (src->mode == MODE_IMAGE) { start_image_capture (src); src->image_capture_count = 1; } e...
false
false
false
false
false
0
_range_canonicalize(asn1cnst_range_t *range) { if(range->el_count == 0) { /* * Switch left and right edges, make them sorted. * It might be a mild warning though. */ if(_edge_compare(&range->left, &range->right) > 0) { asn1cnst_edge_t tmp = range->left; range->left = range->right; range->right =...
false
false
false
false
true
1
do_wait_running(sd_ack, timeout_fn, pto_actual) int sd_ack; void (*timeout_fn)(); void *pto_actual; { timeout_fn_sv = timeout_fn; pto_actual_sv = pto_actual; if (kio_to(pto_actual, pto_actual ? to_handler : (void (*)()) 0)) lampanic("lamd (kio_to)"); kio_intr(sd_ack, ack_handler, FALSE); }
false
false
false
false
false
0
dc1394_pxl_get_gpo_param_min_max(dc1394camera_t *camera, uint32_t gpio_id, uint32_t *p1_val, uint32_t *p2_val, uint32_t *p3_val, uint32_t *p1_min, uint32_t *p2_min, uint32_t *p3_min, uint32_t *p1_max, uint32_t *p2_max, uint32_t *p3_max) { dc1394error_t err; dc1394_pxl_gpio_info_t gpio_in...
false
false
false
false
false
0
CheckTOCCache(time_t timestamp, STORAGECLASS tokenclass) { CAFTOCL2CACHE *l2; CAFTOCL1CACHE *l1; CAFTOCCACHEENT *cent; unsigned char tmp; if (TOCCache[tokenclass] == NULL) return NULL; /* cache is empty */ tmp = (timestamp>>16) & 0xff; l2 = TOCCache[tokenclass]->l2ptr[tmp]; if (l2 == N...
false
false
false
false
false
0
enet_protocol_handle_send_unreliable (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) { ENetPacket * packet; size_t dataLength; if (command -> header.channelID >= peer -> channelCount || (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_...
false
false
false
false
false
0
sd_try_rc16_first(struct scsi_device *sdp) { if (sdp->host->max_cmd_len < 16) return 0; if (sdp->try_rc_10_first) return 0; if (sdp->scsi_level > SCSI_SPC_2) return 1; if (scsi_device_protection(sdp)) return 1; return 0; }
false
false
false
false
false
0
i915_gem_init_stolen(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; unsigned long reserved_total, reserved_base = 0, reserved_size; unsigned long stolen_top; mutex_init(&dev_priv->mm.stolen_lock); #ifdef CONFIG_INTEL_IOMMU if (intel_iommu_gfx_mapped && INTEL_INFO(dev)->gen < 8) {...
false
false
false
false
false
0
Xinclude(int modifier, char *label, char *mnemo, char *oper) { FILE *f; register int slevel; if ( !oper) error("no filename"); f=fopen(oper,"r"); if ( f==NULL ) error("can't open include file"); slevel=sourcelevel+1; if ( slevel >= MAXSOURCEDEEP ) fatal ( "too many nested INCLUDEs and MACROs" ); source...
false
false
false
false
true
1
perf_type_perf_data(struct scsi_cmd *cmd, unsigned char *data, unsigned int type, unsigned int data_type) { struct mmc_info *mmc = dtype_priv(cmd->dev); int tolerance; int write_flag; int except; long tmp; tolerance = (data_type >> 3) & 0x03; write_flag = (data_type >> 2) & 0x01; except =...
false
false
false
false
false
0
Md5Final(Md5* md5, byte* hash) { byte* local = (byte*)md5->buffer; AddLength(md5, md5->buffLen); /* before adding pads */ local[md5->buffLen++] = 0x80; /* add 1 */ /* pad with zeros */ if (md5->buffLen > MD5_PAD_SIZE) { XMEMSET(&local[md5->buffLen], 0, MD5_BLOCK_SIZE - md5-...
false
false
false
false
false
0
Stop() { SetActive(false); // Wait for signal sender termination (it will exit after setting // active_ to false). if (data_->signal_sender_launched_) { Top::WakeUpRuntimeProfilerThreadBeforeShutdown(); pthread_join(data_->signal_sender_thread_, NULL); data_->signal_sender_launched_ = false; } ...
false
false
false
false
false
0
tag_cmp_by_line (gconstpointer a, gconstpointer b, gpointer data) { const TMTag *t1 = a; const TMTag *t2 = b; gint direction = GPOINTER_TO_INT (data); gint rv; if (t1->type & tm_tag_file_t || t2->type & tm_tag_file_t) { rv = 0; } else { i...
false
false
false
false
false
0
snd_rawmidi_conf_generic_id(const char *id) { static const char ids[][8] = { "comment", "type", "hint", }; unsigned int k; for (k = 0; k < sizeof ids / sizeof *ids; ++k) { if (strcmp(id, ids[k]) == 0) return 1; } return 0; }
false
false
false
false
false
0
reduceForIcosaedralSymmetry(MolSymMolecule *mol,gint sym) { gdouble eps = 1e-3; if(mol->numberOfAtoms >0) eps = mol->listOfAtoms[0].eps; removeAllPointsOnOneSideOfAPlane(mol, 0.0, -1.0, 0.0, eps); removeAllPointsOnOneSideOfAPlane(mol, 0.467086179481, 0.809016994375, -0.356822089773,eps); if (sym & SYM_D) remo...
false
false
false
false
false
0
H5O_obj_type_real(H5O_t *oh, H5O_type_t *obj_type) { const H5O_obj_class_t *obj_class; /* Class of object for header */ FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(oh); HDassert(obj_type); /* Look up class for object header */ if(NULL == (obj_class = H5O_obj_class_...
false
false
false
false
false
0
GlyfBox(gr::gid16 nGlyphId, const void * pGlyf, const void * pLoca, size_t lLocaSize, const void * pHead, int & xMin, int & yMin, int & xMax, int & yMax) { xMin = yMin = xMax = yMax = INT_MIN; if (IsSpace(nGlyphId, pLoca, lLocaSize, pHead)) {return false;} void * pSimpleGlyf = GlyfLookup(nGlyphId, pGlyf, pLoca...
false
false
false
false
false
0
mm_generate_dh_parameters(PyObject *self, PyObject *args, PyObject *kwargs) { /* ???? should be threadified? */ static char *kwlist[] = { "filename", "verbose", "bits", NULL }; char *filename; int bits=512, verbose=0; BIO *out = NULL; DH *dh = NULL; if (!PyArg_P...
false
false
false
false
false
0
nice(int incr) { int prio; int res; errno=0; prio = getpriority(PRIO_PROCESS,0) + incr; if (prio < PRIO_MIN) prio=PRIO_MIN; if (prio >= PRIO_MAX) prio=PRIO_MAX-1; if (setpriority (PRIO_PROCESS, 0, prio)==-1) return -1; else return getpriority(PRIO_PROCESS, 0); }
false
false
false
false
false
0
maki_server_config_set_integer (makiServer* serv, gchar const* group, gchar const* key, gint value) { g_return_if_fail(serv != NULL); g_return_if_fail(group != NULL); g_return_if_fail(key != NULL); g_mutex_lock(serv->mutex.config); g_key_file_set_integer(serv->key_file, group, key, value); maki_server_config_sav...
false
false
false
false
false
0
SCqueryitem(CmdSet& Set) { if(!(((PseuInstance*)parentMethod)->GetWSession())) { logerror("Invalid Script call: SCqueryitem: WorldSession not valid"); DEF_RETURN_ERROR; } uint32 id = atoi(Set.defaultarg.c_str()); if(!id) return false; ((PseuInstance*)parentMethod)->GetW...
false
false
false
false
false
0
fxt1_decode_1HI (const GLubyte *code, GLint t, GLubyte *rgba) { const GLuint *cc; t *= 3; cc = (const GLuint *)(code + t / 8); t = (cc[0] >> (t & 7)) & 7; if (t == 7) { rgba[RCOMP] = rgba[GCOMP] = rgba[BCOMP] = rgba[ACOMP] = 0; } else { GLubyte r, g, b; cc = (const GLuint *)(code +...
false
false
false
false
false
0
gpio_charger_remove(struct platform_device *pdev) { struct gpio_charger *gpio_charger = platform_get_drvdata(pdev); if (gpio_charger->irq) free_irq(gpio_charger->irq, gpio_charger->charger); power_supply_unregister(gpio_charger->charger); gpio_free(gpio_charger->pdata->gpio); return 0; }
false
false
false
false
false
0
renderAction(OfxTime time, const std::string & field, const OfxRectI &renderRoI, OfxPointD renderScale, bool sequentialRender, ...
false
false
false
false
false
0
qce_tasklet_req_done(unsigned long data) { struct qce_device *qce = (struct qce_device *)data; struct crypto_async_request *req; unsigned long flags; spin_lock_irqsave(&qce->lock, flags); req = qce->req; qce->req = NULL; spin_unlock_irqrestore(&qce->lock, flags); if (req) req->complete(req, qce->result); ...
false
false
false
false
false
0
getGraphicSetIdFromFilename ( const ASCString& filename ) { tnfilestream stream ( filename, tnstream::reading ); int magic = stream.readInt(); if ( magic == -1 ) { return stream.readInt(); } else return 0; }
false
false
false
false
false
0
update() { Explo *explo; Explo *backExplo; Explo *nextExplo; for(int i = 0; i < NumExploTypes; i++) { if(exploPause[i][0] > 0.0) exploPause[i][0] -= game->speedAdj; else exploPause[i][0] = 0.0; if(exploPause[i][2]) //-- if flag was set, init count { exploPause[i][0] = exploPause[i][1]; exploPau...
false
false
false
false
false
0
rgb_gray_convert (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows) { my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; register int r, g, b; register IJG_INT32 * ctab = cconvert->rgb_ycc_tab; register JSAMPROW inptr; register JSAMPROW ...
false
false
false
false
false
0
sa_select_add_fd(int fd, void (*rx_handler)(void *), void (*tx_handler)(void *), void (*ex_handler)(void *), void *arg) { struct sa_sel_state *ss = &sa_sel_state; struct sa_sel_fd *fp; ASSERT_NOTIMPL(fd < NFC_NFDS); ASSERT(rx_handler != NULL || tx_handler != NULL || ex_handler != NULL); if (ss->ts_max...
false
false
false
false
false
0
sinfo_new_mean_of_columns( cpl_image *im ) { Vector * row=NULL ; int i=0; int j=0; int ilx=0; int ily=0; float* pidata=NULL; if ( im == NULL ) { sinfo_msg_error ("null image") ; return NullVector ; } ilx=cpl_image_get_size_x(im); ily=cpl_image_get_size_y(im);...
false
false
false
false
false
0
__invalidate_snapshot(struct dm_snapshot *s, int err) { if (!s->valid) return; if (err == -EIO) DMERR("Invalidating snapshot: Error reading/writing."); else if (err == -ENOMEM) DMERR("Invalidating snapshot: Unable to allocate exception."); if (s->store->type->drop_snapshot) s->store->type->drop_snapshot(s...
false
false
false
false
false
0
do_rename(char *from, char *to, char *s, int verbose) { char *newname, *where, *p, *q; int flen, tlen, slen; where = strstr(s, from); if (where == NULL) return 0; flen = strlen(from); tlen = strlen(to); slen = strlen(s); newname = xmalloc(tlen + slen + 1); p = s; q = newname; while (p < where) *q++ = ...
false
false
false
false
false
0
generateCpp(FILE * fp) { CglGMI other; fprintf(fp,"0#include \"CglGMI.hpp\"\n"); fprintf(fp,"3 CglGMI GMI;\n"); if (param.getMAX_SUPPORT()!=other.param.getMAX_SUPPORT()) fprintf(fp,"3 GMI.setLimit(%d);\n",param.getMAX_SUPPORT()); else fprintf(fp,"4 GMI.setLimit(%d);\n",param.getMAX_SUPPORT()); i...
false
false
false
false
false
0
fn_build_sub_function(i_ctx_t *i_ctx_p, const ref * op, gs_function_t ** ppfn, int depth, gs_memory_t *mem, const float *shading_domain, const int num_inputs) { int j, code, type; uint i; gs_function_params_t params; if (depth > MAX_SUB_FUNCTION_DEPTH) return_error(e_limitcheck); check_...
false
false
false
false
false
0
afterdeath_next(tenm_object *my) { int n; /* sanity check */ if (my == NULL) { fprintf(stderr, "afterdeath_next: my is NULL\n"); return; } if (my->count[2] != 1) return; tenm_table_apply_all((int (*)(tenm_object *, int)) (&delete_enemy_shot), 0); tenm_table_apply_all((int (*)(tenm_object ...
false
false
false
false
false
0
HttpGwMayWriteCallback (SOCKET sink) { http_gw_t* req = HttpGwFindRequest(sink); uint64_t complete = swift::SeqComplete(req->transfer); if (complete>req->offset) { // send data char buf[1<<12]; uint64_t tosend = std::min((uint64_t)1<<12,complete-req->offset); size_t rd = pread(req->t...
false
false
false
false
false
0
_config_gadman_module(E_Container *con, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; char buf[4096]; /* check if config dialog exists ... */ if (e_config_dialog_find("E", "extensions/gadman")) return NULL; /* ... else create it */ v = E_NEW(E_Config_Dialog_...
true
true
false
false
false
1
satipc_read(int socket, void *buf, int len, sockets *ss, int *rb) { unsigned char buf1[20]; uint16_t seq; adapter *ad; satipc *sip; get_ad_and_sipr(ss->sid, 0); struct iovec iov[3] = { { .iov_base = buf1, .iov_len = 12 }, { .iov_base = buf, .iov_len = len }, { NULL, 0 } }; *rb = readv(socket, iov, 2); // st...
true
true
false
false
false
1
record_initial (rtx dest, rtx set, void *data ATTRIBUTE_UNUSED) { struct loop_ivs *ivs = (struct loop_ivs *) data; struct iv_class *bl; if (GET_CODE (dest) != REG || REGNO (dest) >= ivs->n_regs || REG_IV_TYPE (ivs, REGNO (dest)) != BASIC_INDUCT) return; bl = REG_IV_CLASS (ivs, REGNO (dest)); ...
false
false
false
false
false
0
FCEU_DrawNumberRow(uint8 *XBuf, int *nstatus, int cur) { uint8 *XBaf; int z,x,y; XBaf=XBuf - 4 + (FSettings.LastSLine-34)*256; if(XBaf>=XBuf) for(z=1;z<11;z++) { if(nstatus[z%10]) { for(y=0;y<13;y++) for(x=0;x<21;x++) XBaf[y*256+x+z*21+z]=sstat[y*21+x+(z-1)*21*12]^0x80; } ...
false
false
false
false
false
0
ion_handle_kmap_put(struct ion_handle *handle) { struct ion_buffer *buffer = handle->buffer; if (!handle->kmap_cnt) { WARN(1, "%s: Double unmap detected! bailing...\n", __func__); return; } handle->kmap_cnt--; if (!handle->kmap_cnt) ion_buffer_kmap_put(buffer); }
false
false
false
false
false
0
init_pwq(struct pool_workqueue *pwq, struct workqueue_struct *wq, struct worker_pool *pool) { BUG_ON((unsigned long)pwq & WORK_STRUCT_FLAG_MASK); memset(pwq, 0, sizeof(*pwq)); pwq->pool = pool; pwq->wq = wq; pwq->flush_color = -1; pwq->refcnt = 1; INIT_LIST_HEAD(&pwq->delayed_works); INIT_LIST_HEAD(&pw...
false
false
false
false
false
0
modify_photo_cb(XmppStream *stream, xmlnode *root, gpointer user_data) { gchar *value; HybridNotify *notify; if (!xmlnode_has_prop(root, "type")) { goto modify_name_err; } value = xmlnode_prop(root, "type"); if (g_strcmp0(value, "result") != 0) { g_free(value); ...
false
false
false
false
false
0
setSystemMeters(unsigned char battery, unsigned char wifi) { ArRobotPacket sendPacket(HEADER1, HEADER2); sendPacket.setID (SET_BATTERY_WIFI); sendPacket.byteToBuf(battery); sendPacket.byteToBuf(wifi); if (!mySender->sendPacket(&sendPacket)) { ArLog::log (ArLog::Terse, "%s::setSystemMeters() Could not ...
false
false
false
false
false
0
brush_visualization() { Canvas* canvas = &Canvases[1]; int OX = canvas->Width / 2; int OY = canvas->Height / 2; int X0 = OX - brush_width / 2; int X1 = X0 + brush_width; int Y0 = OY - brush_height / 2; int Y1 = Y0 + brush_height; init_visual_canvas(); if ( TINT == brush_selection && brush_component )...
false
false
false
false
false
0
initMessage(Message &msg) { mgr_->initMessage(msg); if (valid_) { StringC rniPcdata = metaSyntax_->delimGeneral(Syntax::dRNI); rniPcdata += metaSyntax_->reservedName(Syntax::rPCDATA); getOpenElementInfo(msg.openElementInfo, rniPcdata); } }
false
false
false
false
false
0
get_func_end(void *func) { int r; Dl_info dl_info; ElfW(Sym) *elf_info; r = dladdr1(func, &dl_info, (void **) &elf_info, RTLD_DL_SYMENT); if (r == 0) return NULL; if (elf_info == NULL) return NULL; if (dl_info.dli_saddr == NULL) return NULL; return ((unsigned char *) func) + elf_info->st_size; }
false
false
false
false
false
0
gegl_sampler_cubic_get (GeglSampler *self, gdouble x, gdouble y, GeglMatrix2 *scale, void *output) { GeglSamplerCubic *cubic = (GeglSamplerCubic*)(self); GeglRectangle context_rect; const gint ...
false
false
false
false
false
0
flash_hits_mon(mtmp, otmp) struct monst *mtmp; struct obj *otmp; /* source of flash */ { int tmp, amt, res = 0, useeit = canseemon(mtmp); if (mtmp->msleeping) { mtmp->msleeping = 0; if (useeit) { pline_The("flash awakens %s.", mon_nam(mtmp)); res = 1; } } else if (mtmp->data->mlet != S_LIGHT) { ...
false
false
false
false
false
0
jswrap_require(JsVar *moduleName) { if (!jsvIsString(moduleName)) { jsWarn("Expecting a module name as a string, but got %t", moduleName); return 0; } // Search to see if we have already loaded this module JsVar *moduleList = jswrap_modules_getModuleList(); if (!moduleList) return 0; // out of memory...
false
false
false
false
false
0
player_init_all_alone_msg() { ship_obj *so; object *objp; Player->check_for_all_alone_msg=timestamp(0); // See if there are any friendly ships present, if so return without preventing msg for ( so = GET_FIRST(&Ship_obj_list); so != END_OF_LIST(&Ship_obj_list); so = GET_NEXT(so) ) { objp = &Objects[so->objnum];...
false
false
false
false
false
0
integer_to_byte() { fprintf(out, " ; integer_to_byte() (sign extend)\n"); if (stack > 0) { fprintf(out, " mov ebx, [esp]\n"); fprintf(out, " movsx ebx, bl\n"); fprintf(out, " mov [esp], ebx\n"); } else { fprintf(out, " movsx %s, %s\n", REG_STACK(reg-1), REG_STACK8(reg-1)); } ret...
false
false
false
false
false
0
test_uimanager_simple (void) { GObject *window, *uimgr, *menubar; GObject *menu, *label; GList *children; const gchar buffer[] = "<interface>" " <object class=\"GtkUIManager\" id=\"uimgr1\"/>" "</interface>"; const gchar buffer2[] = "<interface>" " <object class=\"GtkUIManager\" id=...
false
false
false
false
false
0
GC_push_marked2(struct hblk *h, hdr *hhdr) { word * mark_word_addr = &(hhdr->hb_marks[0]); word *p; word *plim; word *q; word mark_word; ptr_t greatest_ha = GC_greatest_plausible_heap_addr; ptr_t least_ha = GC_least_plausible_heap_addr; mse * mark_stack_top = GC_mark_stack_top; mse ...
false
false
false
false
false
0
ppc32_exec_TLBRE(cpu_ppc_t *cpu,ppc_insn_t insn) { int rt = bits(insn,21,25); int ra = bits(insn,16,20); int ws = bits(insn,11,15); m_uint32_t index; index = cpu->gpr[ra] & 0x3F; if (ws == 1) { cpu->gpr[rt] = cpu->ppc405_tlb[index].tlb_lo; } else { cpu->gpr[rt] = cpu->ppc405_tlb[index...
false
false
false
false
false
0
ListenToAllClients() { if (GrabInProgress) { ORBITS(AllSockets, AllSockets, SavedAllSockets); ORBITS(AllClients, AllClients, SavedAllClients); ORBITS(ClientsWithInput, ClientsWithInput, SavedClientsWithInput); GrabInProgress = 0; } }
false
false
false
false
false
0
updateAccessControls() { setComboContent(d->ownerPermCombo, PermissionsOwner, d->permissions, d->partialPermissions); setComboContent(d->groupPermCombo, PermissionsGroup, d->permissions, d->partialPermissions); setComboContent(d->othersPermCombo, PermissionsOthers, ...
false
false
false
false
false
0
amitk_object_set_parent(AmitkObject * object,AmitkObject * parent) { gboolean ref_added = FALSE; g_return_if_fail(AMITK_IS_OBJECT(object)); g_return_if_fail(AMITK_IS_OBJECT(parent) || (parent == NULL)); if (object->parent != NULL) { amitk_object_ref(object); ref_added = TRUE; amitk_object_remov...
false
false
false
false
false
0
dbi_driver_specific_function(dbi_driver Driver, const char *name) { dbi_driver_t *driver = Driver; dbi_custom_function_t *custom; if (!driver) return NULL; custom = driver->custom_functions; while (custom && strcasecmp(name, custom->name)) { custom = custom->next; } return custom ? custom->function_pointe...
false
false
false
false
false
0
reason(Solver& s, Literal p, LitVec& out) { LitVec::size_type i = out.size(); out.push_back(~head_[p == head_[0]]); if (!isSentinel(head_[2])) { out.push_back(~head_[2]); LitRange t = tail(); for (const Literal* r = t.first; r != t.second; ++r) { out.push_back(~*r); } if (contracted()) { const Litera...
false
false
false
false
false
0
print_window_print_start(PrintWindow *pw) { RenderFormat format; switch (pw->output) { case PRINT_OUTPUT_RGB_FILE: format = RENDER_FORMAT_RGB; break; case PRINT_OUTPUT_PS_FILE: case PRINT_OUTPUT_PS_CUSTOM: case PRINT_OUTPUT_PS_LPR: default: format = RENDER_FORMAT_PS; break; } print_job_st...
false
false
false
false
false
0
ffr4fr4(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, ...
false
false
false
false
false
0
gst_collect_pads_stop (GstCollectPads * pads) { GSList *collected; g_return_if_fail (pads != NULL); g_return_if_fail (GST_IS_COLLECT_PADS (pads)); GST_DEBUG_OBJECT (pads, "stopping collect pads"); /* make sure collect and start cannot be called anymore */ GST_COLLECT_PADS_STREAM_LOCK (pads); /* make p...
false
false
false
false
false
0
H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) { H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */ H5HL_prfx_t *prfx = NULL; /* Local heap prefix */ H5HL_dblk_t *dblk = NULL; /* Local heap data block */ H5HL_t *heap; /* Heap data ...
false
false
false
false
false
0
isOverloaded(unsigned IntrID) const { // Overload Table const bool OTable[] = { #define GET_INTRINSIC_OVERLOAD_TABLE #include "BlackfinGenIntrinsics.inc" #undef GET_INTRINSIC_OVERLOAD_TABLE }; if (IntrID == 0) return false; else return OTable[IntrID - Intrinsic::num_intrinsics]; }
false
false
false
false
false
0
collect_media_stats (GstRTSPMedia * media) { GstFormat format; gint64 position, duration; media->range.unit = GST_RTSP_RANGE_NPT; if (media->is_live) { media->range.min.type = GST_RTSP_TIME_NOW; media->range.min.seconds = -1; media->range.max.type = GST_RTSP_TIME_END; media->range.max.seconds ...
false
false
false
false
false
0
omega_print_term (FILE *file, omega_pb pb, eqn e, int c) { int i; bool first = true; int n = pb->num_vars; int went_first = -1; for (i = 1; i <= n; i++) if (c * e->coef[i] > 0) { first = false; went_first = i; if (c * e->coef[i] == 1) fprintf (file, "%s", omega_variable_to_str (pb, i)); els...
false
false
false
false
false
0
tg3_nway_reset(struct net_device *dev) { struct tg3 *tp = netdev_priv(dev); int r; if (!netif_running(dev)) return -EAGAIN; if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) return -EINVAL; tg3_warn_mgmt_link_flap(tp); if (tg3_flag(tp, USE_PHYLIB)) { if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) return -E...
false
false
false
false
false
0
nvkm_vm_map_sg(struct nvkm_vma *vma, u64 delta, u64 length, struct nvkm_mem *mem) { struct nvkm_vm *vm = vma->vm; struct nvkm_mmu *mmu = vm->mmu; dma_addr_t *list = mem->pages; int big = vma->node->type != mmu->func->spg_shift; u32 offset = vma->node->offset + (delta >> 12); u32 bits = vma->node->type - 1...
false
false
false
false
false
0
xfs_fs_get_dqblk( struct super_block *sb, struct kqid qid, struct qc_dqblk *qdq) { struct xfs_mount *mp = XFS_M(sb); if (!XFS_IS_QUOTA_RUNNING(mp)) return -ENOSYS; if (!XFS_IS_QUOTA_ON(mp)) return -ESRCH; return xfs_qm_scall_getquota(mp, from_kqid(&init_user_ns, qid), xfs_quota_type(qid.type), ...
false
false
false
false
false
0
gst_ogg_parse_submit_buffer (GstOggParse * ogg, GstBuffer * buffer) { gsize size; gchar *oggbuffer; GstFlowReturn ret = GST_FLOW_OK; size = gst_buffer_get_size (buffer); GST_DEBUG_OBJECT (ogg, "submitting %" G_GSIZE_FORMAT " bytes", size); if (G_UNLIKELY (size == 0)) goto done; oggbuffer = ogg_sync...
false
false
false
false
false
0
inf_communication_manager_get_factory_for(InfCommunicationManager* manager, const gchar* network, const gchar* method_name) { InfCommunicationManagerPrivate* priv; InfCommunicationFactory* factory; gboolean supported; guint i; ...
false
false
false
false
false
0
tftpd_list_find_multicast_server_and_add(struct thread_data **thread, struct thread_data *data, struct client_info *client) { struct thread_data *current = thread_data; /* head of the list */ struct tftp_opt *tftp_option...
true
true
false
false
false
1
makeEiffelClassTag (tokenInfo *const token) { if (EiffelKinds [EKIND_CLASS].enabled) { const char *const name = vStringValue (token->string); tagEntryInfo e; initTagEntry (&e, name); e.kindName = EiffelKinds [EKIND_CLASS].name; e.kind = EiffelKinds [EKIND_CLASS].letter; makeTagEntry (&e); } vStri...
false
false
false
false
false
0
gen_repr(PyGenObject *gen) { char *code_name; code_name = PyString_AsString(((PyCodeObject *)gen->gi_code)->co_name); if (code_name == NULL) return NULL; return PyString_FromFormat("<generator object %.200s at %p>", code_name, gen); }
false
false
false
false
false
0
__reinitialize_vars(struct mod_t *mdp) { register int32 ni; register struct net_t *np; register struct task_t *tskp; if (mdp->mnnum == 0) goto do_tasks; for (ni = 0, np = &(mdp->mnets[0]); ni < mdp->mnnum; ni++, np++) { /* if any instances any bits in tran channel, need to re-init */ /* all hard drivers...
false
false
false
false
false
0
aa_findcnew(jit_State *J, IRIns *ir) { while (ir->o == IR_ADD) { if (!irref_isk(ir->op1)) { IRIns *ir1 = aa_findcnew(J, IR(ir->op1)); /* Left-recursion. */ if (ir1) return ir1; } if (irref_isk(ir->op2)) return NULL; ir = IR(ir->op2); /* Flatten right-recursion. */ } return ir->o == I...
false
false
false
false
false
0
allClassDataMembers() const { DataMemberList result; // // Check if we have a base exception. If so, recursively // get the class data members of the base exception(s). // if(base()) { result = base()->allClassDataMembers(); } // // Append this exceptions's class data m...
false
false
false
false
false
0
eventFilter(QObject *watched, QEvent *event) { if (event->type() == QEvent::MouseButtonDblClick) { slotDetailsClicked(); return true; } return KWidgetItemDelegate::eventFilter(watched, event); }
false
false
false
false
false
0
__lroundl (long double x) { int32_t j0; u_int32_t se, i1, i0; long int result; int sign; GET_LDOUBLE_WORDS (se, i0, i1, x); j0 = (se & 0x7fff) - 0x3fff; sign = (se & 0x8000) != 0 ? -1 : 1; if (j0 < 31) { if (j0 < 0) return j0 < -1 ? 0 : sign; else { u_int32_t j = i0 + (0x40000000 ...
false
false
false
false
false
0
ext4_dirent_csum_set(struct inode *inode, struct ext4_dir_entry *dirent) { struct ext4_dir_entry_tail *t; if (!ext4_has_metadata_csum(inode->i_sb)) return; t = get_dirent_tail(inode, dirent); if (!t) { warn_no_space_for_csum(inode); return; } t->det_checksum = ext4_dirent_csum(inode, dirent, ...
false
false
false
false
false
0
runtobit ( short *runs, int nr, uchar *buf ) { static uchar zerofill [ 9 ] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00 } ; static uchar onefill [ 9 ] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff } ; uchar col=0, *buf0 = buf ; register short len, b=8, bytes ; while (...
false
false
false
false
false
0
ext4_mb_init_group(struct super_block *sb, ext4_group_t group, gfp_t gfp) { struct ext4_group_info *this_grp; struct ext4_buddy e4b; struct page *page; int ret = 0; might_sleep(); mb_debug(1, "init group %u\n", group); this_grp = ext4_get_group_info(sb, group); /* * This ensures that we don't reinit the bud...
false
false
false
false
false
0
event_seat_active_session_changed_copy (CkLogSeatActiveSessionChangedEvent *event, CkLogSeatActiveSessionChangedEvent *event_copy) { g_assert (event != NULL); g_assert (event_copy != NULL); event_copy->seat_id = g_strdup (event->seat_id); event_co...
false
false
false
false
false
0
add_slashes(char *dest, char *src, int maxlen, int len) { int i, j; for (i = 0, j = 0; i < len && j < maxlen; i++, j++) { switch (src[i]) { case '\n': dest[j++] = '\\'; dest[j] = 'n'; break; case '\r': dest[j++] = '\\'; dest[j] = 'r'; break; case '\\': case ';': case ',': dest[j++] =...
false
false
false
false
false
0
py_gc_file_find_absolute(PyObject* self, PyObject* args) { char* file; gchar* result; /* Parse arguments */ if(!PyArg_ParseTuple(args, "s:gc_file_find_absolute", &file)) return NULL; /* Call the corresponding C function */ result = (gchar*)gc_file_find_absolute(file, NULL); /* Create and return the...
false
false
false
false
false
0
Argusgen_multicast(proto) int proto; { register struct ablock *b0, *b1; register struct slist *s; switch (proto) { case Q_LINK: s = new_stmt(BPF_LD|BPF_B|BPF_ABS); s->s.k = 92; b0 = new_block(JMP(BPF_JSET)); b0->s.k = 1; b0->stmts = s; s = new_stmt(BPF_LD|BPF_B|BPF_ABS...
false
false
false
false
false
0
gm_net_connect_succeed(GmNet *net) { freeaddrinfo(net->priv->addr); net->priv->addr = NULL; net->priv->current = NULL; net->priv->source = g_io_add_watch(net->priv->channel, G_IO_IN | G_IO_HUP, (GIOFunc)on_gm_net_input_recv, net); if (net->priv->connect_timeout_id != 0) { g_source_remove(net->priv->conn...
false
false
false
false
false
0
internalUpdateSource(DataContainer *source) { if (minPollingInterval > 0 && source->timeSinceLastUpdate() < (uint)minPollingInterval) { // skip updating this source; it's been too soon //kDebug() << "internal update source is delaying" << source->timeSinceLastUpdate() << minPollingInterval; ...
false
false
false
false
false
0
_php_math_zvaltobase(zval *arg, int base TSRMLS_DC) { static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; if ((Z_TYPE_P(arg) != IS_LONG && Z_TYPE_P(arg) != IS_DOUBLE) || base < 2 || base > 36) { return STR_EMPTY_ALLOC(); } if (Z_TYPE_P(arg) == IS_DOUBLE) { double fvalue = floor(Z_DVAL_P(arg)); /* f...
false
false
false
false
false
0
entry_apply_mod( Slapi_Entry *e, const LDAPMod *mod ) { int i; int bvcnt; int err = LDAP_SUCCESS; PRBool sawsubentry=PR_FALSE; for ( i = 0; mod->mod_bvalues != NULL && mod->mod_bvalues[i] != NULL; i++ ) { if((strcasecmp(mod->mod_type,"objectclass") == 0) && (strncasecmp((const char *)mod->mod_b...
false
false
false
false
false
0