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
request_msix_queue_irqs(struct adapter *adap) { struct sge *s = &adap->sge; int err, ethqidx, ofldqidx = 0, rdmaqidx = 0, rdmaciqqidx = 0; int msi_index = 2; err = request_irq(adap->msix_info[1].vec, t4_sge_intr_msix, 0, adap->msix_info[1].desc, &s->fw_evtq); if (err) return err; for_each_ethrxq(s, ethqi...
false
false
false
false
false
0
indexOf(int *list, int target, int length) { for(int i = 0; i < length; i++) { if(list[i] == target) return i; } return -1; }
false
false
false
false
false
0
ipp_cache_load(ipp_cache_t *ic) { FILE *f; f = file_config_open_read(ic->name, &ic->fp, 1); if (f) { uint n; ipp_cache_clear(ic); ipp_cache_parse(ic, f); n = hash_list_length(ic->hosts); if (*ic->debug > 3) { g_debug("loaded %u items from the %s cache", n, ic->item_name); } fclose(f); } }
false
false
false
false
false
0
e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw) { s32 ret_val = 0; u16 phy_data; if (hw->mac.type != e1000_pchlan) return 0; /* Set MDIO slow mode before any other MDIO access */ if (hw->phy.type == e1000_phy_82577) { ret_val = e1000_set_mdio_slow_mode_hv(hw); if (ret_val) return ret_val; } if ...
false
false
false
false
false
0
click_install_file (PkPlugin *plugin, PkTransaction *transaction, const gchar *filename) { gboolean ret = FALSE; gchar **argv = NULL; gint i; gchar *username = NULL; gchar **envp = NULL; gchar *click_stderr = NULL; gint click_status; JsonParser *parser = NULL; JsonObject *manifest; gchar *pkid = NULL; ...
false
false
false
false
false
0
dump_alchemy(void) { recipelist *fl = formulalist; recipe *formula = NULL; linked_char *next; int num_ingred = 1; fprintf(logfile, "\n"); while (fl) { fprintf(logfile, "\n Formulae with %d ingredient%s %d Formulae with total_chance=%d\n", num_ingred, num_ingred > 1 ? "s." : ".", fl->nu...
true
true
true
false
false
1
debug_stage(const char *label, struct cache_entry *ce, struct unpack_trees_options *o) { printf("%s ", label); if (!ce) printf("(missing)\n"); else if (ce == o->df_conflict_entry) printf("(conflict)\n"); else printf("%06o #%d %s %.8s\n", ce->ce_mode, ce_stage(ce), ce->name, sha1_to_hex(ce...
false
false
false
false
false
0
main(int argc, char *argv[]) { char *pszSourceFile; char *pszDestFile; unsigned long nFileSize, nBaseAddress; FILE *pSourceFile, *pDestFile; IMAGE_FILE_HEADER *pFileHeader; IMAGE_SECTION_HEADER *pSectionHeader; unsigned int i; char *pData; PIMAGE_SYMBOL pSymbols; if ((argc != 4)...
false
false
false
false
true
1
End() { int frameSum = (int)mFrameSum; gPrefs->Write(wxT("/Validate/LevellerFrameSum"), frameSum); gPrefs->Flush(); }
false
false
false
false
false
0
intersect( const Range & range ) const { if (!isValid() || !range.isValid() || *this > range || *this < range) return invalid(); return Range(qMax(start(), range.start()), qMin(end(), range.end())); }
false
false
false
false
false
0
gp_track_extra_duplicate(ExtraTrackData *etr) { ExtraTrackData *etr_dup = NULL; if (etr) { etr_dup = g_new (ExtraTrackData, 1); memcpy(etr_dup, etr, sizeof(ExtraTrackData)); /* copy strings */ etr_dup->year_str = g_strdup(etr->year_str); etr_dup->pc_path_locale = g_strdu...
false
false
false
false
false
0
__e100_power_off(struct pci_dev *pdev, bool wake) { if (wake) return pci_prepare_to_sleep(pdev); pci_wake_from_d3(pdev, false); pci_set_power_state(pdev, PCI_D3hot); return 0; }
false
false
false
false
false
0
pretag_proc (const char *repository, const char *filter, void *closure) { char *newfilter = NULL; char *cmdline; const char *srepos = Short_Repository (repository); struct pretag_proc_data *ppd = closure; #ifdef SUPPORT_OLD_INFO_FMT_STRINGS if (!strchr (filter, '%')) { error (0,0, ...
false
true
false
false
false
1
Do_Wind (Object w) { Object oldenv, b, tmp; if (TYPE(w) == T_Vector) { /* fluid-let */ oldenv = The_Environment; Switch_Environment (VECTOR(w)->data[1]); b = Lookup_Symbol (VECTOR(w)->data[0], 0); if (Nullp (b)) Panic ("fluid-let"); tmp = VECTOR(w)->...
false
false
false
false
false
0
parse_char(struct re_parse *parse, int quoted, char *c) { if (!more(parse)) return false; if (quoted && *parse->rx == '\\') { parse->rx += 1; return next(parse, c); } else { return next(parse, c); } }
false
false
false
false
false
0
vbitset_and_cmp (bitset dst, bitset src1, bitset src2) { unsigned int i; int changed = 0; bitset_word *src1p; bitset_word *src2p; bitset_word *dstp; bitset_windex ssize1; bitset_windex ssize2; bitset_windex dsize; vbitset_resize (dst, max (BITSET_SIZE_ (src1), BITSET_SIZE_ (src2))); dsize = VBITSE...
false
false
false
false
false
0
Reverse(real lat0, real lon0, real x, real y, real& lat, real& lon, real& azi, real& rk) const throw() { real azi0 = atan2(x, y) / Math::degree<real>(), rho = Math::hypot(x, y), s = _a * atan(rho/_a); bool little = rho <= _a; if (!little) rho = 1/rho; ...
false
false
false
false
false
0
varsdb_final(void *key,void *data,va_list ap) { struct vars_info *v = (struct vars_info*)data; aFree( v->file ); aFree( v ); return 0; }
false
false
false
false
false
0
inf_text_remote_delete_operation_transform_overlap( InfTextDeleteOperation* operation, InfTextDeleteOperation* other, guint position, guint begin, guint other_begin, guint length) { InfTextRemoteDeleteOperationPrivate* priv; InfTextChunk* chunk; GObject* result; InfTextRemoteDeleteOperationPrivate* ...
false
false
false
false
false
0
clear_uchar_ctype (unsigned char *ctype, char const *chars, int type) { unsigned char *rct; unsigned char const *uc; rct = &ctype[1]; uc = (unsigned char const *) chars; while (*uc) rct[*uc++] &= ~type; }
false
false
false
false
false
0
checkout_conflict_detect_submodule(checkout_conflictdata *conflict) { conflict->submodule = ((conflict->ancestor && S_ISGITLINK(conflict->ancestor->mode)) || (conflict->ours && S_ISGITLINK(conflict->ours->mode)) || (conflict->theirs && S_ISGITLINK(conflict->theirs->mode))); return 0; }
false
false
false
false
false
0
static_pbc_y0 (int cell_x, int cell_y, int cell_z, double *position0, double radius0, int mark, int shell, double *borders, double *width, gamgi_voronoi *voronoi) { gamgi_slist *slist; double position1[3], shift[3]; double radius1, size; int n, n_x, n_y, n_z; int local, global; int index; int i, k; n = voronoi->n_cel...
false
false
false
false
false
0
http_process_reply(struct stream_t *stream,struct http_header_t *http_hdr) { int status_code = http_hdr->status_code; if(status_code < 0) { display(MSDL_ERR,"response HTTP header parse failed\n"); goto failed; } if(stream->dlopts->resume_download) { /* resume case */ if(status_code == 206) { /*...
false
false
false
false
false
0
do_numeric(char numeric[], struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { struct Client *target_p; struct Channel *chptr; if(parc < 2 || !IsServer(source_p)) return; /* Remap low number numerics. */ if(numeric[0] == '0') numeric[0] = '1'; /* * Prepare the parameter portion of...
false
false
false
false
false
0
parse_auth_choice(struct openconnect_info *vpninfo, xmlNode *xml_node, char *body, int bodylen, char **user_prompt, char **pass_prompt, int *is_securid) { char *form_name = (char *)xmlGetProp(xml_node, (unsigned char *)"name"); if (!form_name) { vpninfo->progress(vpninfo, PRG_ERR, "Form choice has ...
false
false
false
false
false
0
prev_line_id(LINE_ID *line_id, int n) { if (line_id->id3 != uid) return 0; int c = 0; FileOfs o = (uint64(line_id->id1) << 32) + line_id->id2; while (n--) { if (!o) break; if (line_length > o) { o = 0; } else { o -= line_length; } c++; } if (o < disp) { o = 0; } else { o = o - (o-disp)%line_l...
false
false
false
false
false
0
fileGetc (void) { int c; /* If there is an ungotten character, then return it. Don't do any * other processing on it, though, because we already did that the * first time it was read through fileGetc (). */ if (File.ungetch != '\0') { c = File.ungetch; File.ungetch = '\0'; return c; /* return here...
false
false
false
false
false
0
process() { int i; Firm *firmPtr; //----- each time process some firm only ------// for( i=1 ; i<=size() ; i++ ) { firmPtr = (Firm*) get_ptr(i); if( !firmPtr ) // the firm has been deleted continue; err_when(firmPtr->firm_recno!=i); //-------- system yield ---------// if( i%20==1 ) sys....
false
false
false
false
false
0
av_namespace_nth(struct namespace *ns, struct entry *parent, unsigned int n) { struct list_head *ptr; struct list_head *head; struct entry *ent = NULL; AV_LOCK(namespace_lock); head = subdir_head(ns, parent); for(ptr = head->next; ptr != head; ptr = ptr->next) { if(n == 0) { ent...
false
false
false
false
false
0
PatientSex_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { td->free_struct = asn_DEF_INTEGER.free_struct; td->print_struct = asn_DEF_INTEGER.print_struct; td->ber_decoder = asn_DEF_INTEGER.ber_decoder; td->der_encoder = asn_DEF_INTEGER.der_encoder; td->xer_decoder = asn_DEF_INTEGER.xer_decoder...
false
false
false
false
false
0
Scm_GetIntegerUClamp(ScmObj obj, int clamp, int *oor) { double v = 0.0; if (clamp == SCM_CLAMP_NONE && oor != NULL) *oor = FALSE; if (SCM_INTP(obj)) { if (SCM_INT_VALUE(obj) < 0) { if (clamp & SCM_CLAMP_LO) return 0; else goto err; } return SCM_INT_VALUE(obj)...
false
false
false
false
false
0
container_add() { /* add one line to the continer */ if (container_source) { string s=im->evaluate_nonterminal(container_source, false); if (!s.empty()) list_box->insertItem(s.c_str()); } else list_box->insertItem("NO_SOURCE"); }
false
false
false
false
false
0
contains(struct diff_filespec *one, const char *needle, unsigned long len, regex_t *regexp) { unsigned int cnt; unsigned long offset, sz; const char *data; if (diff_populate_filespec(one, 0)) return 0; if (!len) return 0; sz = one->size; data = one->data; cnt = 0; if (regexp) { regmatch...
false
false
false
false
false
0
TLB_invlpg(bx_address laddr) { invalidate_prefetch_q(); BX_DEBUG(("TLB_invlpg(0x"FMT_ADDRX"): invalidate TLB entry", laddr)); #if BX_CPU_LEVEL >= 5 bx_bool large = 0; if (BX_CPU_THIS_PTR TLB.split_large) { // make sure INVLPG handles correctly large pages for (unsigned n=0; n<BX_TLB_SIZE; n++) { ...
false
false
false
false
false
0
hb_font_get_glyph_extents_nil (hb_font_t *font, void *font_data HB_UNUSED, hb_codepoint_t glyph, hb_glyph_extents_t *extents, void *user_data HB_UNUSED) { if (font->parent) { hb_bool_t ret = font->parent->get_glyph_extents (glyph, extents); if (ret) { font->parent...
false
false
false
false
false
0
ship_on_way() { //### begin alex 6/10 ###// //FirmInfo *firmInfo = firm_res[FIRM_HARBOR]; //#### end alex 6/10 ####// if(cur_action==SPRITE_IDLE && journey_status!=SURROUND_FIRM) { if(!firm_array.is_deleted(stop_array[dest_stop_id-1].firm_recno)) { Firm *firmPtr = firm_array[stop_array[dest_stop_id-1].firm...
false
false
false
false
false
0
httpd_get_date( const char *str, time_t *date ) { char wday[8],month[8]; int mday, year, hour, minute, second; int i; struct tm t; if( sscanf( str, "%3s, %02d %3s %04d %02d:%02d:%02d GMT", wday, &mday, month, &year, &hour, &minute, &second )!=7 && sscanf( str, "%6s, %02d-%3s-%02d %02d:%02d:%02d GMT", wday, &...
false
false
false
false
false
0
btrfs_log_all_xattrs(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct inode *inode, struct btrfs_path *path, struct btrfs_path *dst_path) { int ret; struct btrfs_key key; const u64 ino = btrfs_ino(inode); int ins_nr = 0; int start_slot = 0; key.objectid = ino; key.type = BTRFS_X...
false
false
false
false
false
0
cpl_table_get_column_name(const cpl_table *table) { static const cpl_table *looking = NULL; static cpl_size width = 0; static cpl_size i = 0; if (table) { looking = table; width = cpl_table_get_ncol(table); i = 0; } else { if (looking) i...
false
false
false
false
false
0
make_startup_plugin_list_for_editing(World *world) { GSList *pluginitem; GtkTreeIter iter; pluginitem = world->startup_plugin_files; while (pluginitem) { gtk_list_store_append(GTK_LIST_STORE(world->startup_plugins), &iter); gtk_list_store_set(GTK_LIST_STORE(world->startup_plugins), &iter, ...
false
false
false
false
false
0
testb(const Operand& op, Register reg) { EnsureSpace ensure_space(this); last_pc_ = pc_; if (reg.code() > 3) { // Register is not one of al, bl, cl, dl. Its encoding needs REX. emit_rex_32(reg, op); } else { emit_optional_rex_32(reg, op); } emit(0x84); emit_operand(reg, op); }
false
false
false
false
false
0
createMode(int icharge, unsigned int imode_in, DecayPhaseSpaceModePtr mode, unsigned int iloc,unsigned int, DecayPhaseSpaceChannelPtr phase,Energy upp) { int imode = imode_in; // make sure the the decays are kinematically allowed Energy min = getParticleData(11+2*imode)->mass()+ge...
false
false
false
false
false
0
GetOverrideSearchPath(MemoryContext context) { OverrideSearchPath *result; List *schemas; MemoryContext oldcxt; recomputeNamespacePath(); oldcxt = MemoryContextSwitchTo(context); result = (OverrideSearchPath *) palloc0(sizeof(OverrideSearchPath)); schemas = list_copy(activeSearchPath); while (schemas && l...
false
false
false
false
false
0
kmo_free_unused_ifus(cpl_array **unused) { KMO_TRY { KMO_TRY_ASSURE(unused != NULL, CPL_ERROR_NULL_INPUT, "Not all input data is provided!"); int i = 0; for (i = 0; i < KMOS_NR_DETECTORS; i++) { cpl_array_delete(unused[i]); unused...
false
false
false
false
false
0
crmf_template_add_validity (PLArenaPool *poolp, CRMFOptionalValidity **dest, CRMFValidityCreationInfo *info) { SECStatus rv; void *mark; CRMFOptionalValidity *myValidity; /*First off, let's make sure at least one of the two fields is present*/ if (!info || (!inf...
false
false
false
false
false
0
gst_mxf_mux_write_header_metadata (GstMXFMux * mux) { GstFlowReturn ret = GST_FLOW_OK; GstBuffer *buf; GList *buffers = NULL; GList *l; MXFMetadataBase *m; guint64 header_byte_count = 0; for (l = mux->metadata_list; l; l = l->next) { m = l->data; buf = mxf_metadata_base_to_buffer (m, &mux->primer...
false
false
false
false
false
0
OnExit(wxCommandEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnExit - Function Begin")); if (wxGetApp().ConfirmExit()) { wxFileSystemHandler *internetFSHandler = wxGetApp().GetInternetFSHandler(); if (internetFSHandler) { ((CBOINCInternetFSHandler*)inter...
false
false
false
false
false
0
SHA1_copy(SHA1object *self, PyObject *unused) { SHA1object *newobj; if ((newobj = newSHA1object()) == NULL) return NULL; newobj->hash_state = self->hash_state; return (PyObject *)newobj; }
false
false
false
false
false
0
dln2_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); int ret; ret = dln2_gpio_pin_set_out_val(dln2, offset, value); if (ret < 0) return ret; return dln2_gpio_set_direction(chip, offset, DLN2_GPIO_DIRECTIO...
false
false
false
false
false
0
ges_timeline_element_set_start (GESTimelineElement * self, GstClockTime start) { GESTimelineElementClass *klass; GESTimelineElement *toplevel_container; g_return_if_fail (GES_IS_TIMELINE_ELEMENT (self)); klass = GES_TIMELINE_ELEMENT_GET_CLASS (self); GST_DEBUG_OBJECT (self, "current start: %" GST_TIME_FORM...
false
false
false
true
false
1
DisponiPortiere(team_t *s, int sector, BOOL possesso) { s->keepers.world_x = portieri[(int)s->keepers.SNum][possesso][sector].x; s->keepers.world_y = portieri[(int)s->keepers.SNum][possesso][sector].y; if(sector == GOALKICK) { if(possesso) { if(pl->world_y > CENTROCAMPO_Y) ...
false
false
false
false
false
0
headers_send(int fd, rr_data_t data) { hlist_t t; char *buf; int i, len; /* * First compute required buffer size (avoid realloc, etc) */ if (data->req) len = 20 + strlen(data->method) + strlen(data->url) + strlen(data->http); else len = 20 + strlen(data->http) + strlen(data->msg); t = data->headers; w...
false
true
false
false
false
1
e_mail_store_go_online_sync (CamelStore *store, GCancellable *cancellable, GError **error) { CamelService *service; const gchar *display_name; gboolean success = TRUE; g_return_val_if_fail (CAMEL_IS_STORE (store), FALSE); service = CAMEL_SERVICE (store); ...
false
false
false
false
false
0
unity_webapps_context_raise (UnityWebappsContext *context) { g_return_if_fail (context != NULL); g_return_if_fail (UNITY_WEBAPPS_IS_CONTEXT (context)); if (context->priv->remote_ready == FALSE) return; unity_webapps_gen_context_call_raise (context->priv->context_proxy, ...
false
false
false
false
false
0
expandPostRAPseudo(MachineBasicBlock::iterator MI) const { MachineBasicBlock &MBB = *MI->getParent(); bool isMicroMips = Subtarget.inMicroMipsMode(); unsigned Opc; switch(MI->getDesc().getOpcode()) { default: return false; case Mips::RetRA: expandRetRA(MBB, MI); break; case Mips::ERet: ex...
false
false
false
false
false
0
dst_error_recovery(struct dst_state *state) { dprintk(verbose, DST_NOTICE, 1, "Trying to return from previous errors."); dst_pio_disable(state); msleep(10); dst_pio_enable(state); msleep(10); return 0; }
false
false
false
false
false
0
Cddb_Get_Pixbuf_From_Server_Name (const gchar *server_name) { g_return_val_if_fail (server_name != NULL, NULL); if (strstr (server_name, "freedb.org")) return gdk_pixbuf_new_from_xpm_data(freedb_xpm); else if (strstr(server_name,"gnudb.org")) return gdk_pixbuf_new_from_xpm_data(gnudb_xpm); ...
false
false
false
false
false
0
nfsd_reply_cache_shutdown(void) { struct svc_cacherep *rp; unsigned int i; unregister_shrinker(&nfsd_reply_cache_shrinker); for (i = 0; i < drc_hashsize; i++) { struct list_head *head = &drc_hashtbl[i].lru_head; while (!list_empty(head)) { rp = list_first_entry(head, struct svc_cacherep, c_lru); nfsd_re...
false
false
false
false
false
0
fun_fields () { char const *str = stringStr(top()); char const *sep = stringStr(top() - 1); reg = *listConstructor(); if (*str) { char *string = xstrdup(str); char *cp; if (*sep) { if ((cp = strtok(string, sep))) { do ...
false
false
false
false
false
0
_createTempFramebuffer(GLuint fmt, GLuint &fb, GLuint &tid) { // NB we bypass state cache, this method is only called on startup and not after // GLStateCacheManager::initializeCache glGenFramebuffersEXT(1, &fb); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb); if (fmt != GL_NO...
false
false
false
false
false
0
esl_regexp_Match(ESL_REGEXP *machine, const char *pattern, const char *s) { if (machine->ndfa != NULL) { free(machine->ndfa); machine->ndfa = NULL; } if ((machine->ndfa = regcomp(pattern)) == NULL) return eslEINVAL; return regexec(machine->ndfa, s); }
false
false
false
false
false
0
tag_list_cb(const char *tag_name, void *payload) { tag_filter_data *filter; if (git__prefixcmp(tag_name, GIT_REFS_TAGS_DIR) != 0) return 0; filter = (tag_filter_data *)payload; if (!*filter->pattern || p_fnmatch(filter->pattern, tag_name + GIT_REFS_TAGS_DIR_LEN, 0) == 0) return git_vector_insert(filter->tagli...
false
false
false
false
false
0
gc_countdown(state_t *s) { if (s->gc_countdown-- <= 0) { s->gc_countdown = script_gc_interval; run_gc(s); } }
false
false
false
false
false
0
pat_ref_find_elt(struct pat_ref *ref, const char *key) { struct pat_ref_elt *elt; list_for_each_entry(elt, &ref->head, list) { if (strcmp(key, elt->pattern) == 0) return elt; } return NULL; }
false
false
false
false
false
0
slotNSLoad() { kDebug(7043)<<"**** slotNSLoad ****"<<m_type<<" "<<m_location; // only fill menu once parentMenu()->disconnect(SIGNAL(aboutToShow())); // not NSImporter, but kept old name for BC reasons KBookmarkMenuImporter importer( manager(), this ); importer.openBookmarks(m_location, m_type); }
false
false
false
false
false
0
s_netattrib_connected_string_get_pinnum (const gchar *str) { int prefix_len = (sizeof PIN_NET_PREFIX) - 1; if (strncmp (str, PIN_NET_PREFIX, prefix_len) != 0) { return NULL; } return str + prefix_len; }
false
false
false
false
false
0
touchpad_has_single_button (XDevice *device) { Atom type, prop; int format; unsigned long nitems, bytes_after; unsigned char *data; gboolean is_single_button = FALSE; int rc; prop = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "Synaptics Capabi...
false
false
false
false
false
0
read_string(vtk3DSImporter *importer) { static char string[80]; int i; for (i = 0; i < 80; i++) { string[i] = read_byte(importer); if (string[i] == '\0') { break; } } return string; }
false
false
false
false
false
0
quote_cmd_argument(gchar * result, guint size, const gchar * path) { const gchar * p; gchar * result_p; guint remaining; result_p = result; remaining = size; for(p = path ; * p != '\0' ; p ++) { if (isalnum((guchar)*p) || (* p == '/')) { if (remaining > 0) { * result_p = * p; result_p ++; r...
false
false
false
false
true
1
restore_online_page_callback(online_page_callback_t callback) { int rc = -EINVAL; get_online_mems(); mutex_lock(&online_page_callback_lock); if (online_page_callback == callback) { online_page_callback = generic_online_page; rc = 0; } mutex_unlock(&online_page_callback_lock); put_online_mems(); return r...
false
false
false
false
false
0
putGamessLocalizedInfoInTextEditor() { if(strcmp(selectedLocalized,"NONE")==0)return; gabedit_text_insert (GABEDIT_TEXT(text), NULL, NULL, NULL, " ",-1); gabedit_text_insert (GABEDIT_TEXT(text), NULL, &gamessColorFore.keyWord, &gamessColorBack.keyWord, "$CONTRL",-1); gabedit_text_insert (GABEDI...
false
false
false
false
false
0
Add(const CUInt128 &value) throw() { if (value.IsZero()) return *this; int64_t sum = 0; for (int i = 3; i >= 0; i--) { sum += m_data[i]; sum += value.m_data[i]; m_data[i] = (uint32_t)sum; sum >>= 32; } return *this; }
false
false
false
false
false
0
set_dword(_u32 position, _u32 val) { _u32 f, roff; if (!cur_fuzzable) return; position %= cur_fuzzable; f = lookup_file(position, 1, &roff); load_data(f); infile[f].dirty = 1; if (roff + 3 < infile[f].cur_len) *(_u32*)(infile[f].data + roff) = val; else { /* Assume LE - we're IA32 spec...
false
false
false
false
false
0
OnButtonReleased (G_GNUC_UNUSED gccv::ItemClient *client, unsigned button, double x, double y, unsigned state) { Application *App = m_pDoc->GetApplication (); Tool* pActiveTool = App? App->GetActiveTool (): NULL; if ((!m_pDoc->GetEditable ()) || (!pActiveTool)) return true; switch (button) { case 1: if (!m_Dra...
false
false
false
false
false
0
IPrcWrite(pfPrcHelper* prc) { pfGUIControlMod::IPrcWrite(prc); prc->writeSimpleTag("TextMaps"); for (size_t i=0; i<fTextMaps.getSize(); i++) fTextMaps[i]->prcWrite(prc); prc->closeTag(); prc->writeSimpleTag("Layers"); for (size_t i=0; i<fLayers.getSize(); i++) fLayers[i]->prcWr...
false
false
false
false
false
0
selinux_xfrm_skb_sid(struct sk_buff *skb, u32 *sid) { int rc; rc = selinux_xfrm_skb_sid_ingress(skb, sid, 0); if (rc == 0 && *sid == SECSID_NULL) *sid = selinux_xfrm_skb_sid_egress(skb); return rc; }
false
false
false
false
false
0
hsocket_nsend(hsocket_t * sock, const byte_t * bytes, int n) { herror_t status; size_t total = 0; size_t size; log_verbose2("Starting to send on sock=%p", &sock); if (sock->sock < 0) return herror_new("hsocket_nsend", HSOCKET_ERROR_NOT_INITIALIZED, "hsocket not initialized"); /* ...
false
false
false
false
false
0
unpackStoreToAggregate(InstCombiner &IC, StoreInst &SI) { // FIXME: We could probably with some care handle both volatile and atomic // stores here but it isn't clear that this is important. if (!SI.isSimple()) return false; Value *V = SI.getValueOperand(); Type *T = V->getType(); if (!T->isAggregateT...
false
false
false
false
false
0
Expand(int &line, bool doExpand, bool force, int visLevels, int level) { int lineMaxSubord = SendEditor(SCI_GETLASTCHILD, line, level); line++; while (line <= lineMaxSubord) { if (force) { if (visLevels > 0) SendEditor(SCI_SHOWLINES, line, line); else SendEditor(SCI_HIDELINES, line, line); } else {...
false
false
false
false
false
0
free_page_list(struct list_head *pages) { struct page *p, *n; list_for_each_entry_safe(p, n, pages, lru) __free_page(p); INIT_LIST_HEAD(pages); }
false
false
false
false
false
0
stop_message(GtkWidget * widget, gpointer * data) { /* stop transmissions */ stop_tx(); /* hide time left indications */ gtk_widget_hide(time_left_desc_la); gtk_widget_hide(time_left_la); /* enable editing of entry text */ gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE); /* enable start and disable...
false
false
false
false
false
0
FSBlockCounts( // Returns WERR_OK currently. BTSK * pStack, // [in] - be careful not to change // anything in this structure. FLMUINT uiFirstElement, // [in] start at this element FLMUINT uiLastElement, // [in] Do not include reference counts // from this element. FLMUINT * p...
false
false
false
false
false
0
status_store(struct device *device, struct device_attribute *attr, const char *buf, size_t count) { struct drm_connector *connector = to_drm_connector(device); struct drm_device *dev = connector->dev; enum drm_connector_status old_status; int ret; ret = mutex_lock_interruptible(&dev->mode_config.mutex...
false
false
false
false
false
0
cb_gnm_option_group_post_parse (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error) { if (param_show_version) { g_print (_("gnumeric version '%s'\ndatadir := '%s'\nlibdir := '%s'\n"), GNM_VERSION_FULL, gnm_sys_data_dir (), gnm_sys_lib_dir ()); exit (0); } ...
false
false
false
false
false
0
writepage_nounlock(struct page *page, struct writeback_control *wbc) { struct inode *inode; struct ceph_inode_info *ci; struct ceph_fs_client *fsc; struct ceph_osd_client *osdc; struct ceph_snap_context *snapc, *oldest; loff_t page_off = page_offset(page); loff_t snap_size = -1; long writeback_stat; u64 trunca...
false
false
false
false
false
0
jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset) { opj_jp2_box_t box; opj_common_ptr cinfo = jp2->cinfo; if( jp2_read_boxhdr(cinfo, cio, &box) == OPJ_FALSE ) { opj_event_msg(cinfo, EVT_ERROR, "Failed to read boxhdr\n"); return OPJ_FALS...
false
false
false
false
false
0
child_watch_func(GPid pid, gint status, gpointer data) { struct _PyGChildData *child_data = (struct _PyGChildData *) data; PyObject *retval; PyGILState_STATE gil; gil = pyg_gil_state_ensure(); if (child_data->data) retval = PyObject_CallFunction(child_data->func, "iiO", pid, status, ...
false
false
false
false
false
0
pixGetAverageMaskedRGB(PIX *pixs, PIX *pixm, l_int32 x, l_int32 y, l_int32 factor, l_int32 type, l_float32 *prval, l_float32 *p...
false
false
false
false
false
0
populate_tree(P_Styles *page) { if(page->si != NULL) { page->store = stl_styleinfo_build_partial(page->si, NULL); /* Block expand/collapse signals. */ g_signal_handler_block(page->tree, page->sig_collapse); g_signal_handler_block(page->tree, page->sig_expand); gtk_tree_view_set_model(GTK_TREE_VIEW(page->tre...
false
false
false
false
false
0
_CustomWriteFunc(ArchiveHandle *AH, const char *buf, size_t len) { /* never write 0-byte blocks (this should not happen) */ if (len == 0) return 0; WriteInt(AH, len); return _WriteBuf(AH, buf, len); }
false
false
false
false
false
0
episodeActionsInCascadeRequestError( QNetworkReply::NetworkError error ) { DEBUG_BLOCK QTimer::singleShot( 10000, this, SLOT(requestEpisodeActionsInCascade()) ); //If we fail to get EpisodeActions for this channel then we must put it //at the end of the list. In order to be synced later on. m_chann...
false
false
false
false
false
0
add(const QString& word) { QStringList words = personal(); if (words.contains(SmartQuotes::revert(word))) { return; } words.append(word); setPersonal(words); }
false
false
false
false
false
0
G__file_name(char *path, const char *element, const char *name, const char *mapset) { char xname[GNAME_MAX]; char xmapset[GMAPSET_MAX]; const char *pname = name; char *location = G__location_path(); /* * if a name is given, build a file name * must split the name into name, mapset if...
false
false
false
false
false
0
createPic(const BuildingType& bt, ASCString filePath) { Surface s = Surface::createSurface( 600, 600, 32, 0xf8f4f0 ); int x=0; int y=0; bt.paint( s, SPoint(x,y)); int xsize = 300; int ysize = 200; convert(constructImgFileName(bt), s, filePath, xsize, ysize); return (constructImgPath(bt, RELATIVEIMGPA...
false
false
false
false
false
0
item_border(double len) { m_item_bord = Black(); m_item_bord_width = len; return *this; }
false
false
false
false
false
0
reg_w(struct gspca_dev *gspca_dev, int len) { int alen, ret; if (gspca_dev->usb_err < 0) return; ret = usb_bulk_msg(gspca_dev->dev, usb_sndbulkpipe(gspca_dev->dev, 4), gspca_dev->usb_buf, len, &alen, 500); /* timeout in milliseconds */ if (ret < 0) { pr_err("reg write [%02x] error %d\n", ...
false
false
false
false
false
0
lpfc_matchdid(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, uint32_t did) { D_ID mydid, ndlpdid, matchdid; if (did == Bcast_DID) return 0; /* First check for Direct match */ if (ndlp->nlp_DID == did) return 1; /* Next check for area/domain identically equals 0 match */ mydid.un.word = vport-...
false
false
false
false
false
0
set_format_film(GtkComboBox *combobox, gpointer d) { GtkTreeIter iter; gchar* data = NULL; if (gtk_combo_box_get_active_iter (combobox, &iter)) { GtkTreeModel* model = gtk_combo_box_get_model(combobox); gtk_tree_model_get (model, &iter, 0, &data, -1); } if(!data) return; sprintf(formatFilm ,"%s",(gchar*)data...
false
true
false
false
false
1
xaccTransGetAccountConvRate(const Transaction *txn, const Account *acc) { gnc_numeric amount, value, convrate; GList *splits; Split *s; gboolean found_acc_match = FALSE; gnc_commodity *acc_commod = xaccAccountGetCommodity(acc); /* We need to compute the conversion rate into _this account_. So,...
false
false
false
false
false
0
hexToDigit(unsigned int * val, const unsigned char * hex) { unsigned int i; for (i=0;i<4;i++) { unsigned char c = hex[i]; if (c >= 'A') c = (c & ~0x20) - 7; c -= '0'; assert(!(c & 0xF0)); *val = (*val << 4) | c; } }
false
false
false
false
false
0