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
hang_tick(t_hang *h) { t_pipe *x = h->h_owner; t_hang *h2, *h3; t_pipeout *p; int i; union word *w; if (x->x_hang == h) x->x_hang = h->h_next; else for (h2 = x->x_hang; h3 = h2->h_next; h2 = h3) { if (h3 == h) { h2->h_next = h3->h_next; break; ...
false
false
false
false
false
0
addActions() { if ( m_bIsRoot ) { addAddBookmark(); addAddBookmarksList(); addNewFolder(); addEditBookmarks(); } else { if ( m_parentMenu->actions().count() > 0 ) m_parentMenu->addSeparator(); addOpenInTabs(); addAddBookmark(); addAddBookmarksList(); addNewFolder(); ...
false
false
false
false
false
0
loadXsfIn(VisuData *data, const gchar* filename, ToolFileFormat *format _U_, int nSet, GCancellable *cancel _U_, GError **error) { int res; GIOChannel *readFrom; g_return_val_if_fail(error && *error == (GError*)0, FALSE); g_return_val_if_fail(data && filename, FALSE); readFrom...
false
false
false
false
false
0
jbig2_word_stream_buf_get_next_word(Jbig2WordStream *self, int offset) { Jbig2WordStreamBuf *z = (Jbig2WordStreamBuf *)self; const byte *data = z->data; uint32_t result; if (offset + 4 < z->size) result = (data[offset] << 24) | (data[offset + 1] << 16) | (data[offset + 2] << 8) | data[offset + 3]; ...
false
false
false
false
false
0
u_parseit(userinput * const u) { int i,found = 0; updatecontext(); if (!u->cmd || !strlen(u->cmd)) { u_respond(u,"** Missing Command, try again"); u_fillwith_clean(u); return; } for (i=0; !found && i<(sizeof(userinput_parse)/sizeof(userinput_parse_t)); i++) if ( (!s...
false
false
false
false
false
0
max8997_muic_set_path(struct max8997_muic_info *info, u8 val, bool attached) { int ret = 0; u8 ctrl1, ctrl2 = 0; if (attached) ctrl1 = val; else ctrl1 = CONTROL1_SW_OPEN; ret = max8997_update_reg(info->muic, MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK); if (ret < 0) { dev_err(info->dev, "failed to...
false
false
false
false
false
0
pop_proxy() { int index, counter; proxy_stack--; clear_cinteger ("$integer"); clear_cstring ("$string"); clear_cstring ("$word"); /* RECREATE THE integer ARRAY FOR THIS STACK FRAME */ for (index = 0; index < proxy_backup[proxy_stack].integercount; index++) { add_cinteger ("$integer", proxy_backup[proxy_stac...
false
false
false
false
false
0
icalvalue_binary_as_ical_string_r(const icalvalue* value) { const char* data; char* str; icalerror_check_arg_rz( (value!=0),"value"); data = icalvalue_get_binary(value); str = (char*)icalmemory_new_buffer(60); snprintf(str, 60,"icalvalue_binary_as_ical_string is not implemented yet"); re...
false
false
false
false
false
0
suchMerkmal(const Str & merkmal) { if (!mInitialized) throw(iFehler("%s",_("Uninitialized dimension"))); for (int i=0; i<mGroesse; i++) if (mMerkmale[i]==merkmal) return i; return -1; }
false
false
false
false
false
0
valid() const { // Allow the seconds field to get as high as 61, since that is what // the ANSI C spec for struct tm says, and we have to use a struct // tm with localtime(). return year >= 0 && month > 0 && month < 13 && month_day > 0 && month_day <= days_in_month(month, year) && hour >= 0 && hour ...
false
false
false
false
false
0
globus_l_gfs_sigchld( void * user_arg) { int child_pid; int child_status; int child_rc; GlobusGFSName(globus_l_gfs_sigchld); GlobusGFSDebugEnter(); while(globus_gfs_c...
false
false
false
false
false
0
vl_svmdataset_get_accumulate_function(VlSvmDataset const *self) { if (self->hom == NULL) { switch (self->dataType) { case VL_TYPE_FLOAT: return (VlSvmAccumulateFunction) vl_svmdataset_accumulate_f ; break ; case VL_TYPE_DOUBLE: return (VlSvmAccumulateFunction) vl_svmdataset_acc...
false
false
false
false
false
0
__bnx2x_iov_free_vfdb(struct bnx2x *bp) { if (bp->vfdb) { kfree(bp->vfdb->vfqs); kfree(bp->vfdb->vfs); kfree(bp->vfdb); } bp->vfdb = NULL; }
false
false
false
false
false
0
mgpssubmesh(int wrap, int nu, int nv, int umin, int umax, int vmin, int vmax, HPoint3 *meshP, Point3 *meshN, ColorA *meshC) { int v; int ucnt; HPoint3 *P; Point3 *N; ColorA *C; int prev; int du; int i; int has; Appearance *ap; if (nu <= 0 || nv <= 0) return; ap = &_mgc->astk->ap; if (...
false
false
false
false
false
0
playSound(bool loop) { int i; for(i=0;i<MAX_PLAYING_SOUNDS;i++) { if(playing[i].active==0) break; } if(i==MAX_PLAYING_SOUNDS) return 1; id = i; SDL_LockAudio(); playing[i].active=1; playing[i].sound=&this_sound; playing[i].position=0; playing[i].loop = loop; SDL_UnlockAudio();...
false
false
false
false
false
0
gwy_gradient_editor_marker_selected(GwyGradientEditor *editor, gint i) { GwyResourceEditor *res_editor; GwyGradient *gradient; GwyGradientPoint point; GtkColorSelection *colorsel; GdkColor gdkcolor; gboolean selected; res_editor = GWY_RESOURCE_EDITOR(edit...
false
false
false
false
false
0
do_listen(struct in_addr addr, int port) { int ls = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in saddr = {0}; int val = 1; setsockopt(ls, SOL_SOCKET, SO_REUSEADDR, (void *)&val, sizeof(int)); saddr.sin_addr = addr; saddr.sin_port = htons(port); saddr.sin_family = AF_INET; i...
false
false
false
false
false
0
mtk_rd_deinit(void) { if (mtk_device == HOLUX_GR245) { int rc = do_cmd("$PHLX827*31\r\n", "PHLX860*32", NULL, 10); if (rc != 0) { dbg(2, "Goodbye not successfull.\n"); } } dbg(3, "Closing port...\n"); gbser_deinit(fd); fd = NULL; xfree(port); }
false
false
false
false
false
0
session_lookup_by_tsih(uint16_t tsih) { struct iscsi_session *session; list_for_each_entry(session, &sessions_list, hlist) { if (session->tsih == tsih) return session; } return NULL; }
false
false
false
false
false
0
set_value_from_default(const char *default_value, enum data_type type, void *data) { switch (type) { case INT_TYPE: *((int *)data) = atoi(default_value); break; case FLOAT_TYPE: *((float *)data) = (float)atof(default_value); break; case DOUBLE_TYPE: *((double *)data) = atof(default_value); break; case ...
false
false
false
false
true
1
CTypicalColorsControl(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, bool hasEmissive, IGUIElement* parent, s32 id) : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(60,250))) , ControlAmbientColor(0), ControlDiffuseColor(0), ControlSpecularC...
false
false
false
false
false
0
fs_emu_init_2(int options) { fs_log("fs_emu_init_2\n"); #ifdef USE_SDL fs_emu_log("initializing SDL\n"); SDL_Init(SDL_INIT_EVERYTHING); #endif fs_emu_hud_init_after_config(); fs_emu_theme_init(); #ifdef WITH_NETPLAY //g_random_set_seed(time(NULL)); fs_emu_netplay_init(); #endif if (...
false
false
false
false
false
0
gfp_xdr_send_async_request_header(struct gfp_xdr *server, gfp_xdr_async_peer_t async_server, size_t size, gfarm_int32_t (*result_callback)(void *, void *, size_t), void (*disconnect_callback)(void *, void *), void *closure, gfarm_int32_t *xidp) { gfarm_error_t e; gfarm_int32_t xid, xid_and_type; struct gfp_xdr_...
false
false
false
false
false
0
convertColourValue(const ColourValue& src, VertexElementType dst) { switch(dst) { #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT default: #endif case VET_COLOUR_ARGB: return src.getAsARGB(); #if OGRE_PLATFORM != OGRE_PLATFORM_WIN...
false
false
false
false
false
0
dCollideSpherePlane (dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip) { dIASSERT (skip >= (int)sizeof(dContactGeom)); dIASSERT (o1->type == dSphereClass); dIASSERT (o2->type == dPlaneClass); dIASSERT ((flags & NUMC_MASK) >= 1); dxSphere *sphere = (dxSphere*) o1; dxPlane *plane = (dxP...
false
false
false
false
false
0
OnButtonRelease() { if (this->MouseCursorState == vtkImageCroppingRegionsWidget::NoLine) { return; } this->Moving = 0; this->EventCallbackCommand->SetAbortFlag(1); this->EndInteraction(); this->InvokeEvent(vtkCommand::EndInteractionEvent, NULL); this->MouseCursorState = vtkImageCroppingRegions...
false
false
false
false
false
0
cl_host_list_get_elem_host(cl_raw_list_t* list_p, const char *unresolved_hostname) { cl_host_list_elem_t *elem = NULL; if (list_p != NULL && unresolved_hostname != NULL) { cl_host_list_data_t* ldata = list_p->list_data; if (ldata->ht != NULL) { if (sge_htable_lookup(ldata->ht, unresolved_hos...
false
false
false
false
false
0
graph_all(void) { int i; /* Print the sequence information. */ fprintf(out_file, "%s: %s\n", current_map->block_family, current_map->description); fprintf(out_file, "%d distinct blocks in %d sequences\n", current_map->tot_num_blocks, current_map->num_seqs); /* Store maxlength where other functions ca...
false
false
false
false
false
0
DecodeMatrix(isdn_v110_stream *v, unsigned char *m, int len, unsigned char *buf) { int line = 0; int buflen = 0; int mbit = 64; int introducer = v->introducer; int dbit = v->dbit; unsigned char b = v->b; while (line < len) { /* Are we done with all lines of the matrix? */ if ((line % 10) == 0) { /* the 0. ...
false
false
false
false
false
0
getSectionKind_ELF( Elf_Shdr *hdr, int *is_bss ) { *is_bss = FALSE; if (hdr->sh_type == SHT_PROGBITS && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_EXECINSTR)) { /* .text-style section */ return SECTIONKIND_CODE_OR_RODATA; } if (hdr->sh_type == SHT_PROGBITS ...
false
false
false
false
false
0
_expect_check( const char* const function, const char* const parameter, const char* const file, const int line, const CheckParameterValue check_function, void * const check_data, CheckParameterEvent * const event, const int count) { CheckParameterEvent * const check = event ? eve...
false
false
false
false
false
0
glade_widget_adaptor_pack_actions_new (GladeWidgetAdaptor *adaptor) { GList *l, *list = NULL; g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL); for (l = adaptor->packing_actions; l; l = g_list_next (l)) { GWActionClass *action = l->data; GObject *obj = g_object_new (GLADE_TYPE_WIDGET_ACTION, ...
false
false
false
false
false
0
niceMod(double a, double b) { if (b == 0) return 0; return a - floor(a/b)*b; }
false
false
false
false
false
0
FreeDataMember(struct __ecereNameSpace__ecere__com__DataMember * parentMember) { struct __ecereNameSpace__ecere__com__DataMember * dataMember; for(dataMember = parentMember->members.first; dataMember; dataMember = dataMember->next) { if(dataMember->type == 2 || dataMember->type == 1) FreeDataMember(dataMember); if(dat...
false
false
false
false
false
0
enumerate_single(single_enumerator_t *this, void **item) { if (this->done) { return FALSE; } *item = this->item; this->done = TRUE; return TRUE; }
false
false
false
false
false
0
pam_sm_open_session (pam_handle_t * pamh, int flags, int argc, const char **argv) { /* * Bug #120 fix: close the LDAP connection as it may time out * before pam_sm_close_session() is called. */ void *session; if (pam_get_data (pamh, PADL_LDAP_SESSION_DATA, (const void **) &session) == PAM_S...
false
false
false
false
false
0
slapd_exemode_archive2db() { int return_value= 0; Slapi_PBlock pb; struct slapdplugin *backend_plugin; slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) { LDAPDebug(LDAP_DEBUG_ANY, "ERROR: Could not find the ldbm backend pl...
false
false
false
false
false
0
gspca_disconnect(struct usb_interface *intf) { struct gspca_dev *gspca_dev = usb_get_intfdata(intf); #if IS_ENABLED(CONFIG_INPUT) struct input_dev *input_dev; #endif PDEBUG(D_PROBE, "%s disconnect", video_device_node_name(&gspca_dev->vdev)); mutex_lock(&gspca_dev->usb_lock); gspca_dev->present = 0; destroy_u...
false
false
false
false
false
0
json_node_from_call (RestProxyCall *call, const char *name) { JsonParser *parser; JsonNode *root = NULL; GError *error; gboolean ret = FALSE; parser = json_parser_new (); if (call == NULL) goto out; if (!SOUP_STATUS_IS_SUCCESSFUL (rest_proxy_call_get_status_code (call))) { ...
false
false
false
false
false
0
createSource(const QString &sourceName, QObject *parent) { QGeoPositionInfoSourceFactory *f = QGeoSatelliteInfoSourcePrivate::plugins().value(sourceName); if (f) { QGeoSatelliteInfoSource *src = f->satelliteInfoSource(parent); if (src) return src; } return 0; }
false
false
false
false
false
0
RunningLater() { try { if (account.isDestroyed()) { fail("Server connection unexpectedly shut down."); return; } if (!fixMessageNumber(account, messageq.front().second, messageq.front().first)) { messageq.pop(); success("OK"); return; } uid=messageq.front().second; messageNum...
false
false
false
false
false
0
e1000_eeprom_checks(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; int ret_val; u16 buf = 0; if (hw->mac.type != e1000_82573) return; ret_val = e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &buf); le16_to_cpus(&buf); if (!ret_val && (!(buf & (1 << 0)))) { /* Deep Smart Power Down (DSPD...
false
false
false
false
false
0
RemoveAttrDefault(Oid relid, AttrNumber attnum, DropBehavior behavior, bool complain) { Relation attrdef_rel; ScanKeyData scankeys[2]; SysScanDesc scan; HeapTuple tuple; bool found = false; attrdef_rel = heap_open(AttrDefaultRelationId, RowExclusiveLock); ScanKeyInit(&scankeys[0], Anum_pg_attrdef_ad...
false
false
false
false
false
0
read_line(const char *prompt) { int sz; sz = read_line_input(prompt, line_buffer, sizeof(line_buffer), NULL); if (sz <= 0) exit(EXIT_SUCCESS); /* Ctrl-D or Ctrl-C */ if (line_buffer[sz-1] == '\n') line_buffer[--sz] = '\0'; line_ptr = line_buffer; while (*line_ptr != '\0' && (unsigned char)*line_ptr <= ' ')...
false
false
false
false
false
0
seed_curve(float *seed, const float **curves, float amp, int oc, int n, int linesper,float dBoffset){ int i,post1; int seedptr; const float *posts,*curve; int choice=(int)((amp+dBoffset-P_LEVEL_0)*.1f); choice=max(choice,0); choice=min(choice,P_LEVELS-1); posts=curves[...
false
false
false
false
false
0
pop(void) #else Aptr pop() #endif { if (stackp == 0) syserr("Stack underflow."); return(stack[--stackp]); }
false
false
false
false
false
0
format_operator(const expression * e, int prec) { int prec2 = e->data.func.prec; char *arg1, *arg2, *arg3; char *result; switch (e->data.func.argc) { case 1: arg1 = format_expression_prec(e->data.func.args[1], prec2); result = G_malloc(strlen(e->data.func.oper) + strlen(arg1) + 3); sprintf(resul...
false
false
false
false
false
0
gst_rtp_jitter_buffer_src_activate_push (GstPad * pad, gboolean active) { gboolean result = TRUE; GstRtpJitterBuffer *jitterbuffer = NULL; jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad)); if (active) { /* allow data processing */ gst_rtp_jitter_buffer_flush_stop (jitterbuffer); /*...
false
false
false
false
false
0
setMeshFs() { delete[] modelInfo->meshFs; modelInfo->meshFs = NULL; if ( modelInfo->nofMeshes == 0 ) return; modelInfo->meshFs = new double[modelInfo->nofMeshes]; // Init for (int i = 0; i < modelInfo->nofMeshes; i++ ) modelInfo->meshFs[i] = 1.0; }
false
false
false
false
false
0
find_subpos(const char *buf, unsigned long sz, const char **sub, const char **body) { while (*buf) { const char *eol = strchr(buf, '\n'); if (!eol) return; if (eol[1] == '\n') { buf = eol + 1; break; /* found end of header */ } buf = eol + 1; } while (*buf == '\n') buf++; if (!*buf) return; ...
false
false
false
false
false
0
savage3DDrawRectangle( void *drv, void *dev, DFBRectangle *rect ) { Savage3DDriverData *sdrv = (Savage3DDriverData*) drv; Savage3DDeviceData *sdev = (Savage3DDeviceData*) dev; savage3D_waitfifo( sdrv, sdev, 12 ); /* first line */ BCI_SEND( BCI_CMD_RECT | BCI_CMD_CLIP_CURRENT | ...
false
false
false
false
false
0
nanoscope_get_metadata(GHashTable *hash, GList *list) { static const gchar *hashes[] = { "File list", "Scanner list", "Equipment list", "Ciao scan list", }; GwyContainer *meta; GList *l; guint i; meta = gwy_container_new(); for (l = list; l; l = g_list_next(l...
false
false
false
false
false
0
parseBitmap() { XmlAttributes attr; if (!parseAttributes(attr)) return false; String objNumStr; if (attr.slash() && attr.has("pdfObject", objNumStr)) { int objNum = Lex(objNumStr).getInt(); Buffer bits = image(objNum); writeAttributes(attr); // write bits const char *data = bits.data(); ...
false
false
false
false
false
0
mpz_goetgheluck_bin_uiui (mpz_ptr r, unsigned long int n, unsigned long int k) { mp_limb_t *sieve, *factors, count; mp_limb_t prod, max_prod, j; TMP_DECL; ASSERT (BIN_GOETGHELUCK_THRESHOLD >= 13); ASSERT (n >= 25); TMP_MARK; sieve = TMP_ALLOC_LIMBS (primesieve_size (n)); count = gmp_primesieve (sieve...
false
false
false
false
false
0
setDiscontiguosAttribute(collIterate *source, UChar *buffer, UChar *tempdb) { /* okay confusing part here. to ensure that the skipped characters are considered later, we need to place it in the appropriate position in the normalization buffer and reassign the pos pointer...
false
false
false
false
false
0
slot_setup_abone() { SKELETON::PrefDiag* pref= CORE::PrefDiagFactory( get_parent_win(), CORE::PREFDIAG_ARTICLE, m_url_article, "show_abone" ); pref->run(); delete pref; }
false
false
false
false
false
0
ud_clear_margins(struct vc_data *vc, struct fb_info *info, int bottom_only) { unsigned int cw = vc->vc_font.width; unsigned int ch = vc->vc_font.height; unsigned int rw = info->var.xres - (vc->vc_cols*cw); unsigned int bh = info->var.yres - (vc->vc_rows*ch); struct fb_fillrect region; region.color = 0; ...
false
false
false
false
false
0
hplace(bucket **hslot, bucket *b) { if (*hslot != b) { if (b->hprev) *b->hprev = b->hnext; if (b->hnext) b->hnext->hprev = b->hprev; b->hprev = hslot; b->hnext = *hslot; if (*hslot) (*hslot)->hprev = &b->hnext; *hslot = b; } }
false
false
false
false
false
0
show_progress(struct worker_thread *threads, unsigned long total) { unsigned long last_nitems = 0; struct timeval last_tv; fio_gettime(&last_tv, NULL); while (print_progress) { unsigned long this_items; unsigned long nitems = 0; uint64_t tdiff; float perc; int some_done = 0; int i; for (i = 0; i < ...
false
false
false
false
true
1
git_revwalk_free(git_revwalk *walk) { unsigned int i; const void *GIT_UNUSED(_unused); commit_object *commit; if (walk == NULL) return; git_revwalk_reset(walk); /* if the parent has more than PARENTS_PER_COMMIT parents, * we had to allocate a separate array for those parents. * make sure it's being free'...
false
false
false
false
false
0
pad_text(char * str, int width) { int i; for (i=strlen(str);i<width;i++) { str[i]=' '; } str[i]=0; }
false
false
false
false
false
0
activate_documents_list_item (GeditWindow *window, GeditTab *tab) { GtkAction *action; gchar *action_name; gint page_num; GeditNotebook *active_notebook; gboolean is_active; active_notebook = gedit_multi_notebook_get_active_notebook (window->priv->multi_notebook); page_num = gtk_notebook_page_num (G...
false
false
false
false
false
0
updateTurn() { if ( turn ) turn->SetText( ASCString::toString( gamemap->time.turn() )); if ( currentPlayer ) { if ( gamemap->actplayer >= 0 ) currentPlayer->SetText( gamemap->player[gamemap->actplayer].getName() ); else currentPl...
false
false
false
false
false
0
gs_manager_get_lock_active (GSManager *manager, gboolean *lock_active) { if (lock_active != NULL) { *lock_active = FALSE; } g_return_if_fail (GS_IS_MANAGER (manager)); *lock_active = manager->priv->lock_active; }
false
false
false
true
false
1
pause_board (gboolean pause) { if(gcomprisBoard==NULL) return; if(!gamewon) { if(pause == TRUE) stop_frigate_anim(); else start_frigate_anim(); } board_paused = pause; }
false
false
false
false
false
0
ai_turn (edict_t * self, float dist) { if (dist) M_walkmove (self, self->s.angles[YAW], dist); if (FindTarget (self)) return; M_ChangeYaw (self); }
false
false
false
false
false
0
can_delete_files_without_confirm (GList *files) { g_assert (files != NULL); while (files != NULL) { if (!can_delete_without_confirm (files->data)) { return FALSE; } files = files->next; } return TRUE; }
false
false
false
false
false
0
createAArch64ELFObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI, bool IsLittleEndian) { MCELFObjectTargetWriter *MOTW = new AArch64ELFObjectWriter(OSABI, IsLittleEndian); return createELFObjectWriter(MOTW, ...
false
false
false
false
false
0
qinstance_parse_qtype_from_string(lListElem *this_elem, lList **answer_list, const char *value) { bool ret = true; u_long32 type = 0; DENTER(QINSTANCE_TYPE_LAYER, "qinstance_parse_qtype_from_string"); SGE_CHECK_POINTER_FALSE(this_elem, answer_list); if (value != NULL &&...
false
false
false
false
false
0
init() { low=1; high=0xFFFFFFFF; pr.init(); if (!pr.isModeled()) low=0, buf.resize(1<<16); }
false
false
false
false
false
0
addrcache_remove_folder_delete( AddressCache *cache, ItemFolder *folder ) { AddrItemObject *obj = NULL; cm_return_val_if_fail( cache != NULL, NULL ); if( folder ) { gchar *uid = ADDRITEM_ID(folder); if( uid == NULL || *uid == '\0' ) return NULL; obj = ( AddrItemObject * ) g_hash_table_lookup( cache->itemHash...
false
false
false
false
false
0
pk_decode(const uint8_t * ldata,int * len){ ctr=0;hilo=0; data=ldata; int length=*len; // Length of character bytestream int height; // Height of character in bytes int hoff; // bit position for non-integer heights uint8_t * bufptr=charBuf; // Output buffer for decoded character heigh...
false
false
false
false
false
0
compileMulDiv(Token *&tok, AST_state& state) { compilePointerToElem(tok, state); while (tok) { if (Token::Match(tok, "[/%]") || (tok->str() == "*" && !tok->astOperand1())) { if (Token::Match(tok, "* [*,)]")) { Token* tok2 = tok; while (tok2->next() && tok2->st...
false
false
false
false
false
0
findsnake(int depth, long A, long N, long B, long M) { SNAKE *sp; long ulx; long uly; long lrx; long lry; long D; long count; /* * If more than one change needed, then call ourself for each part. */ ...
false
false
false
false
false
0
fm_folder_dispose(GObject *object) { FmFolder *folder; g_return_if_fail(object != NULL); g_return_if_fail(FM_IS_FOLDER(object)); /* g_debug("fm_folder_dispose"); */ folder = (FmFolder*)object; if(folder->dirlist_job) free_dirlist_job(folder); if(folder->pending_jobs) { ...
false
false
false
false
false
0
handle_ept_misconfig(struct kvm_vcpu *vcpu) { int ret; gpa_t gpa; gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); if (!kvm_io_bus_write(vcpu, KVM_FAST_MMIO_BUS, gpa, 0, NULL)) { skip_emulated_instruction(vcpu); trace_kvm_fast_mmio(gpa); return 1; } ret = handle_mmio_page_fault(vcpu, gpa, true); if (likely(ret...
false
false
false
false
false
0
W_NWTMergeFile(char *filename, int flags) { int old_numlumps; old_numlumps = numlumps; // Load PWAD if (W_AddFile(filename) == NULL) return; // iwad is at the start, pwad was appended to the end iwad.lumps = lumpinfo; iwad.numlumps = old_numlumps; pwad.lumps = lumpinfo + ol...
false
false
false
false
false
0
ssd_routine_start(void *data) { struct ssd_device *dev; if (!data) { return; } dev = data; dev->routine_tick++; if (test_bit(SSD_INIT_WORKQ, &dev->state) && !ssd_busy(dev)) { (void)test_and_set_bit(SSD_LOG_HW, &dev->state); queue_work(dev->workq, &dev->log_work); } if ((dev->routine_tick % SSD_HWMON_R...
false
false
false
false
false
0
prepareFromUMappings(UCMTable *table) { UCMapping *mappings, *m; int32_t *map; int32_t i, j, count; int8_t flag; mappings=table->mappings; map=table->reverseMap; count=table->mappingsLength; /* * we do not go through the map on input because the mappings are * sorted lexicall...
false
false
false
false
false
0
embPropPyrimidine(char base) { if(strchr(propPyrimidines, (ajint)base)) return ajTrue; return ajFalse; }
false
false
false
false
false
0
__ieee754_acoshl(long double x) { long double t; u_int32_t se,i0,i1; GET_LDOUBLE_WORDS(se,i0,i1,x); if(se<0x3fff || se & 0x8000) { /* x < 1 */ return (x-x)/(x-x); } else if(se >=0x401d) { /* x > 2**30 */ if(se >=0x7fff) { /* x is inf of NaN */ return x+x; } else return __ieee754_logl(x)+ln2; /*...
false
false
false
false
false
0
snd_riptide_interrupt(int irq, void *dev_id) { struct snd_riptide *chip = dev_id; struct cmdif *cif = chip->cif; if (cif) { chip->received_irqs++; if (IS_EOBIRQ(cif->hwport) || IS_EOSIRQ(cif->hwport) || IS_EOCIRQ(cif->hwport)) { chip->handled_irqs++; tasklet_schedule(&chip->riptide_tq); } if (ch...
false
false
false
false
false
0
internalGetLocaleID(ULocDataLocaleType type, UErrorCode &errorCode) const { if(U_FAILURE(errorCode)) { return NULL; } const Locale *result; switch(type) { case ULOC_ACTUAL_LOCALE: result = actualLocaleIsSameAsValid ? &validLocale : &tailoring->actualLocale; break; case UL...
false
false
false
false
false
0
api_cede_notself (pTHX) { if (coro_nready) { struct coro_transfer_args ta; prepare_cede_notself (aTHX_ &ta); TRANSFER (ta, 1); return 1; } else return 0; }
false
false
false
false
false
0
OnProjectItemChange( ProjectListCtrlEvent& event ) { SetProjectURL( event.GetURL() ); SetProjectSupported( event.IsSupported() ); TransferDataToWindow(); }
false
false
false
false
false
0
DEH_GetCharFile(deh_context_t *context) { if (feof(context->stream)) { // end of file return -1; } return fgetc(context->stream); }
false
true
false
false
true
1
sync_loop(long videofd) { printf("sync_loop started on videofd %ld\n", videofd); fflush(stdout); //++MTY This applies only to peptidyl: static const double hz = 1596.027*1000*1000; W64 tprev = rdtsc(); for (;;) { struct video_event ev; if (ioctl(videofd, VIDEO_GET_EVENT, &ev) < 0) { fprintf(stderr, "ioct...
false
false
false
false
false
0
gf_odf_read_isom_iod(GF_BitStream *bs, GF_IsomInitialObjectDescriptor *iod, u32 DescSize) { u32 nbBytes = 0, tmpSize; u32 urlflag; GF_Err e; if (! iod) return GF_BAD_PARAM; iod->objectDescriptorID = gf_bs_read_int(bs, 10); urlflag = gf_bs_read_int(bs, 1); iod->inlineProfileFlag = gf_bs_read_int(bs, 1); /*reser...
false
true
false
false
true
1
CheckNonEqualsHelper(const char* file, int line, const char* unexpected_source, v8::Handle<v8::Value> unexpected, const char* value_source, v8::Handle<v8::Value> value) { if (unexpected->E...
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &mf) { if (!EnableLDV) return false; if (!mf.getFunction()->getSubprogram()) { removeDebugValues(mf); return false; } if (!pImpl) pImpl = new LDVImpl(this); return static_cast<LDVImpl*>(pImpl)->runOnMachineFunction(mf); }
false
false
false
false
false
0
slot_tp_descr_get(PyObject *self, PyObject *obj, PyObject *type) { PyTypeObject *tp = Py_TYPE(self); PyObject *get; static PyObject *get_str = NULL; if (get_str == NULL) { get_str = PyString_InternFromString("__get__"); if (get_str == NULL) return NULL; } get = _PyTy...
false
false
false
false
false
0
report_exit_status(int stat, const char *jobid) { int aborted, exited, signaled; int exit_status = 0; japi_wifaborted(&aborted, stat, NULL); if (aborted) { printf(MSG_QSUB_JOBNEVERRAN_S, jobid); } else { japi_wifexited(&exited, stat, NULL); if (exited) { japi_wexitstatus(&...
false
false
false
false
false
0
new_btr_user (basic_block bb, int insn_luid, rtx insn) { /* This instruction reads target registers. We need to decide whether we can replace all target register uses easily. */ rtx *usep = find_btr_use (PATTERN (insn)); rtx use; btr_user user = NULL; if (usep) { int unambiguous_singl...
false
false
false
false
false
0
se200pci_add_controls(struct snd_ice1712 *ice) { int i; struct snd_kcontrol_new cont; int err; memset(&cont, 0, sizeof(cont)); cont.iface = SNDRV_CTL_ELEM_IFACE_MIXER; for (i = 0; i < ARRAY_SIZE(se200pci_cont); i++) { cont.private_value = i; cont.name = se200pci_cont[i].name; cont.access = SNDRV_CTL_ELEM_A...
false
false
false
false
true
1
net4addr_seq_show(struct seq_file *s, void *v) { struct list_head *list = v; struct smk_net4addr *skp = list_entry_rcu(list, struct smk_net4addr, list); char *kp = SMACK_CIPSO_OPTION; if (skp->smk_label != NULL) kp = skp->smk_label->smk_known; seq_printf(s, "%pI4/%d %s\n", &skp->smk_host.s_addr, skp->smk_...
false
false
false
false
false
0
rb_ary_repeated_combination(VALUE ary, VALUE num) { long n, i, len; n = NUM2LONG(num); /* Combination size from argument */ RETURN_ENUMERATOR(ary, 1, &num); /* Return enumerator if no block */ len = RARRAY_LEN(ary); if (n < 0) { /* yield nothing */ } else if (n == 0) { r...
false
false
false
false
false
0
nextchunk(void) { int i; segment_t *cp; cp = NULL; for(i=0; i < nchunks; i++) { if (!CHUNK_IS_VALID(i) || !CHUNK_IS_LOAD(i)) continue; if (file_offset > chunks[i].offset) continue; if (cp == NULL || chunks[i].offset < cp->offset) cp = &chunks[i]; } cur_chunk = cp; }
false
false
false
false
false
0
get_block_dt_info(Block *bpt, const int entry, dt_kind kind) { List *dt_info_head; Entry_kind ek = {entry, kind}; Dt_info *dt_info; if (bpt == NULL || bpt->cmp_localize == NULL) return NULL; dt_info_head = bpt->cmp_localize->dt_info_head; dt_info = list_lookup(dt_info_head, cmp_dt_info_entry_...
false
false
false
false
false
0
hnj_hash_free (HashTab *hashtab) { int i; HashEntry *e, *next; for (i = 0; i < HASH_SIZE; i++) for (e = hashtab->entries[i]; e; e = next) { next = e->next; hnj_free (e->key); hnj_free (e); } hnj_free (hashtab); }
false
false
false
false
false
0
FuncIS_EQUAL_SET ( Obj self, Obj list1, Obj list2 ) { /* check the arguments, convert to sets if necessary */ while ( ! IS_SMALL_LIST(list1) ) { list1 = ErrorReturnObj( "IsEqualSet: <list1> must be a small list (no...
false
false
false
false
false
0