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
kwv_merge(Kwv *primary, Kwv *secondary, Kwv_dup_mode mode) { unsigned int i, slot; Kwv *rval; Kwv_pair *pair; primary->error_msg = secondary->error_msg = NULL; rval = primary; for (i = 0; i < secondary->nused; i++) { if ((pair = secondary->pairs[i]) != NULL) { if (lookup_key(primary, pair->name, &slot...
false
false
false
false
false
0
handle_LNI(struct ptype_action_args *parg) { struct ptype_action_args cparg; g2_connection_t *connec = parg->connec; bool ret_val = false, keep_decoding; struct LNI_data rdata; memset(&rdata, 0, sizeof(rdata)); cparg = *parg; cparg.father = parg->source; cparg.opaque = &rdata; do { g2_packet_t child_p; c...
false
false
false
false
false
0
_gth_image_dragger_update_scaled_image (GthImageDragger *self) { cairo_surface_t *image; int image_width, image_height; int original_width, original_height; double zoom; _cairo_clear_surface (&self->priv->scaled); self->priv->scaled = NULL; if (gth_image_viewer_is_animation ...
false
false
false
false
false
0
st_theme_node_transition_paint (StThemeNodeTransition *transition, ClutterActorBox *allocation, guint8 paint_opacity) { StThemeNodeTransitionPrivate *priv = transition->priv; CoglColor constant; float tex_coords[] = { 0.0, ...
false
false
false
false
false
0
fz_draw_fill_path(fz_device *devp, fz_path *path, int even_odd, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) { fz_draw_device *dev = devp->user; float expansion = fz_matrix_expansion(ctm); float flatness = 0.3f / expansion; unsigned char colorbv[FZ_MAX_COLORS + 1]; float colorfv[FZ_MAX_COL...
true
true
false
false
false
1
led_rgb_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct ec_params_lightbar *param; struct cros_ec_command *msg; struct cros_ec_dev *ec = container_of(dev, struct cros_ec_dev, class_dev); unsigned int val[4]; int ret, i = 0, j = 0, ok = 0; msg = ...
false
false
false
false
false
0
int_from_string (gchar * ptr, gchar ** endptr, gint * val) { gchar *end; gint64 ret; g_return_val_if_fail (ptr != NULL, FALSE); g_return_val_if_fail (val != NULL, FALSE); errno = 0; ret = g_ascii_strtoll (ptr, &end, 10); if ((errno == ERANGE && (ret == G_MAXINT64 || ret == G_MININT64)) || (errno !...
false
false
false
false
false
0
reader_read(struct reader *reader, uint64_t offset, char *buffer, unsigned buffer_sz, struct keyvalue *kv) { int r = file_pread(reader->file, buffer, buffer_sz, offset); if (r == -1) { return -1; } struct record rec; r = record_unpack(buffer, buffer_sz, &rec); if (r < 0) { _reader_log_error(reader, r, o...
false
false
false
false
false
0
SetTile(int x,int y,int lod,trpgwAppAddress &ref,float32 zmin,float32 zmax) { if (lod < 0 || lod >= static_cast<int>(lodInfo.size())) return; if (mode == External) return; LodInfo &li = lodInfo[lod]; int loc; if(localBlock) { loc = 0; } else { if (x < 0 || x ...
false
false
false
false
false
0
_e_fm2_file_delete_yes_cb(void *data, E_Dialog *dialog) { E_Fm2_Icon *ic, *ic_next; char buf[PATH_MAX]; char *files = NULL; size_t size = 0; size_t len = 0; Eina_List *sel, *l; E_Fm2_Icon_Info *ici; Eina_Bool memerr = EINA_FALSE; ic = data; ic->dialog = NULL; e_object_del(E_OBJECT(...
true
true
false
false
false
1
is_valid_family_access (MonoClass *access_klass, MonoClass *member_klass, MonoClass *context_klass) { if (!mono_class_has_parent_and_ignore_generics (access_klass, member_klass)) return FALSE; if (context_klass == NULL) return TRUE; /*if access_klass is not member_klass context_klass must be type compat*/ if (...
false
false
false
false
false
0
bdf_grid_embolden(bdf_glyph_grid_t *grid) #else bdf_grid_embolden(grid) bdf_glyph_grid_t *grid; #endif { int done; short wd, ht, gx, gy, x, y; unsigned short b1, b2, bpr, si, di, col; unsigned char *masks; done = 0; if (grid == 0 || (grid->glyph_bbx.width == 0 && grid->glyph_bbx.height...
false
false
false
true
false
1
init_wipers() { vector<string> empty; keywords["define"] = keyword(empty, empty, true, DEFINE); keywords["undefine"] = keyword(empty, empty, true, UNDEFINE); keywords["graph"] = keyword(empty, empty, true, GRAPH); keywords["else"] = keyword(empty, empty, true, ELSE); keywords["print"] = keyword(...
false
false
false
false
false
0
bjnp_send_broadcast (int sockfd, const bjnp_sockaddr_t * broadcast_addr, struct BJNP_command cmd, int size) { int num_bytes; /* set address to send packet to */ /* usebroadcast address of interface */ if ((num_bytes = sendto (sockfd, &cmd, size, 0, &(broadcast_addr->in), sa_siz...
false
false
false
false
false
0
isl_printer_print_schedule_node( __isl_take isl_printer *p, __isl_keep isl_schedule_node *node) { if (!node) return isl_printer_free(p); return isl_printer_print_schedule_tree_mark(p, node->schedule->root, isl_schedule_tree_list_n_schedule_tree(node->ancestors), node->child_pos); }
false
false
false
false
false
0
check_root_obj_specific_ref (RootRecord *root, MonoObject *key, MonoObject *obj) { if (key != obj) return; g_print ("found ref to %p in root record %p\n", key, root); }
false
false
false
false
false
0
pifst (void) { int isi, ii, ti, ei; isi = Cnew (C_IF); Lgtok (); GTOKIFEQ (L_LP); ii = pexpr (); Csetfp (isi, ii); GTOKIFEQ (L_RP); ti = pstmt (); Csetnext (ii, ti); if (Ltok == L_ELSE) { Lgtok (); ei = pstmt (); Csetnext (ti, ei); } return isi; }
false
false
false
false
false
0
up_client_about_to_sleep_sync (UpClient *client, UpSleepKind sleep_kind, GCancellable *cancellable, GError **error) { gboolean ret; GError *error_local = NULL; g_return_val_if_fail (UP_IS_CLIENT (client), FALSE); g_return_val_if_fail (client->priv->proxy != NULL, FALSE); ret = dbus_...
false
false
false
false
false
0
grep_in_string (char *pat, char *str, int *start, int *end) { #if defined HAVE_REGEX_H int rc, nmatch, k, max_k, widest; regex_t compiled; regmatch_t *matches; rc = regcomp (&compiled, pat, REG_NEWLINE | REG_EXTENDED); if (rc != 0) { regfree (&compiled); return (rc); } nmatch = (int) (RE_NSUB (&co...
false
false
false
false
false
0
getPointerBase(Value *Ptr) { if (BaseMap.count(Ptr)) return BaseMap[Ptr]; Value *P = Ptr->stripPointerCasts(); if (BaseMap.count(P)) { return BaseMap[Ptr] = BaseMap[P]; } Value *P2 = GetUnderlyingObject(P, TD); if (P2 != P) { Value *V = getPointerBase(P2);...
false
false
false
false
false
0
tsc_score(Scorer *self) { TermScorer *ts = TSc(self); int freq = ts->freqs[ts->pointer]; float score; /* compute tf(f)*weight */ if (freq < SCORE_CACHE_SIZE) { /* check cache */ score = ts->score_cache[freq]; /* cache hit */ } else { /* cache miss */ score = sim_t...
false
false
false
false
false
0
listMiscellaneoussetCompareIdentifierAscending( const void *item1, const void *item2) { EnsPMiscellaneousset ms1 = *(EnsOMiscellaneousset *const *) item1; EnsPMiscellaneousset ms2 = *(EnsOMiscellaneousset *const *) item2; #if defined(AJ_DEBUG) && AJ_DEBUG >= 2 if (ajDebugTest("listMiscellaneoussetC...
false
false
false
false
false
0
aif_close (ao_instance_t * _instance) { aif_instance_t * instance = (aif_instance_t *) _instance; if (fseek (stdout, 0, SEEK_SET) < 0) return; store4 (aif_header + 4, instance->size + 46); store4 (aif_header + 22, instance->size / 4); store4 (aif_header + 42, instance->size + 8); fwrite (aif_...
false
false
false
false
false
0
check_numeric_args(vpiHandle argv, unsigned count, vpiHandle callh, const char *name) { unsigned idx; /* Check that the first count arguments are numeric. Currently * only three are needed/supported. */ for (idx = 0; idx < count; idx += 1) { char *loc; vpiHan...
false
false
false
false
false
0
mod_init(void) { int err = -ENODEV; int i; struct pci_dev *dev = NULL; void __iomem *mem = mem; u8 hw_status; struct intel_rng_hw *intel_rng_hw; for (i = 0; !dev && pci_tbl[i].vendor; ++i) dev = pci_get_device(pci_tbl[i].vendor, pci_tbl[i].device, NULL); if (!dev) goto out; /* Device not found. *...
false
false
false
false
true
1
apreq_set_brigade_limit(cmd_parms *cmd, void *data, const char *arg) { struct dir_config *conf = data; const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT); if (err != NULL) return err; conf->brigade_limit = apreq_atoi64f(arg); return NULL; }
false
false
false
false
false
0
read_all_input(int argc, char **argv, FILE *fout, BOOL echo, int unknown_action) { int n = which_string_member("-f", argv, argc); if (n == -1) { read_from_file(stdin, fout, echo, unknown_action); } else { int i; for (i = n+1; i < argc; i++) { FILE *fin = fopen(argv[i], "r"); if (fi...
false
false
false
false
false
0
timer_remove(plugin_t *plugin, const char *name) { struct timer *t; int removed = 0; for (t = timers; t; t = t->next) { if (t->plugin == plugin && !xstrcasecmp(name, t->name)) { t = timers_removei(t); removed++; } } return ((removed) ? 0 : -1); }
false
false
false
false
false
0
r600_pcie_gart_tlb_flush(struct radeon_device *rdev) { unsigned i; u32 tmp; /* flush hdp cache so updates hit vram */ if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && !(rdev->flags & RADEON_IS_AGP)) { void __iomem *ptr = (void *)rdev->gart.ptr; u32 tmp; /* r7xx hw bug. write to HDP_...
false
false
false
false
false
0
init_logs(int tee) { if (tee && tee_fd == -1) { tee_fd = dup(2); if (tee_fd == -1) return -1; } return init_log_d(error_filename, &error_fd) == -1 || init_log_d(log_filename, &log_fd) == -1 ? -1 : 0; }
false
false
false
false
false
0
CQRDist (double CQR_FAR * dist, CQRQuaternionHandle q1, CQRQuaternionHandle q2) { if (!q1 || !q2 || !dist ) return CQR_BAD_ARGUMENT; CQRMDist(*dist,*q1,*q2); return CQR_SUCCESS; }
false
false
false
false
false
0
DivideRegion(vtkKdNode *kd, float *c1, int *ids, int level) { int ok = this->DivideTest(kd->GetNumberOfPoints(), level); if (!ok) { return 0; } int maxdim = this->SelectCutDirection(kd); kd->SetDim(maxdim); int dim1 = maxdim; // best cut direction int dim2 = -1; // other valid cut di...
false
false
false
false
false
0
page_file(FILE *stream) { FILE *cmd; /* pager command */ char buf[BUFSIZ+1]; /* I/O buffer */ char *fgets_ret; /* fgets() return value */ /* * flush any pending I/O */ fflush(stderr); fflush(stdout); fflush(stdin); /* * form a write pipe to a pager */ if (pager == NULL || pager[0] == '\0') { cm...
false
false
false
false
false
0
response_cb (GtkDialog * main_dialog, gint response_id, gpointer data) { tb_export_t * tb_export = data; GtkWidget * file_chooser; gint return_val; gchar * filename; AmitkExportMethod method; gboolean close_dialog=FALSE; switch(response_id) { case AMITK_RESPONSE_EXECUTE: /* the rest of this fun...
false
false
false
false
false
0
_mounted_fs_on_device(const char *kernel_dev_name) { char sysfs_path[PATH_MAX]; struct dirent *dirent; DIR *d; struct stat st; int r = 0; if (dm_snprintf(sysfs_path, PATH_MAX, "%sfs", _sysfs_dir) < 0) { log_error("sysfs_path dm_snprintf failed"); return 0; } if (!(d = opendir(sysfs_path))) { if (errno !...
false
false
false
false
false
0
make_pathkey_from_sortop(PlannerInfo *root, Expr *expr, Oid ordering_op, bool nulls_first, Index sortref, bool create_it, bool canonicalize) { Oid opfamily, opcintype, collation; int16 strategy; /* Find the operator in pg_amop --- failure shouldn't happen */ if ...
false
false
false
false
false
0
paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * /*widget*/) { if (RenderOpts::HQRendering) return; QColor color = RenderOpts::hiColor; if (option->state & QStyle::State_MouseOver) { if (m_operation != Off) color.setAlpha(250); else ...
false
false
false
false
false
0
parse_array_element(xmlDocPtr doc, xmlNodePtr node, XMLRPCDocument *xrdoc, List *elements) { Octstr *name; size_t i; /* * check if the element is allowed at this level */ if (node->name == NULL) { error(0, "XMLRPC: XML array element nodes without name...
false
false
false
false
false
0
shutdown() { try { // for error handling match(SHUTDOWN); if ( inputState->guessing==0 ) { #line 583 "iosacl.g" *dbg<< LT(1)->getLine() << ":" << " INTERFACE SHUTDOWN " << std::endl; #line 512 "IOSCfgParser.cpp" } } catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { if( inputSt...
false
false
false
false
false
0
pop() { if (size == 0) return 0; stacknode *node = (stacknode *) sp; Object *obj = node->obj; sp = (void *) node->next; delete node; size--; return obj; }
false
false
false
false
false
0
acpi_power_add_resource_to_list(struct acpi_power_resource *resource) { mutex_lock(&power_resource_list_lock); if (!list_empty(&acpi_power_resource_list)) { struct acpi_power_resource *r; list_for_each_entry(r, &acpi_power_resource_list, list_node) if (r->order > resource->order) { list_add_tail(&resourc...
false
false
false
false
false
0
_2x2T_h_Enc(int*a, int*b, int*c, int*d) { *a += *d; *b -= *c; CHECK2(long_word_flag, *a, *b); int t1 = *d; int t2 = *c; *c = ((*a - *b) >> 1) - t1; *d = t2 + (*b >> 1); *b += *c; *a -= (*d * 3 + 4) >> 3; CHECK4(long_word_flag, *c, *d, *b, *a); }
false
false
false
false
false
0
insert_vertex(int i) /* inserts the previously removed vertex */ { EDGE *run, *end, *buffer; nv++; ne += 2*degree[i]; run=end=firstedge[i]; do { buffer=run->invers; buffer->prev->next=buffer; buffer->next->prev=buffer; (degree[buffer->start])++; run=run->...
false
false
false
false
false
0
DoUVTransform(uint32_t bits, const int16_t* const src, uint8_t* const dst) { if (bits & 0xff) { // any non-zero coeff at all? if (bits & 0xaa) { // any non-zero AC coefficient? VP8TransformUV(src, dst); // note we don't use the AC3 variant for U/V } else { VP8Transf...
false
false
false
false
false
0
insert_qr(sp,qp,ope,op1,op2,op3,op4) Statement *sp; Quadruple *qp; qr_operator ope; Operand *op1,*op2,*op3,*op4; { Quadruple *q_clip,*q_clip1; if (sp != NULL){ q_clip = alloc_qr(); q_clip->ope = ope; q_clip->op[0] = op1; q_clip->op[1] = op2; q_clip->op[2] = op3; q_clip->op[3] = op4; q_clip->stm = sp...
false
false
false
false
false
0
Reparse(const wxString& filename, bool isLocal) { if (!Done()) { wxString msg(_T("Parser::Reparse : The Parser is not done.")); msg += NotDoneReason(); CCLogger::Get()->DebugLog(msg); return false; } if (m_ReparseTimer.IsRunning()) m_ReparseTimer.Stop(); CC_...
false
false
false
false
false
0
apol_mls_level_validate(const apol_policy_t * p, const apol_mls_level_t * level) { const qpol_level_t *level_datum; qpol_iterator_t *iter = NULL; apol_vector_t *cat_vector; int retval = -1; size_t i, j; if (p == NULL || level == NULL || level->cats == NULL) { ERR(p, "%s", strerror(EINVAL)); errno = EINVAL; ...
false
false
false
false
false
0
yam_start_tx(struct net_device *dev, struct yam_port *yp) { if ((yp->tx_state == TX_TAIL) || (yp->txd == 0)) yp->tx_count = 1; else yp->tx_count = (yp->bitrate * yp->txd) / 8000; yp->tx_state = TX_HEAD; ptt_on(dev); }
false
false
false
false
false
0
insert_field_init_byte(char *name, int index, int value) { if (value < -128 || value > 255) { return -1; } fprintf(out, " ld hl, %d\n", (int8_t)value); fprintf(out, " ld (%s), hl\n", name); return 0; }
false
false
false
false
false
0
remove_user_from_channels(struct Client *client_p) { struct Channel *chptr; struct membership *msptr; rb_dlink_node *ptr; rb_dlink_node *next_ptr; if(client_p == NULL) return; RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->user->channel.head) { msptr = ptr->data; chptr = msptr->chptr; rb_dlinkDelete(&...
false
false
false
false
false
0
parse_get_char(ParseContext *context) { gw_assert(context != NULL); if (context->pos == context->limit) { context->error = 1; return -1; } return octstr_get_char(context->data, context->pos++); }
false
false
false
true
false
1
uct_leaf_node(struct uct *u, struct board *b, enum stone player_color, struct playout_amafmap *amaf, struct uct_descent *descent, int *dlen, struct tree_node *significant[2], struct tree *t, struct tree_node *n, enum stone node_color, char *spaces) { enum stone next_col...
false
false
false
false
false
0
set_server_gecos(struct Client *client_p, const char *info) { /* check the info for [IP] */ if(info[0]) { char *p; char *s; char *t; s = LOCAL_COPY(info); /* we should only check the first word for an ip */ if((p = strchr(s, ' '))) *p = '\0'; /* check for a ] which would symbolise an [IP] */ if...
false
false
false
false
false
0
evaluate() const { // // evaluate the left hand side // trace(("plus::evaluate()\n{\n")); assert(get_nchildren() == 2); rpt_value::pointer lv1 = nth_child(0)->evaluate(true, true); if (lv1->is_an_error()) { trace(("}\n")); return lv1; } // // coerce the left hand side ...
false
false
false
false
false
0
_ds_pref_del ( config_t config, const char *username, const char *home, const char *preference, void *dbt) { struct _mysql_drv_storage *s; struct passwd *p; char query[512]; int query_rc = 0; int query_errno = 0; DSPAM_CTX *CTX; int uid; char *m1; CTX = _mysql_drv_init_tools(home, config, dbt, D...
false
false
false
false
false
0
p54spi_work(struct work_struct *work) { struct p54s_priv *priv = container_of(work, struct p54s_priv, work); u32 ints; int ret; mutex_lock(&priv->mutex); if (priv->fw_state == FW_STATE_OFF) goto out; ints = p54spi_read32(priv, SPI_ADRS_HOST_INTERRUPTS); if (ints & SPI_HOST_INT_READY) { p54spi_int_ready(p...
false
false
false
false
false
0
suffix_match( const char * string, const char * suffix) { size_t len; size_t len_suffix; len = strlen(string); len_suffix = strlen(suffix); if (len <= len_suffix) { return false; } if (memcmp(string + (len - len_suffix), ".desktop", len_suffix) != 0) { return false; } return true; ...
false
false
false
false
false
0
glfwGetCurrentContext(void) { _GLFW_REQUIRE_INIT_OR_RETURN(NULL); return _glfwPlatformGetTls(&_glfw.context); }
false
false
false
false
false
0
act_stage4_ip6_config_timeout (NMDevice *self, NMDeviceStateReason *reason) { if (nm_device_ip_config_should_fail (self, TRUE)) { *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; return NM_ACT_STAGE_RETURN_FAILURE; } return NM_ACT_STAGE_RETURN_SUCCESS; }
false
false
false
false
false
0
gemm(const char* transa, const ConstGeneralMatrix& a, const char* transb, const ConstGeneralMatrix& b, double alpha, double beta) { int opa_rows = a.numRows(); int opa_cols = a.numCols(); if (!strcmp(transa, "T")) { opa_rows = a.numCols(); opa_cols = a.numRows(); } int opb_rows = b.numRows(); in...
false
false
false
false
false
0
New(const FileAccessRef& s,const char *url,int m) { ParsedURL u(url,true); if(u.proto) return new FileCopyPeerFA(&u,m); return new FileCopyPeerFA(s,url,m); }
false
false
false
false
false
0
reject_fwd(env, conn) ENV *env; REPMGR_CONNECTION *conn; { DB_REP *db_rep; REP *rep; SITE_STRING_BUFFER site_string; __repmgr_gm_fwd_args fwd; repmgr_netaddr_t addr; u_int8_t buf[MAX_MSG_BUF]; u_int32_t msg_type; size_t len; int ret; db_rep = env->rep_handle; rep = db_rep->region; if (IS_KNOWN_REMOTE_SI...
false
false
false
false
false
0
lookup_codec_association_custom_internal (GList *codec_associations, gboolean want_disabled, CAFindFunc func, gpointer user_data) { GList *item; g_return_val_if_fail (func, NULL); for (item = codec_associations; item; item = g_list_next (item)) { CodecAssociation *ca = item->data; if...
false
false
false
false
false
0
CheckOpts(int argc,char **argv) { extern char *optarg; char ld_library_path[CF_BUFSIZE]; char arg[CF_BUFSIZE]; int optindex = 0; int c; while ((c=getopt_long(argc,argv,"d:vIKf:D:N:VSxLFM",OPTIONS,&optindex)) != EOF) { switch ((char) c) { case 'f': if (optarg && strlen(optarg) < 5)...
true
true
false
false
true
1
DetermineScalingParametersImpl( const SmartPtr<const VectorSpace> x_space, const SmartPtr<const VectorSpace> c_space, const SmartPtr<const VectorSpace> d_space, const SmartPtr<const MatrixSpace> jac_c_space, const SmartPtr<const MatrixSpace> jac_d_space, const SmartPtr<const SymMatrixSpace> h_sp...
false
false
false
false
false
0
set_file(std::string& nfile) { _file = nfile; #ifdef GLIBMM_EXCEPTIONS_ENABLED std::string f; try { f = Glib::filename_to_utf8(Glib::path_get_basename(nfile)); } catch (...) { // We shouldn't be here. f = Glib::filename_display_basename(nfile); } #else std::auto_ptr<Glib::Error> error; std:...
false
false
false
false
false
0
altera_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot, u8 flag, u8 read, int addr, u8 val) { struct altera_ci_state *state = en50221->data; struct fpga_internal *inter = state->internal; u8 store; int mem = 0; if (0 != slot) return -EINVAL; mutex_lock(&inter->fpga_mutex); netup_fpga_op_rw(inter, N...
false
false
false
false
false
0
HttpGwFirstProgressCallback (int transfer, bin64_t bin) { if (bin!=bin64_t(0,0)) // need the first packet return; swift::RemoveProgressCallback(transfer,&HttpGwFirstProgressCallback); swift::AddProgressCallback(transfer,&HttpGwSwiftProgressCallback,0); for (int httpc=0; httpc<http_gw_reqs_open; ...
false
false
false
false
false
0
CreateColorRamp( int nStartIndex, const GDALColorEntry *psStartColor, int nEndIndex, const GDALColorEntry *psEndColor ) { /* validate indexes */ if( nStartIndex < 0 || nStartIndex > 255 || nEndIndex < 0 || nEndIndex > 255 || nStartIndex > nEndIndex ) { return...
false
false
false
false
false
0
io_in_buffer(ADAPTER *a, void *adr, void *buffer, word len) { byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); byte *P = (byte *)buffer; if ((long)adr & 1) { outppw(Port + 4, (word)(unsigned long)adr); *P = inpp(Port); P++; adr = ((byte *) adr) + 1; len--; if (!len) { DIVA_OS_MEM_DE...
false
false
false
false
false
0
octeon_remove_consoles(struct octeon_device *oct) { u32 i; struct octeon_console *console; for (i = 0; i < oct->num_consoles; i++) { console = &oct->console[i]; if (!console->active) continue; cancel_delayed_work_sync(&oct->console_poll_work[i]. work); console->addr = 0; console->buffer_size = ...
false
false
false
false
false
0
bfd_hash_table_init_n (struct bfd_hash_table *table, struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *, struct bfd_hash_table *, const char *), unsigned int entsize, unsigned int size) { unsigned long alloc; alloc = size; alloc *= sizeof (struct bfd_hash_entr...
false
false
false
false
false
0
mouseDoubleClickEvent(QMouseEvent *event) { if (event->button() != Qt::LeftButton || !m_frozen) { QLabel::mouseDoubleClickEvent(event); return; } setFrozen(false); }
false
false
false
false
false
0
ecal_test_utils_cal_remove_object (ECal *cal, const gchar *uid) { GError *error = NULL; if (!e_cal_remove_object (cal, uid, &error)) { g_warning ("failed to remove icalcomponent object '%s'; %s\n", uid, error->message); exit (1); } test_print ("successfully remoed the icalcom...
false
false
false
false
false
0
check_parameters_of_create_bmp_for_rect_in_rect(void) { if( (Er1<1.0) || (Er2 <1.0)) exit_with_msg_and_exit_code((char *) "Both Er1 and Er2 must be >= 1.0",100); if(aa+dd>WW) exit_with_msg_and_exit_code((char *) "the dielectric extends horizontally outside the box (a+d>W)",100); if(bb+ww>=WW) ...
false
false
false
false
false
0
gwy_app_init_common(GError **error, ...) { gchar *settings_file; va_list ap; const gchar *dir; gboolean ok = TRUE; gwy_widgets_type_init(); gwy_app_init_widget_styles(); gwy_app_init_i18n(); gwy_data_window_class_set_tooltips(gwy_app_get_tooltips()); gwy_3d_wind...
false
false
false
false
false
0
extract_librep (FILE *f, const char *real_filename, const char *logical_filename, flag_context_list_table_ty *flag_table, msgdomain_list_ty *mdlp) { mlp = mdlp->item[0]->messages; fp = f; real_file_name = real_filename; logical_file_name = xstrdup (logical_filena...
false
false
false
false
false
0
fix_power_on_ctrl_task(Ctrl_task *ctrl_task, Ctrl_task **ctrl_tasks, int total_pe) { Block_info *b_info = ctrl_task_get_b_info(ctrl_task); Layer_info *l_info = block_info_get_layer_info(b_info); Block *block = block_info_get_block(b_info); Hmdf_table *hmdf = block->hmdf; List...
false
false
false
false
false
0
make_tempdir(void) { char template[] = "/tmp/bootchart.XXXXXX"; char *tempdir = xstrdup(mkdtemp(template)); if (!tempdir) { #ifdef __linux__ /* /tmp is not writable (happens when we are used as init). * Try to mount a tmpfs, them cd and lazily unmount it. * Since we unmount it at once, we can mount it anywhe...
false
false
false
false
false
0
signal_trap_with(int signo, signal_handler_t handler, bool extra) { signal_handler_t ret, old_handler, trampoline; g_assert(handler != SIG_ERR); g_assert(signo > 0 && signo < SIGNAL_COUNT); STATIC_ASSERT(SIGNAL_COUNT == G_N_ELEMENTS(signal_handler)); if G_UNLIKELY(!signal_inited) signal_init(); old_handler ...
false
false
false
false
false
0
client_exit (void) { /* Do nothing, if we're not a network client. */ if (serv_read != NULL && serv_write != NULL) { /* That's it, say bye-bye. */ if (debug) { fprintf (stderr, "%s: writing `QUIT'\n", program_name); } fflush (serv_read); fprintf (serv_write, "QUIT\r\n"); fc...
false
false
false
false
false
0
CreateNewJoin( void *theEnv, struct expr *joinTest, struct joinNode *lhsEntryStruct, void *rhsEntryStruct, int joinFromTheRight, int negatedRHSPattern) { struct joinNode *newJoin; /*===============================================*/ /* If compilations are being watch, print +j to */ /* indica...
false
false
false
false
false
0
init_gettext(unsigned char *s) { FILE *f; unsigned char buf[1024]; joe_snprintf_2(buf, sizeof(buf), "%slang/%s.po",JOEDATA,s); if ((f = fopen((char *)buf, "r"))) { /* Try specific language, like en_GB */ gettext_ht = htmk(256); load_po(f); } else if (s[0] && s[1]) { /* Try generic language, like en */ jo...
true
true
false
false
true
1
elements() const { Enum * e = detailed_elements(); if (!e) return 0; return new DictStringEnumeration(e); }
false
false
false
false
false
0
parse_body_part (Octstr **multipart, Octstr *boundary, Octstr **body_part) { Octstr *part_delimiter, *close_delimiter; long boundary_pos, /* start of the boundary */ close_delimiter_pos, /* start of the close delimiter */ next_part_pos, ...
false
false
false
false
false
0
validate_crm_message(xmlNode * msg, const char *sys, const char *uuid, const char *msg_type) { const char *type = NULL; const char *crm_msg_reference = NULL; if (msg == NULL) { return FALSE; } type = crm_element_value(msg, F_CRM_MSG_TYPE); crm_msg_reference = crm_element_value(msg, XML...
false
false
false
false
false
0
perl_plugin_init(int prio) { auto_load = 1; PLUGIN_CHECK_VER("perl"); plugin_register(&perl_plugin, prio); scriptlang_register(&perl_lang); /* TODO * command_add(&perl_plugin, "perl:eval", "!", perl_command_eval, COMMAND_ENABLEREQPARAMS, NULL); * command_add(&perl_plugin, "perl:test", "!", perl_command_te...
false
false
false
false
false
0
seek_random(int fd, int row, int col) { struct fileinfo *fcb = &G__.fileinfo[fd]; off_t offset = ((off_t) fcb->cellhd.cols * row + col) * fcb->nbytes; if (lseek(fd, offset, SEEK_SET) < 0) { write_error(fd, row); return -1; } return 0; }
false
false
false
false
false
0
SetInteractor( vtkRenderWindowInteractor *rwi ) { if (this->Interactor == rwi) { return; } if (this->Interactor) { this->Interactor->RemoveObserver( this->SelectionRenderCommand ); } vtkSetObjectBodyMacro( Interactor, vtkRenderWindowInteractor, rwi ); if (th...
false
false
false
false
false
0
onMouseButtonUp(MouseEventArgs& e) { Listbox::onMouseButtonUp(e); if (e.button == LeftButton) { if (d_armed && (getChildAtPosition(e.position) == 0)) { // if something was selected, confirm that selection. if (getSelectedCount() > 0) { WindowEventArgs args(this); onListSelectionAccepted(args); ...
false
false
false
false
false
0
sec_pmic_configure(struct sec_pmic_dev *sec_pmic) { int err; if (sec_pmic->device_type != S2MPS13X) return; if (sec_pmic->pdata->disable_wrstbi) { /* * If WRSTBI pin is pulled down this feature must be disabled * because each Suspend to RAM will trigger buck voltage reset * to default values. */ ...
false
false
false
false
false
0
log_opengl_information() { static int written = 0; if (written) { return; } written = 1; char *software_renderer = NULL; const char *s; s = (const char*) glGetString(GL_VENDOR); if (s) { fs_log("opengl vendor: %s\n", s); } s = (const char*) glGetString(GL_RENDERER...
false
false
false
false
false
0
find_proto (NMSettingWirelessSecurity *sec, const char *item) { guint32 i; for (i = 0; i < nm_setting_wireless_security_get_num_protos (sec); i++) { if (!strcmp (item, nm_setting_wireless_security_get_proto (sec, i))) return TRUE; } return FALSE; }
false
false
false
false
false
0
slotPropertyChanged() { // skip if link dropped if (!m_control || !m_target) return; // QVariant::Int: slider gets the property value if (m_property.type() == QVariant::Int) { int intValue = m_property.read(m_target.data()).toInt(); m_control->setValue(intValue); } // Q...
false
false
false
false
false
0
_eglAddBuiltInDrivers(void) { _EGLModule *mod; EGLint i; for (i = 0; _eglBuiltInDrivers[i].name; i++) { mod = _eglAddModule(_eglBuiltInDrivers[i].name); if (mod) mod->BuiltIn = _eglBuiltInDrivers[i].main; } }
false
false
false
false
false
0
AllowMoreDownloaders() { if(!metadata || validating) return false; return RateLow(RateLimit::PUT) && am_not_choking_peers_count < max_downloaders; }
false
false
false
false
false
0
cmp_between(x, min, max) VALUE x, min, max; { if (RTEST(cmp_lt(x, min))) return Qfalse; if (RTEST(cmp_gt(x, max))) return Qfalse; return Qtrue; }
false
false
false
false
false
0
noteIdref(const StringC &str, const Location &loc) { if (!inInstance() || !options().errorIdref || !validate()) return; Id *id = lookupCreateId(str); if (!id->defined()) id->addPendingRef(loc); }
false
false
false
false
false
0
qHash(const QLandmarkCategoryId& key) { return qHash(key.localId()) + qHash(key.managerUri()); }
false
false
false
false
false
0
Frabtest() { /* ** TODO: optional argument base */ word2 *x; int sign, n; unsigned u; n = bigref(argStkPtr,&x,&sign); if(n == aERROR) { error(rabtestsym,err_int,*argStkPtr); return(brkerr()); } if(n == 0) return(false); else if(n <= 2) { return(prime32(bi...
false
false
false
false
false
0