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
QRinput_setErrorCorrectionLevel(QRinput *input, QRecLevel level) { if(input->mqr || level > QR_ECLEVEL_H) { errno = EINVAL; return -1; } input->level = level; return 0; }
false
false
false
false
false
0
shu_unitfile_traverse_inner_keys(lua_State *L, GtShuUnitFileInfo *unit_info, bool *file_set, GtStr *mapping_filename, unsigned long genome_idx, ...
false
false
false
false
false
0
gt_ggc_mx_rtvec_def (void *x_p) { struct rtvec_def * const x = (struct rtvec_def *)x_p; if (ggc_test_and_set_mark (x)) { { size_t l0 = (size_t)(((*x)).num_elem); { size_t i0; for (i0 = 0; i0 != l0; i0++) { gt_ggc_m_7rtx_def ((*x).elem[i0]); } ...
false
false
false
false
true
1
get_Pickler(PyObject *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = {"file", "protocol", NULL}; PyObject *file = NULL; int proto = 0; /* XXX * The documented signature is Pickler(file, protocol=0), but this * accepts Pickler() and Pickler(integer) too. The meaning then ...
false
false
false
false
false
0
plpgsql_validator(PG_FUNCTION_ARGS) { Oid funcoid = PG_GETARG_OID(0); HeapTuple tuple; Form_pg_proc proc; char functyptype; int numargs; Oid *argtypes; char **argnames; char *argmodes; bool istrigger = false; int i; /* Get the new function's pg_proc entry */ tuple = SearchSysCache(PROCOID,...
false
false
false
true
false
1
ToggleBook_Mark(EditorBase* eb) // ---------------------------------------------------------------------------- { // Stow a Book mark by EditorBase current line // Note: the book mark has not been cleared/set by scintilla yet cbEditor* cbed = Manager::Get()->GetEditorManager()->GetBuiltinEditor(eb); if...
false
false
false
false
false
0
runOnBasicBlock(BasicBlock &BB) override { for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I) if (CallInst *CI = dyn_cast<CallInst>(I)) { if (!CI->use_empty()) CI->replaceAllUsesWith(Constant::getNullValue(CI->getType())); CI->getParent()->getInstList().er...
false
false
false
false
false
0
count_members() { size_t ret = 0; for (Archive::const_iterator p = this->begin(); p != this->end(); ++p) ++ret; return ret; }
false
false
false
false
false
0
list_append(llist *l, lnode *node) { lnode* newnode; newnode = malloc(sizeof(lnode)); if (node->message) newnode->message = node->message; else newnode->message = NULL; newnode->type = node->type; newnode->a0 = node->a0; newnode->item = l->cnt; newnode->next = NULL; // if we are at top, fix this up i...
false
false
false
false
false
0
opj_decode_tile_data( opj_codec_t *p_codec, OPJ_UINT32 p_tile_index, OPJ_BYTE * p_data, OPJ_UINT32 p_data_size, opj_stream_t *p_stream ) { if (p_codec && p_data && p_stream) { opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; opj_stream_private_...
false
false
false
false
false
0
gui_add_deploy_units( SDL_Surface *contents ) { int i; Unit *unit; int deploy_border = 10; int sx = deploy_border, sy = deploy_border; SDL_FillRect( contents, 0, 0x0 ); for ( i = 0; i < deploy_show_count; i++ ) { unit = list_get( left_deploy_units, deploy_offset + i ); if ( unit ...
false
false
false
false
false
0
cpuidle_not_available(struct cpuidle_driver *drv, struct cpuidle_device *dev) { return off || !initialized || !drv || !dev || !dev->enabled; }
false
false
false
false
false
0
garcon_menu_monitor_files (GarconMenu *menu, GList *files, gpointer callback) { GFileMonitor *monitor; GList *lp; g_return_if_fail (GARCON_IS_MENU (menu)); g_return_if_fail (menu->priv->parent == NULL); /* Monitor all files from the list *...
false
false
false
false
false
0
altera_read_packed(u8 *buffer, u32 bits, u32 *bits_avail, u32 *in_index) { u32 result = 0; u32 shift = 0; u32 databyte = 0; while (bits > 0) { databyte = buffer[*in_index]; result |= (((databyte >> (CHAR_BITS - *bits_avail)) & (0xff >> (CHAR_BITS - *bits_avail))) << shift); if (bits <= *bits_avail...
false
false
false
false
false
0
get_entry_for_path(struct cm_context *ctx, const char *path) { int initial; if (path != NULL) { initial = strlen(CM_DBUS_REQUEST_PATH); if (strncmp(path, CM_DBUS_REQUEST_PATH, initial) == 0) { if (path[initial] == '/') { return cm_get_entry_by_busname(ctx, path + initial + ...
false
false
false
false
false
0
ath10k_wmi_fw_vdev_stats_fill(const struct ath10k_fw_stats_vdev *vdev, char *buf, u32 *length) { u32 len = *length; u32 buf_len = ATH10K_FW_STATS_BUF_SIZE; int i; len += scnprintf(buf + len, buf_len - len, "%30s %u\n", "vdev id", vdev->vdev_id); len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ...
false
false
false
false
false
0
gui_entry_redraw_from(GUI_ENTRY_REC *entry, int pos) { pos -= entry->scrstart; if (pos < 0) pos = 0; if (entry->redraw_needed_from == -1 || entry->redraw_needed_from > pos) entry->redraw_needed_from = pos; }
false
false
false
false
false
0
settings_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter) { SettingsModel * self; gboolean result = FALSE; GtkTreeIter _tmp0_; Directory* _tmp1_ = NULL; Directory* _tmp2_; GList* _tmp3_; GList* _tmp4_; guint _tmp5_ = 0U; gboolean _tmp6_; self = (SettingsModel*) base; g_return_val_if_fail (it...
false
false
false
false
false
0
_ibox_cb_event_desk_show(void *data __UNUSED__, int type __UNUSED__, void *event) { E_Event_Desk_Show *ev; IBox *b; Eina_List *ibox; ev = event; /* delete all wins from ibox and add only for current desk */ ibox = _ibox_zone_find(ev->desk->zone); EINA_LIST_FREE(ibox, b) { if (b->inst-...
false
false
false
false
false
0
ospf6_print(register const u_char *bp, register u_int length) { register const struct ospf6hdr *op; register const u_char *dataend; register const char *cp; op = (struct ospf6hdr *)bp; /* If the type is valid translate it, or just print the type */ /* value. If it's not valid, say so and return */ TCHECK(op->...
false
false
false
false
false
0
DES_set_odd_parity(DES_cblock *key) { unsigned int i; for (i=0; i<DES_KEY_SZ; i++) (*key)[i]=odd_parity[(*key)[i]]; }
false
false
false
false
false
0
e_zone_edges_desk_flip_capable(E_Zone *zone, Eina_Bool l, Eina_Bool r, Eina_Bool t, Eina_Bool b) { #define NEED_FLIP_EDGE(x) \ (e_bindings_edge_flippable_get(x) || e_bindings_edge_non_flippable_get(x)) #define NEED_EDGE(x) \ (e_bindings_edge_non_flippable_get(x)) #define CHECK_EDGE(v, ed, win) \ do { \ i...
false
false
false
false
false
0
snd_complete_urb(struct urb *urb) { struct snd_urb_ctx *ctx = urb->context; struct snd_usb_endpoint *ep = ctx->ep; struct snd_pcm_substream *substream; unsigned long flags; int err; if (unlikely(urb->status == -ENOENT || /* unlinked */ urb->status == -ENODEV || /* device removed */ urb->status ==...
false
false
false
false
false
0
log_reopen_if_managed(enum log_file which) { log_file_check(which); if (NULL == logfile[which].path) return TRUE; /* Unmanaged logfile */ return log_reopen(which); }
false
false
false
false
false
0
MV_KillAllVoices ( void ) { VoiceNode * voice, * next; int flags; if ( !MV_Installed ) { MV_SetErrorCode( MV_NotInstalled ); return( MV_Error ); } flags = DisableInterrupts(); // Remove all the voices from the list for( voice = VoiceList.next; voic...
false
false
false
false
false
0
decode_tag(AVCodecContext * avctx, void *data, int *data_size, const uint8_t * buf, int buf_size) { NellyMoserDecodeContext *s = avctx->priv_data; int data_max = *data_size; int blocks, i; int16_t* samples; *data_size = 0; samples = (int16_t*)data; ...
false
false
false
false
false
0
EmitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI) { if (!TLI->has(LibFunc::memcpy_chk)) return nullptr; Module *M = B.GetInsertBlock()->getParent()->getParent(); Attribute...
false
false
false
false
false
0
close_file() { size = sizeof(SP16) * speechlen; if (use_raw) { if (fd >= 0) { if (close(fd) != 0) { perror("adinrec"); } } } else { if (fp != NULL) { if (wrwav_close(fp) == FALSE) { fprintf(stderr, "adinrec: failed to close file\n"); } } } fprintf(stderr, "\n%d sample...
false
false
false
false
false
0
dw2_output_indirect_constant_1 (splay_tree_node node, void *data ATTRIBUTE_UNUSED) { const char *sym; rtx sym_ref; sym = (const char *) node->key; sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym); if (USE_LINKONCE_INDIRECT) fprintf (asm_out_file, "\t.hidden %sDW.ref.%s\n", user_label_prefix, sym); assembl...
false
false
false
false
false
0
bswap32(unsigned int num) { if (!isbigendian()) { return ( (((num) << 24)) | (((num) << 8) & 0x00FF0000) | (((num) >> 8) & 0x0000FF00) | (((num) >> 24)) ); } return num; }
false
false
false
false
false
0
fiji_update_hdp_medium_grain_clock_gating(struct amdgpu_device *adev, bool enable) { uint32_t temp, data; temp = data = RREG32(mmHDP_HOST_PATH_CNTL); if (enable) data &= ~HDP_HOST_PATH_CNTL__CLOCK_GATING_DIS_MASK; else data |= HDP_HOST_PATH_CNTL__CLOCK_GATING_DIS_MASK; if (temp != data) WREG32(mmHDP_HOS...
false
false
false
false
false
0
prep() const { if (_prepped) return; _prepped = true; parseIfNeeded(); if (_parseTree && !_parseTree->prep(wantVec())) { // build line lookup table // contains position of last char in line, from the very beginning std::vector<int> lines; const char* start=_expression.c_s...
false
false
false
false
false
0
pdf_debug_ps_stack(ps_stack *st) { int i; printf("stack: "); for (i = 0; i < st->sp; i++) { switch (st->stack[i].type) { case PS_BOOL: if (st->stack[i].u.b) printf("true "); else printf("false "); break; case PS_INT: printf("%d ", st->stack[i].u.i); break; case PS_REAL: print...
false
false
false
false
false
0
gdt_index_get(gdt_index *g, int index) { if (index < 0 || index >= g->length) return NULL; return g->names->data + g->index[index]; }
false
false
false
false
false
0
status( const char * status, const char * args ) { m_status.push_back( std::pair<std::string,std::string>( status, args ) ); return Error(); }
false
false
false
false
false
0
do_speech_output(char * str) { FILE * f; if (speech_device_is_accessible(get_speech_device())) { f = fopen(get_speech_device(),"a"); if (f!=NULL) { fprintf(f,"%s\n",str); fclose(f); } } }
false
false
false
false
false
0
cv_resize_move ( gdouble x, gdouble y) { if( b_rz_init ) { b_resize = TRUE; x_res = cv->widget->allocation.width + (gint)x; y_res = cv->widget->allocation.height + (gint)y; x_res = (x_res<1)?1:x_res; y_res = (y_res<1)?1:y_res; gtk_widget_queue_draw (cv_ev_box); } }
false
false
false
false
false
0
context_free (struct ico_progressive_state *context) { g_free (context->LineBuf); context->LineBuf = NULL; g_free (context->HeaderBuf); g_list_free_full (context->entries, g_free); if (context->pixbuf) g_object_unref (context->pixbuf); g_free (context); }
false
false
false
false
false
0
json_deep_copy(const json_t *json) { if(!json) return NULL; if(json_is_object(json)) return json_object_deep_copy(json); if(json_is_array(json)) return json_array_deep_copy(json); /* for the rest of the types, deep copying doesn't differ from shallow copying */ if(...
false
false
false
false
false
0
mca_coll_self_gatherv_intra(void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t ...
false
false
false
false
false
0
lab_sort(lua_State *L) { THTensor *t = luaT_checkudata(L, 1, torch_Tensor_id); int dimension = luaL_optint(L, 2, 1)-1; int descendingOrder = luaT_optboolean(L, 3, 0); THTensor *rt; THTensor *ri; longdouble *tidata; longdouble **tidatap; long i; luaL_argcheck(L, dimension >= 0 && dimension < t->nDimen...
false
false
false
false
false
0
WriteEEProm(struct i2c_adapter *adapter, u16 Tag, u32 Length, u8 *data) { int status = 0; u16 Addr = MICNG_EE_START; u8 EETag[3]; u16 tag = 0; int retry, i; while (Addr + sizeof(u16) + 1 < MICNG_EE_END) { if (i2c_read_eeprom(adapter, 0x50, Addr, EETag, sizeof(EETag))) return -1; tag = (EETag[0] <...
false
false
false
false
false
0
get_fixed_custom_param(gchar *param) { gchar *parameters = NULL; /* some function came with a trailing ')' we must remove it */ gchar *par = param; if (g_str_has_suffix(param, ")")) { gint len = strlen(param) - 1; if (len != 0) { parameters = g_malloc0(len); strncpy(parameters, param, len); ...
false
false
false
false
false
0
ShutdownSQLFunction(Datum arg) { SQLFunctionCachePtr fcache = (SQLFunctionCachePtr) DatumGetPointer(arg); execution_state *es; ListCell *lc; foreach(lc, fcache->func_state) { es = (execution_state *) lfirst(lc); while (es) { /* Shut down anything still running */ if (es->status == F_EXEC_RUN) { ...
false
false
false
false
false
0
getLSDAEncoding() const { CodeModel::Model Model = TM.getCodeModel(); if (TM.getRelocationModel() == Reloc::PIC_) return DW_EH_PE_pcrel | (Model == CodeModel::Small ? DW_EH_PE_sdata4 : DW_EH_PE_sdata8); if (Model == CodeModel::Small) return DW_EH_PE_udata4; return DW_EH_PE...
false
false
false
false
false
0
picture_change_filename_dialog (GSCHEM_TOPLEVEL *w_current) { TOPLEVEL *toplevel = w_current->toplevel; gchar *filename; gboolean result; GError *error = NULL; w_current->pfswindow = gtk_file_chooser_dialog_new ("Select a picture file...", GTK_WINDOW(w_current->main_window), GTK_FIL...
false
false
false
false
false
0
generatePreview(Poppler::Document *tikzPdfDoc, qreal zoomFactor, int currentPage) { QMutexLocker locker(&m_mutex); m_tikzPdfDoc = tikzPdfDoc; m_zoomFactor = zoomFactor; m_currentPage = currentPage; if (!isRunning()) { start(LowPriority); } else { // m_restart = true; // m_condition.wakeOne(); m_abort ...
false
false
false
false
false
0
m5mols_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_format *fmt) { struct m5mols_info *info = to_m5mols(sd); struct v4l2_mbus_framefmt *format = &fmt->format; struct v4l2_mbus_framefmt *sfmt; enum m5mols_restype type; u32 resolution = 0; int ret; ret = __find_resol...
false
false
false
false
false
0
cfg_print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj) { const cfg_list_t *list = &obj->value.list; const cfg_listelt_t *elt; for (elt = ISC_LIST_HEAD(*list); elt != NULL; elt = ISC_LIST_NEXT(elt, link)) { cfg_print_obj(pctx, elt->obj); if (ISC_LIST_NEXT(elt, link) != NULL) cfg_print_char...
false
false
false
false
false
0
MakeCode(CompilationInfo* info) { // Label the AST before calling MakeCodePrologue, so AST node numbers are // printed with the AST. AstLabeler labeler; labeler.Label(info); CodeGenerator::MakeCodePrologue(info); const int kInitialBufferSize = 4 * KB; MacroAssembler masm(NULL, kInitialBufferSize); //...
false
false
false
false
false
0
errfmt(char *outbuf, int outbufl, char *fmt, int argc, erradef *argv) { int outlen = 0; int argi = 0; int len; char buf[20]; char *p; char fmtchar; while (*fmt != '\0' && outbufl > 1) { switch(*fmt) { case '\\': ++fmt; ...
false
false
false
false
false
0
__mark_widdet_params(struct mod_t *pmdp) { struct task_t *tskp; /* check all wire and array declaration ranges - mark any param there */ inrnges_mark_params(pmdp->msymtab); /* task list contains all symbols in task but if has named blocks */ /* symbols declared there will be checked in its task on list */ for (...
false
false
false
false
false
0
gate_ipa_pta (void) { return (optimize && flag_ipa_pta /* Don't bother doing anything if the program has errors. */ && !seen_error ()); }
false
false
false
false
false
0
lame_init_old(lame_global_flags * gfp) { disable_FPE(); /* disable floating point exceptions */ memset(gfp, 0, sizeof(lame_global_flags)); gfp->class_id = LAME_ID; /* Global flags. set defaults here for non-zero values */ /* see lame.h for description */ /* set integer values to -1 to m...
false
false
false
false
false
0
is_atapi_drive (int unitnum) { static uae_u8 cmd[6] = {0x12, 0, 0, 0, 36, 0}; /* INQUIRY */ uae_u8 out[36]; int outlen = sizeof (out); uae_u8 *p = execscsicmd_in (unitnum, cmd, sizeof (cmd), &outlen); if (!p) { DEBUG_LOG ("SCSIDEV: Inquiry command failed; unit %d is not ATAPI drive\n", unitnum); r...
false
false
false
false
false
0
RegressionTest(double thresh, ostream &os) { VTK_CREATE(vtkWindowToImageFilter, rt_w2if); rt_w2if->SetInput(this->RenderWindow); unsigned int i; for (i=0; i<this->Args.size(); i++) { if ( strcmp("-FrontBuffer", this->Args[i].c_str()) == 0 ) { this->FrontBufferOn(); } else if ( str...
false
false
false
false
false
0
sh_irda_hard_xmit(struct sk_buff *skb, struct net_device *ndev) { struct sh_irda_self *self = netdev_priv(ndev); struct device *dev = &self->ndev->dev; int speed = irda_get_next_speed(skb); int ret; dev_dbg(dev, "hard xmit\n"); netif_stop_queue(ndev); sh_irda_rcv_ctrl(self, 0); ret = sh_irda_set_baudrate(sel...
false
false
false
false
false
0
insert_bnode(xmlctxt *ctxt) { fs_rid bnode = atoll(ctxt->resource); /* TODO catch other people's non-numeric bNode IDs */ while (ctxt->bnodemax < bnode) { fs_rid bnodenext; fsp_bnode_alloc(ctxt->link, 1000000, &bnodenext, &(ctxt->bnodemax)); printf("(allocated bNode %lld to %lld)\n", bnodenext, ctxt->bno...
false
false
false
false
false
0
tcl_func_get_comb_expression( ClientData d, /*!< Not used */ Tcl_Interp* tcl, /*!< Pointer to the Tcl interpreter */ int argc, /*!< Number of arguments in the argv list */ const char* argv[] /*!< Array of arguments passed to this function */ ) { PROFILE(TCL_FUNC_GET_COMB_EXPRESSION); int ...
true
true
false
false
true
1
_slurm_cred_sign(slurm_cred_ctx_t ctx, slurm_cred_t *cred) { Buf buffer; int rc; buffer = init_buf(4096); _pack_cred(cred, buffer); rc = (*(ops.crypto_sign))(ctx->key, get_buf_data(buffer), get_buf_offset(buffer), &cred->signature, &cred->siglen); free_buf(buffer); i...
false
false
false
false
false
0
VP8IteratorImport(const VP8EncIterator* const it) { const VP8Encoder* const enc = it->enc_; const int x = it->x_, y = it->y_; const WebPPicture* const pic = enc->pic_; const uint8_t* const ysrc = pic->y + (y * pic->y_stride + x) * 16; const uint8_t* const usrc = pic->u + (y * pic->uv_stride + x) * 8; const ...
false
false
false
false
false
0
sp_svg_number_write_de(gchar *buf, int bufLen, double val, unsigned int tprec, int min_exp) { int eval = (int)floor(log10(fabs(val))); if (val == 0.0 || eval < min_exp) { return sp_svg_number_write_ui(buf, 0); } unsigned int maxnumdigitsWithoutExp = // This doesn't include the sign because it is...
false
false
false
false
false
0
handle_comment(void *clientdata, string commenttext) { if (in_text) {putchar('\n'); in_text = false;} if (linenumbering) printf("L%d\n", lineno); putchar('*'); escape(commenttext); putchar('\n'); }
false
false
false
false
false
0
queue_read_byte(queue_state_t *s) { int real_len; int to_end; int iptr; int optr; int byte; /* Snapshot the values (although only iptr should be changeable during this processing) */ iptr = s->iptr; optr = s->optr; if ((real_len = iptr - optr) < 0) real_len += s->len; ...
false
false
false
false
false
0
clear_exec ( int argc, char **argv ) { int rc; if ( argc != 2 ) { printf ( "Syntax: %s <identifier>\n", argv[0] ); return 1; } if ( ( rc = delete_named_setting ( argv[1] ) ) != 0 ) { printf ( "Could not clear \"%s\": %s\n", argv[1], strerror ( rc ) ); return 1; } return 0; }
false
false
false
false
false
0
CmdIgnoreLet(int code) /****************************************************************************** purpose : ignore \let Format: \let\XXXXX = \YYYYYY or \let\XXXXX\YYYYYY ******************************************************************************/ { char t[100]; char cThis; int i; ...
false
false
false
false
false
0
dnslogcb(int w, const char *m) { TT_BLATHER(("%s", m)); }
false
false
false
false
false
0
unity_filter_on_row_changed (UnityFilter* self, DeeModel* model, DeeModelIter* iter) { DeeModelIter* _tmp0_ = NULL; DeeModelIter* _tmp1_ = NULL; DeeModel* _tmp2_ = NULL; DeeModelIter* _tmp3_ = NULL; gboolean _tmp4_ = FALSE; GVariant* properties = NULL; DeeModel* _tmp5_ = NULL; DeeModelIter* _tmp6_ = NULL; GVar...
false
false
false
false
false
0
ASC_countAcceptedPresentationContexts(T_ASC_Parameters * params) /* ASC_countAcceptedPresentationContexts: * Returns the number of presentation contexts contained in the presentation * context list which are marked as being accepted. */ { int n = 0; LST_HEAD **l; DUL_PRESENTATIONCONTEXT *pc; if...
false
false
false
false
false
0
_draw(dg_DrawArgs* pDA) { // if showPara is turned off we will not draw anything at all; however, // we will ensure that the width is set to 0, and if it is currently not // we will get our line to redo its layout and redraw. FV_View* pView = _getView(); if(!pView || !pView->getShowPara()) { if(m_iDraw...
false
false
false
false
false
0
hasDecompBoundary(UChar32 c, UBool before) const { for(;;) { if(c<minDecompNoCP) { return TRUE; } uint16_t norm16=getNorm16(c); if(isHangul(norm16) || isDecompYesAndZeroCC(norm16)) { return TRUE; } else if(norm16>MIN_NORMAL_MAYBE_YES) { ret...
false
false
false
false
false
0
setProperty(PropertyPtr property) { m_properties[property->getName()] = property; }
false
false
false
false
false
0
terminal_app_get_active_encodings (TerminalApp *app) { GSList *list = NULL; GHashTableIter iter; gpointer key, value; g_hash_table_iter_init (&iter, app->encodings); while (g_hash_table_iter_next (&iter, &key, &value)) { TerminalEncoding *encoding = (TerminalEncoding *) value; if (!encoding-...
false
false
false
false
false
0
chromeos_laptop_dmi_matched(const struct dmi_system_id *id) { cros_laptop = (void *)id->driver_data; pr_debug("DMI Matched %s.\n", id->ident); /* Indicate to dmi_scan that processing is done. */ return 1; }
false
false
false
false
false
0
project_changed_cb (GladeProject *project, GladeCommand *command, gboolean execute, GladeWindow *window) { GladeProject *active_project = get_active_project (window); if (project == active_project) refresh_undo_redo (window, project); projec...
false
false
false
false
false
0
JimSubDivHelper(Jim_Interp *interp, int argc, Jim_Obj *const *argv, int op) { jim_wide wideValue, res = 0; double doubleValue, doubleRes = 0; int i = 2; if (argc < 2) { Jim_WrongNumArgs(interp, 1, argv, "number ?number ... number?"); return JIM_ERR; } else if (argc == 2) { ...
false
false
false
false
false
0
attach (SANE_String_Const devname, Genesys_Device ** devp, SANE_Bool may_wait) { Genesys_Device *dev = 0; SANE_Int dn, vendor, product; SANE_Status status; int i; DBG (DBG_proc, "attach: start: devp %s NULL, may_wait = %d\n", devp ? "!=" : "==", may_wait); if (devp) *devp = 0; if (!devname)...
false
false
false
false
false
0
AdjustIconWindows(void) { struct icon_info *tmp; int i = 0; tmp = Head; while(tmp != NULL){ if (window_cond(tmp) && tmp->IconWin != None) AdjustIconWindow(tmp, i++); tmp = tmp->next; } return i; }
false
false
false
false
false
0
epr_get_scaling_factor(EPR_SProductId* product_id, const char* str) { EPR_SDatasetRef scal_fact; const EPR_SField* field = NULL; EPR_SRecord* record = NULL; float ziff; scal_fact = epr_get_ref_struct(product_id, str); if (scal_fact.dataset_id == NULL) { return (float)(-909.909); } ...
false
false
false
false
false
0
SafePrintMissing(const char* str, int line, int cnt) { if ( str ) { std::cout << line << " String " << cnt << " exists: "; unsigned int cc; for ( cc = 0; cc < strlen(str); cc ++ ) { unsigned char ch = str[cc]; if ( ch >= 32 && ch <= 12...
false
false
false
false
false
0
operator== (Line& clLine) { if (m_nType <= 2) return m_nType == clLine.m_nType ; return (m_dx == clLine.m_dx) && (m_dy == clLine.m_dy) && (m_dz == clLine.m_dz) && (m_dx2 == clLine.m_dx2) && (m_dy2 == clLine.m_dy2) && (m_dz2 == clLine.m_dz2) && (m_nType == clLine.m_nType) ; }
false
false
false
false
false
0
destroy_hooks(void *arg) { try { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; P_DEBUG("Shutting down Phusion Passenger..."); delete hooks; hooks = NULL; } catch (const thread_interrupted &) { // Ignore interruptions, we're shutting down anyway. P_TRACE(3, "A syste...
false
false
false
false
false
0
i915_program_error(struct i915_fragment_program *p, const char *fmt, ...) { if (unlikely((INTEL_DEBUG & (DEBUG_WM | DEBUG_PERF)) != 0)) { va_list args; fprintf(stderr, "i915_program_error: "); va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); fprintf(stderr, "\n");...
false
false
false
false
true
1
format(void) { UT_DEBUGMSG(("SEVIOR: Formatting Annotations first container is %p\n", getFirstContainer())); if(getFirstContainer() == NULL) { getNewContainer(); } if(!m_bIsOnPage) { _insertAnnotationContainer(getFirstContainer()); } fl_ContainerLayout* pBL = getFirstLayout(); while (pBL) { pBL->forma...
false
false
false
false
false
0
setAP( PP_AttrProp* newAP ) { newAP->prune(); newAP->markReadOnly(); pt_PieceTable* pt = getPieceTable(); pt_VarSet& m_varset = pt->getVarSet(); PT_AttrPropIndex newAPI = 0; bool success = m_varset.addIfUniqueAP( newAP, &newAPI ); // addIfUniqueAP() eats it newAP = 0; if(!suc...
false
false
false
false
false
0
canonEv(long val) { // temporarily remove sign int sign = 1; if (val < 0) { sign = -1; val = -val; } // remove fraction float frac = static_cast<float>(val & 0x1f); val -= long(frac); // convert 1/3 (0x0c) and 2/3 (0x14) codes ...
false
false
false
false
false
0
Init() { static ClassDocumentation<ClusterDecayer> documentation ("This class is responsible for the two-body decays of normal clusters"); static Reference<ClusterDecayer,HadronSelector> interfaceHadronSelector("HadronSelector", "A reference to the HadronSelector object", ...
false
false
false
false
false
0
common_cpu_up(unsigned int cpu, struct task_struct *idle) { /* Just in case we booted with a single CPU. */ alternatives_enable_smp(); per_cpu(current_task, cpu) = idle; #ifdef CONFIG_X86_32 /* Stack for startup_32 can be just as for start_secondary onwards */ irq_ctx_init(cpu); per_cpu(cpu_current_top_of_stack...
false
false
false
false
false
0
tarWrite(const void *buf, size_t len, TAR_MEMBER *th) { size_t res; if (th->zFH != 0) res = GZWRITE((void *) buf, 1, len, th->zFH); else res = fwrite(buf, 1, len, th->nFH); if (res != len) die_horribly(th->AH, modulename, "could not write to output file: %s\n", strerror(errno)); th->pos += res; re...
false
false
false
false
false
0
output_window_append(const struct ft_color color, const char *featured_text) { char plain_text[MAX_LEN_MSG]; struct text_tag_list *tags; /* Separate the text and the tags. */ featured_text_to_plain_text(featured_text, plain_text, sizeof(plain_text), &tags...
true
true
false
false
false
1
doinit() { Baryon1MesonDecayerBase::doinit(); // set up the decay modes setupModes(1); // set up the phase space and the couplings tPDVector extpart(3); DecayPhaseSpaceModePtr mode; double wgtmax; vector<double> wgt(0); for(unsigned int ix=0;ix<incomingB_.size();++ix) { extpart[0]=getParticleData(...
false
false
false
false
false
0
f_digit(int count, VALUE **vals) { VALUE res; ZVALUE base; if (vals[0]->v_type != V_NUM) return error_value(E_DGT1); if (vals[1]->v_type != V_NUM || qisfrac(vals[1]->v_num)) return error_value(E_DGT2); if (count == 3) { if (vals[2]->v_type != V_NUM || qisfrac(vals[2]->v_num)) return error_value(E_DGT3)...
false
false
false
false
false
0
go() { try { fetch_callback.successCallback= &mail::copyMessage::fetchText; vector<size_t> messageNumVector; messageNumVector.push_back(messageNum); from->readMessageAttributes(messageNumVector, mail::account::ARRIVALDATE, fetch_callback); } catch (...) { callback.fail("An exception occ...
false
false
false
false
false
0
checkDiskStat( void ) { updateDiskStat(); DiskInfo* disk_info_new; DiskInfo* disk_info_old; int changed = 0; for ( disk_info_new = first_ctnr( DiskStatList ); disk_info_new; disk_info_new = next_ctnr( DiskStatList ) ) { int found = 0; for ( disk_info_old = first_ctnr( OldDiskStatList...
false
false
false
false
false
0
set_job_prio(struct job_record *job_ptr) { xassert(job_ptr); xassert (job_ptr->magic == JOB_MAGIC); if (IS_JOB_FINISHED(job_ptr)) return; job_ptr->priority = slurm_sched_initial_priority(lowest_prio, job_ptr); if ((job_ptr->priority <= 1) || (job_ptr->direct_set_prio) || (job_ptr->details && (j...
false
false
false
false
false
0
irc_handle_disconnect(session_t *s, const char *reason, int type) { /* * EKG_DISCONNECT_NETWORK @ irc_handle_stream type == 1 * EKG_DISCONNECT_FAILURE @ irc_handle_connect when we got timeouted or connection refused or other.. * EKG_DISCONNECT_FAILURE @ irc_c_error(misc.c) when we recv ERROR message @ connecting *...
false
false
false
false
false
0
PyvtkContourRepresentation_SetNthNodeWorldPosition_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetNthNodeWorldPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContourRepresentation *op = static_cast<vtkContourRepresentation *>(vp); int temp0; double temp1[3]; double ...
false
false
false
false
false
0
softmix_bridge_leave(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel) { struct softmix_channel *sc = bridge_channel->bridge_pvt; if (!(bridge_channel->bridge_pvt)) { return 0; } bridge_channel->bridge_pvt = NULL; /* Drop mutex lock */ ast_mutex_destroy(&sc->lock); /* Drop the factory */...
false
false
false
false
false
0
midgard_core_query_constraint_private_free(MidgardCoreQueryConstraintPrivate *mqcp) { g_assert(mqcp != NULL); /* Just free, they were initialized empty */ g_free (mqcp->prop_left); g_free (mqcp->prop_right); if(mqcp->condition_operator != NULL) g_free(mqcp->condition_operator); if(mqcp->condition != NULL) ...
false
false
false
false
false
0
sst_hsw_stream_resume(struct sst_hsw *hsw, struct sst_hsw_stream *stream, int wait) { int ret; if (!stream) { dev_warn(hsw->dev, "warning: stream is NULL, no stream to resume, ignore it.\n"); return 0; } trace_ipc_request("stream resume", stream->reply.stream_hw_id); ret = sst_hsw_stream_operations(hsw, IP...
false
false
false
false
false
0