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
ujfs_adjtree(int8_t * treep, int32_t l2leaves, int32_t l2min) { int32_t nleaves, leaf_index, l2max, nextb, bsize, index; int32_t l2free, leaf, num_this_level, nextp; int8_t *cp0, *cp1, *cp = treep; /* * Determine the number of leaves of the tree and the * index of the first leaf. * Note: I don't know why the...
false
false
false
false
false
0
selectCommand(redisClient *c) { int id = atoi(c->argv[1]->ptr); if (selectDb(c,id) == REDIS_ERR) { addReplyError(c,"invalid DB index"); } else { addReply(c,shared.ok); } }
false
false
false
false
false
0
filteredUri( const KUrl &uri, const QStringList& filters ) { KUriFilterData data(uri); filterUri( data, filters ); return data.uri(); }
false
false
false
false
false
0
uv_tcp_getpeername(uv_tcp_t* handle, struct sockaddr* name, int* namelen) { socklen_t socklen; int saved_errno; int rv = 0; /* Don't clobber errno. */ saved_errno = errno; if (handle->delayed_error) { uv__set_sys_error(handle->loop, handle->delayed_error); rv = -1; goto out; } if (han...
false
false
false
false
false
0
hashsig_add_hashes( git_hashsig *sig, const char *data, size_t size, hashsig_in_progress *prog) { const char *scan = data, *end = data + size; hashsig_state state, shift_n, rmv; if (prog->win_len < HASHSIG_HASH_WINDOW) hashsig_initial_window(sig, &scan, size, prog); state = prog->state; shift_n = prog->s...
false
false
false
false
false
0
autohelperowl_attackpat68(int trans, int move, int color, int action) { int a, b, c, A; UNUSED(color); UNUSED(action); a = AFFINE_TRANSFORM(610, trans, move); b = AFFINE_TRANSFORM(685, trans, move); c = AFFINE_TRANSFORM(720, trans, move); A = AFFINE_TRANSFORM(721, trans, move); return (somewhere(OTHE...
false
false
false
false
false
0
intel_th_output_attributes(struct gth_device *gth) { struct output_attribute *out_attrs; struct attribute **attrs; int i, j, nouts = TH_POSSIBLE_OUTPUTS; int nparms = ARRAY_SIZE(output_parms); int nattrs = nouts * nparms + 1; attrs = devm_kcalloc(gth->dev, nattrs, sizeof(void *), GFP_KERNEL); if (!attrs) retu...
false
false
false
false
false
0
obj_add_collider(int obj_index) { object *objp = &Objects[obj_index]; #ifdef OBJECT_CHECK CheckObjects[obj_index].type = objp->type; CheckObjects[obj_index].signature = objp->signature; CheckObjects[obj_index].flags = objp->flags & ~(OF_NOT_IN_COLL); CheckObjects[obj_index].parent_sig = objp->parent_sig; CheckO...
false
false
false
false
false
0
_local_create_dummy(localobject *self) { PyObject *tdict, *ldict = NULL, *wr = NULL; localdummyobject *dummy = NULL; int r; tdict = PyThreadState_GetDict(); if (tdict == NULL) { PyErr_SetString(PyExc_SystemError, "Couldn't get thread-state dictionary"); goto ...
false
false
false
false
false
0
doProcessSimple(bool &outThereIsObservation, CObservation2DRangeScan &outObservation, bool &hardwareError) { if(!m_turnedOn) { hardwareError = true; outThereIsObservation = false; return; } hardwareError = false; char msg[] = {"sRN LMDscandata"}; sendCommand(msg); ch...
false
false
false
false
false
0
gzrewind () { z_err = Z_OK; z_eof = 0; stream.avail_in = 0; stream.next_in = inbuf; crc = crc32(0L, Z_NULL, 0); if (!transparent) (void)inflateReset(&stream); in = 0; out = 0; return VSIFSeekL((VSILFILE*)poBaseHandle, startOff, SEEK_SET); }
false
false
false
false
false
0
expand_items() { maxitems += 300; pitem = (bucket **) REALLOC(pitem, maxitems*sizeof(bucket *)); if (pitem == 0) no_space(); }
false
false
false
false
false
0
get_tinfo_decl (tree type) { tree name; tree d; if (variably_modified_type_p (type, /*fn=*/NULL_TREE)) { error ("cannot create type information for type %qT because " "it involves types of variable size", type); return error_mark_node; } if (TREE_CODE (type) == METHOD_TYPE) ...
false
false
false
false
false
0
GetRemoteEncoding( CString hubname, CString hubhost ) { DCConfigHubProfile profile; if ( GetBookmarkHubProfile( hubname, hubhost, &profile ) ) { if ( profile.m_sRemoteEncoding.NotEmpty() ) { return profile.m_sRemoteEncoding; } } return m_sRemoteEncoding; }
false
false
false
false
false
0
subrip_prevwp_pr(const waypoint *waypointp) { /* Now that we have the next waypoint, we can write out the subtitle for * the previous one. */ time_t starttime; time_t endtime; if (prevwpp->creation_time >= time_offset) /* if this condition is not true, the waypoint is before the beginning of * t...
false
false
false
false
false
0
eio_monitor_add(const char *path) { const char *tmp; Eio_Monitor *ret; EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL); tmp = eina_stringshare_add(path); ret = eio_monitor_stringshared_add(tmp); eina_stringshare_del(tmp); return ret; }
false
false
false
false
false
0
reparse_options ( int argc, char **argv, struct command_descriptor *cmd, void *opts ) { struct option longopts[ cmd->num_options + 1 /* help */ + 1 /* end */ ]; char shortopts[ cmd->num_options * 3 /* possible "::" */ + 1 /* "h" */ + 1 /* NUL */ ]; unsigned int shortopt_idx = 0; int ( * parse ) ( char *t...
true
true
false
false
true
1
weak_key_compare(const ScmHashCore *hc, intptr_t key, intptr_t entrykey) { ScmWeakHashTable *wh = SCM_WEAK_HASH_TABLE(hc->data); ScmWeakBox *box = (ScmWeakBox *)entrykey; intptr_t realkey = (intptr_t)Scm_WeakBoxRef(box); if (Scm_WeakBoxEmptyP(box)) { fprintf(stderr, "...
false
false
false
false
false
0
fprintDoubleWithPrefix (FILE *f, double a, const char *fmt) { if (a >= 0.999999) { fprintf (f,fmt,a); return; } a *= 1000.0; if (a >= 0.999999) { fprintf (f,fmt,a); fprintf (f,"m"); return; } a *= 1000.0; if (a >= 0.999999) { fprintf (f,fmt,a); fprintf (f,"u"); return; } ...
false
false
false
false
false
0
airo_open(struct net_device *dev) { struct airo_info *ai = dev->ml_priv; int rc = 0; if (test_bit(FLAG_FLASHING, &ai->flags)) return -EIO; /* Make sure the card is configured. * Wireless Extensions may postpone config changes until the card * is open (to pipeline changes and speed-up card setup). If * tho...
false
false
false
false
false
0
setFullScreen (bool fullScreen) { setBooleanValue ("screen", "fullscreen", fullScreen); }
false
false
false
false
false
0
read_metadata_info_ready_cb (GList *files, GError *error, gpointer user_data) { ReadMetadataOpData *read_metadata = user_data; GthFileData *result; GFile *gio_file; if (error != NULL) { read_metadata->callback (G_OBJECT (read_metadata->file_source), error, read_metadata-...
false
false
false
false
false
0
led_exit(void) { unsigned int i; for (i = 0; i < TPACPI_LED_NUMLEDS; i++) { if (tpacpi_leds[i].led_classdev.name) led_classdev_unregister(&tpacpi_leds[i].led_classdev); } flush_workqueue(tpacpi_wq); kfree(tpacpi_leds); }
false
false
false
false
false
0
h_endcritical(OMPragma* p, ostream& os) { OMPRegion* r = RTop(p); int n = RExit(p); if ( p->name[0] != '$' ) { string cname = p->find_sub_name(); if ( cname != r->sub_name ) { cerr << infile << ":" << r->begin_first_line << ": ERROR: missing end critical(" << r->sub_name ...
false
false
false
false
false
0
empty_msg_lists(void) { Msg *msg; #ifndef NO_WAP if (gwlist_len(incoming_wdp) > 0 || gwlist_len(outgoing_wdp) > 0) warning(0, "Remaining WDP: %ld incoming, %ld outgoing", gwlist_len(incoming_wdp), gwlist_len(outgoing_wdp)); info(0, "Total WDP messages: received %ld, sent %ld", ...
false
false
false
false
false
0
afr_sh_entry_impunge_subvol (call_frame_t *frame, xlator_t *this) { afr_private_t *priv = NULL; afr_local_t *local = NULL; afr_self_heal_t *sh = NULL; int32_t active_src = 0; priv = this->private; local = frame->local; sh = &local->self_heal; ...
false
false
false
false
false
0
mul(const char *endpoint, const char *soap_action, double a, double b, double &result) { struct soap *soap = this; struct ns2__mul soap_tmp_ns2__mul; struct ns2__mulResponse *soap_tmp_ns2__mulResponse; if (endpoint) soap_endpoint = endpoint; if (soap_endpoint == NULL) soap_endpoint = "http://websrv.cs.fsu.edu/~...
false
false
false
false
false
0
check_base(char chr,long position, int direction) { if (direction < 0) position --; if (position <0 && position >= seq_len) return new AD_ERR(); if (seq[position] != chr){ return new AD_ERR(); // beep beep } return 0; }
false
false
false
false
false
0
zr36050_control (struct videocodec *codec, int type, int size, void *data) { struct zr36050 *ptr = (struct zr36050 *) codec->data; int *ival = (int *) data; dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, size); switch (type) { case CODEC_G_...
false
false
false
false
false
0
closeGraph(graph_t * cg) { node_t *n; for (n = agfstnode(cg); n; n = agnxtnode(cg, n)) { free_list(ND_in(n)); free_list(ND_out(n)); } agclose(cg); }
false
false
false
false
false
0
setParms(float c, float b, float g) { double x0, y0, x1, y1; double startX, startY, endX, endY; currContrast = (c < -1.0) ? -1.0:c; currBrightness = b; currGamma = g; computeEndPoints(x0, y0, x1, y1); findExtremes(x0, y0, x1, y1, &startX, &startY, &endX, &endY); //...
false
false
false
false
false
0
dns_mnemonic_totext(unsigned int value, isc_buffer_t *target, struct tbl *table) { int i = 0; char buf[sizeof("4294967296")]; while (table[i].name != NULL) { if (table[i].value == value) { return (str_totext(table[i].name, target)); } i++; } snprintf(buf, sizeof(buf), "%u", value); return (str_tote...
true
true
false
false
false
1
cut_diff_writer_write_character_n_times (CutDiffWriter *writer, gchar character, guint n, CutDiffWriterTag tag) { GString *string; guint i; string = g_strin...
false
false
false
false
false
0
GetNextWord(Accessor &styler, unsigned int start, char *s, size_t sLen) { unsigned int i = 0; for (; i < sLen-1; i++) { char ch = static_cast<char>(styler.SafeGetCharAt(start + i)); if ((i == 0) && !IsAWordStart(ch)) break; if ((i > 0) && !IsAWordChar(ch)) break; s[i] = ch; } s[i] = '\0'; return s;...
false
false
false
false
false
0
blr_ebl(const char *cc, const char *suffix, char *separator, int sep_len, char* apex, int apex_len) { struct ebl_context context; char domain[128] = ""; char *p1,*p2; int ret; ast_mutex_lock(&enumlock); ast_verb(4, "blr_ebl() cc='%s', suffix='%s', c_bl='%s'\n", cc, suffix, ienum_branchlabel); if (sizeof(doma...
true
true
false
false
false
1
cf_section_alloc(const char *name1, const char *name2, CONF_SECTION *parent) { size_t name1_len, name2_len = 0; char *p; CONF_SECTION *cs; if (!name1) return NULL; name1_len = strlen(name1) + 1; if (name2) name2_len = strlen(name2) + 1; p = rad_malloc(sizeof(*cs) + name1_len + name2_len); cs = (CO...
false
false
false
false
false
0
buildin_setdragon(struct script_state *st) { int type = 0; if( st->end > st->start+2 ) type = conv_num(st,& (st->stack->stack_data[st->start+2])); pc_setdragon( script_rid2sd(st), type ); return 0; }
false
false
false
false
false
0
ids_sasl_mech_supported(Slapi_PBlock *pb, const char *mech) { int i, ret = 0; char **mechs; char *dupstr; const char *str; int sasl_result = 0; sasl_conn_t *sasl_conn = (sasl_conn_t *)pb->pb_conn->c_sasl_conn; LDAPDebug( LDAP_DEBUG_TRACE, "=> ids_sasl_mech_supported\n", 0, 0, 0 ); /* sasl_listmech is...
false
false
false
false
false
0
zval_scan(zval *pz TSRMLS_DC) { Bucket *p; tail_call: if (GC_ZVAL_GET_COLOR(pz) == GC_GREY) { p = NULL; if (pz->refcount__gc > 0) { zval_scan_black(pz TSRMLS_CC); } else { GC_ZVAL_SET_COLOR(pz, GC_WHITE); if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) { zend_object_get_gc_t ge...
false
false
false
false
false
0
charmap_string_to_mask( int *ret, const char *string, charmap_t *table, char *errstring) { int len = strlen(string); int error = 0; int i; *ret = 0; for (i = 0; i < len; ++i) { int found_match; int j; char c; c = tolower(string[i]); for (j = 0, found_match = 0; table[j].key != 0; j++) { if (tabl...
false
false
false
false
false
0
int8larger(PG_FUNCTION_ARGS) { int64 arg1 = PG_GETARG_INT64(0); int64 arg2 = PG_GETARG_INT64(1); int64 result; result = ((arg1 > arg2) ? arg1 : arg2); PG_RETURN_INT64(result); }
false
false
false
false
false
0
abraca_collections_view_on_cell_edited (AbracaCollectionsView* self, GtkCellRendererText* renderer, const gchar* path, const gchar* new_text) { GtkTreeIter iter = {0}; gint type = 0; gchar* name = NULL; gchar* ns = NULL; GtkTreeModel* _tmp0_; GtkTreeModel* _tmp1_; const gchar* _tmp2_; GtkTreeIter _tmp3_ = {0}; ...
false
false
false
false
false
0
lDechainElem(lList *lp, lListElem *ep) { int i; DENTER(CULL_LAYER, "lDechainElem"); if (!lp) { LERROR(LELISTNULL); DRETURN(NULL); } if (!ep) { LERROR(LEELEMNULL); DRETURN(NULL); } if (lp->descr != ep->descr) { CRITICAL((SGE_EVENT,"Dechaining element from other list ...
false
false
false
false
false
0
homePath( const char *resource ) { if ( qstrncmp( "data", resource, 4 ) == 0 ) { if ( instance()->mDataHome.isEmpty() ) { instance()->mDataHome = instance()->homePath( "XDG_DATA_HOME", ".local/share" ); } return instance()->mDataHome; } else if ( qstrncmp( "config", resource, 6 ) == 0 ) { if (...
false
false
false
false
false
0
do_selection(int fd, unsigned int set_selection, struct v4l2_selection &vsel, v4l2_buf_type type) { struct v4l2_selection in_selection; in_selection.type = type; in_selection.target = vsel.target; if (doioctl(fd, VIDIOC_G_SELECTION, &in_selection) == 0) { if (set_selection & SelectionWidth) in_selection....
false
false
false
false
false
0
uprv_getPOSIXIDForCategory(int category) { const char* posixID = NULL; if (category == LC_MESSAGES || category == LC_CTYPE) { /* * On Solaris two different calls to setlocale can result in * different values. Only get this value once. * * We must check this first because ...
false
false
false
false
false
0
filterEvent( XEvent* ev_P ) { if( ev_P->type == ClientMessage ) { // kDebug() << "got ClientMessage"; if( ev_P->xclient.message_type != Private::manager_atom || ev_P->xclient.data.l[ 1 ] != static_cast< long >( d->selection )) return; // kDebug() << "handlin...
false
false
false
false
false
0
e_name_western_str_count_words (const gchar *str) { gint word_count; const gchar *p; word_count = 0; for (p = str; p != NULL; p = g_utf8_strchr (p, -1, ' ')) { word_count++; p = g_utf8_next_char (p); } return word_count; }
false
false
false
false
false
0
qinstance_state_set_error(lListElem *this_elem, bool set_state) { bool changed; DENTER(QINSTANCE_STATE_LAYER, "qinstance_state_set_error"); changed = qinstance_set_state(this_elem, set_state, QI_ERROR); DRETURN(changed); }
false
false
false
false
false
0
OnChar() { switch (this->Interactor->GetKeyCode()) { case 'r': case 'R': //r toggles the rubber band selection mode for mouse button 1 if (this->CurrentMode == VTKISRBP_ORIENT) { this->CurrentMode = VTKISRBP_SELECT; } else { this->CurrentMode = VT...
false
false
false
false
false
0
avdtp_getcap_cmd(struct avdtp *session, uint8_t transaction, struct seid_req *req, unsigned int size, gboolean get_all) { GSList *l, *caps; struct avdtp_local_sep *sep = NULL; unsigned int rsp_size; uint8_t err, buf[1024], *ptr = buf; uint8_t cmd; cmd = get_all ? AVDTP_GET_ALL_CAPABILITIES : AVDTP_GET_...
false
false
false
false
false
0
sound_free_dma(int chn) { if (dma_alloc_map[chn] == DMA_MAP_UNAVAIL) { /* printk( "sound_free_dma: Bad access to DMA channel %d\n", chn); */ return; } free_dma(chn); dma_alloc_map[chn] = DMA_MAP_UNAVAIL; }
false
false
false
false
false
0
m_get_context(pIIR_AttrTypeFunc a, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = get_context(a->prefix, ctxt, rstack, false, level); if (a->argument != NULL) get_context(a->argument, ctxt, rstack, false, level + 1); return p; }
false
false
false
false
false
0
oparray_cleanup(i_ctx_t *i_ctx_p) { /* esp points just below the cleanup procedure. */ es_ptr ep = esp; uint ocount_old = (uint) ep[3].value.intval; uint dcount_old = (uint) ep[4].value.intval; uint ocount = ref_stack_count(&o_stack); uint dcount = ref_stack_count(&d_st...
false
false
false
false
false
0
drag_data_received ( GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *seldata, guint info, guint time, gpointer udata // Should point to Shape_draw. ) { Chunk_chooser *chooser = (Chunk_chooser *) udata; cout << "Chunk drag_data_received" << endl; if (seldata->type == gdk_ato...
false
false
false
false
false
0
ftp_init(struct connectdata *conn) { struct SessionHandle *data = conn->data; struct FTP *ftp; if(data->reqdata.proto.ftp) return CURLE_OK; ftp = (struct FTP *)calloc(sizeof(struct FTP), 1); if(!ftp) return CURLE_OUT_OF_MEMORY; data->reqdata.proto.ftp = ftp; /* get some initial data into the ft...
false
false
false
false
false
0
drawSquare(int index, const QColor &colour) { QBrush brush(colour, Qt::SolidPattern); addRect(QRectF(qreal((index%width)*spacing), qreal((index/width)*spacing), qreal(spacing), qreal(spacing)), QPen(), brush)->setZValue(-1); }
false
false
false
false
false
0
g2_packet_clone(g2_packet_t *p) { g2_packet_t *t; if(!p) return p; t = g2_packet_alloc(); if(!t) return t; *t = *p; INIT_LIST_HEAD(&t->list); INIT_LIST_HEAD(&t->children); t->is_freeable = true; return t; }
false
false
false
false
false
0
bna_rx_sm_stop_wait(struct bna_rx *rx, enum bna_rx_event event) { switch (event) { case RX_E_FAIL: case RX_E_STOPPED: bfa_fsm_set_state(rx, bna_rx_sm_cleanup_wait); rx->rx_cleanup_cbfn(rx->bna->bnad, rx); break; case RX_E_STARTED: bna_rx_enet_stop(rx); break; default: bfa_sm_fault(event); break; }...
false
false
false
false
false
0
isscalar(int idnumber) const { if (idnumber<nvars) return (arraytype[idnumber]==scalar); else return -1; }
false
false
false
false
false
0
at76_probe(struct usb_interface *interface, const struct usb_device_id *id) { int ret; struct at76_priv *priv; struct fwentry *fwe; struct usb_device *udev; int op_mode; int need_ext_fw = 0; struct mib_fw_version *fwv = NULL; int board_type = (int)id->driver_info; udev = usb_get_dev(interface_to_usbde...
false
false
false
false
false
0
amiga_state_save(int slot) { if (slot < 0) { return 0; } if (slot >= 9) { return 0; } write_log("amiga_state_save %d\n", slot); int code = AKS_STATESAVEQUICK1 + slot * 2; inputdevice_add_inputcode(code, 1); return 1; }
false
false
false
false
false
0
createTimeZone(const UnicodeString& ID) { /* We first try to lookup the zone ID in our system list. If this * fails, we try to parse it as a custom string GMT[+-]hh:mm. If * all else fails, we return GMT, which is probably not what the * user wants, but at least is a functioning TimeZone object. ...
false
false
false
false
false
0
vimoswcscominit (vimoswcs, i, command) struct WorldCoor *vimoswcs; /* World coordinate system structure */ int i; /* Number of command (0-9) to initialize */ char *command; /* command with %s where coordinates will go */ { int lcom,icom; if (isvimoswcs(vimoswcs)) { lcom = strlen (command); if (lcom > 0...
false
false
false
false
false
0
putIterationsScfInTextEditor() { gchar buffer[BSIZE]; if(molcasScf.numberOfNDDOIterations == 0 && molcasScf.numberOfRHFIterations == 0) return; gabedit_text_insert (GABEDIT_TEXT(text), NULL, &molcasColorFore.subProgram, NULL, "Iterations\n",-1); sprintf(buffer,"* NDDO and RHF iterations\n"); ...
false
true
true
false
false
1
bfad_debugfs_write_regrd(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) { struct bfad_debug_info *regrd_debug = file->private_data; struct bfad_port_s *port = (struct bfad_port_s *)regrd_debug->i_private; struct bfad_s *bfad = port->bfad; struct bfa_s *bfa = &bfad->bfa; struct bfa_ioc_s ...
false
false
false
false
false
0
PutBit(bool on) { assert(this->CurrentBytePos < 8); if (on) { unsigned char pos = this->CurrentBytePos; unsigned char mask = (unsigned char)(0x80 >> pos); this->CurrentByte |= mask; } this->CurrentBytePos++; TryFlush(); }
false
false
false
false
false
0
simpleForm(MprTestGroup *gp, char *uri, char *formData, int expectStatus) { HttpConn *conn; MprOff contentLen; ssize len; int status; contentLen = 0; if (expectStatus <= 0) { expectStatus = 200; } if (startRequest(gp, "POST", uri) < 0) { return...
false
false
false
false
false
0
inset_bbox_YCoCg(unsigned char *mincolor, unsigned char *maxcolor) { int inset[4], mini[4], maxi[4]; inset[2] = (maxcolor[2] - mincolor[2]) - ((1 << (INSET_SHIFT - 1)) - 1); inset[1] = (maxcolor[1] - mincolor[1]) - ((1 << (INSET_SHIFT - 1)) - 1); mini[2] = ((mincolor[2] << INSET_SHIFT) + inset[2]) >> INSE...
false
false
false
false
false
0
krb5_k_make_checksum_iov(krb5_context context, krb5_cksumtype cksumtype, krb5_key key, krb5_keyusage usage, krb5_crypto_iov *data, size_t num_data) { krb5_error_code ret; krb5_data cksum_...
false
false
false
false
false
0
set_bidder_signature(struct archive_read_filter_bidder *bidder, struct program_bidder *state, const void *signature, size_t signature_len) { if (signature != NULL && signature_len > 0) { state->signature_len = signature_len; state->signature = malloc(signature_len); memcpy(state->signature, signature, signa...
false
true
false
false
false
1
ucftp_mkdir(ventry *ve, avmode_t mode) { int res; struct ucftpfs *fs = ucftp_ventry_ucftpfs(ve); struct ucftpentry *ent = ucftp_ventry_ucftpentry(ve); if(ent->node != NULL) return -EEXIST; res = ucftp_op(OP_MKD, ve); if(res < 0) return res; res = ucftp_make_node(fs...
false
false
false
false
false
0
create_the_forms() { form = new Fl_Window(550,370); strcpy(label, "Hello, world!\n"); int i = strlen(label); uchar c; for (c = ' '+1; c < 127; c++) { if (!(c&0x1f)) label[i++]='\n'; if (c=='@') label[i++]=c; label[i++]=c; } label[i++] = '\n'; for (c = 0xA1; c; c++) {if (!(c&0x1f)) label[i+...
false
false
false
false
false
0
_unlock_lock(struct dlm_rsb *r, struct dlm_lkb *lkb) { int error; if (is_remote(r)) { /* receive_unlock() calls do_unlock() on remote node */ error = send_unlock(r, lkb); } else { error = do_unlock(r, lkb); /* for remote locks the unlock_reply is sent between do_unlock and do_unlock_effects */ do_unl...
false
false
false
false
false
0
tomoyo_cred_free(struct cred *cred) { struct tomoyo_domain_info *domain = cred->security; if (domain) atomic_dec(&domain->users); }
false
false
false
false
false
0
load_files(GtkListStore * store, char * dirpath) { gtk_list_store_clear(store); GDir * dir = g_dir_open(dirpath, 0, NULL); if (!dir) { return; } const char * file; while ((file = g_dir_read_name(dir))) { char * filepath = g_build_filename(dirpath, file, NULL); if ((g_file_test(filepath, G_FILE_TEST_IS_DIR) ...
false
false
false
false
false
0
_pager_popup_cb_action_show(E_Object *obj __UNUSED__, const char *params __UNUSED__, Ecore_Event_Key *ev __UNUSED__) { if (_pager_popup_show()) _pager_popup_modifiers_set(ev->modifiers); }
false
false
false
false
false
0
SCPI_ParamNumber(scpi_t * context, scpi_number_t * value, bool_t mandatory) { bool_t result; const char * param; size_t len; size_t numlen; /* read parameter and shift to the next one */ result = SCPI_ParamString(context, &param, &len, mandatory); /* value not initializes */ if (!value...
false
false
false
false
false
0
run_match( Macro *macro, /* macro to run */ String *text, /* argument text that matched trigger/hook */ int hooknum) /* hook number */ { int ran = 0; struct Sock *callingsock = xsock; RegInfo *old; if (hooknum < 0) { /* trigger */ if (!borg) return 0; if (text && max_trig > 0 && !test_max...
false
false
false
false
false
0
psw_fill_mask(gx_device * dev, const byte * data, int data_x, int raster, gx_bitmap_id id, int x, int y, int w, int h, const gx_drawing_color * pdcolor, int depth, gs_logical_operation_t lop, const gx_clip_path * pcpath) { gx_device_vector *const vdev = (gx_de...
false
false
false
false
false
0
glfs_pwritev (struct glfs_fd *glfd, const struct iovec *iovec, int iovcnt, off_t offset, int flags) { xlator_t *subvol = NULL; int ret = -1; size_t size = -1; struct iobref *iobref = NULL; struct iobuf *iobuf = NULL; struct iovec iov = {0, }; fd_t *fd = NULL; _...
false
false
false
false
false
0
SetInformationWeak(vtkInformation* inf) { if (!this->ReferenceIsWeak) { this->SetInformation(0); } this->ReferenceIsWeak = true; if (this->Information != inf) { this->Information = inf; this->Modified(); } }
false
false
false
false
false
0
modemDIS() const { FaxParams dis_caps = FaxModem::modemDIS(); // signalling rates for (u_short i = 0; i < 4; i++) dis_caps.setBit(11+i, (discap & (0x08>>i))); if (useV34) dis_caps.setBit(FaxParams::BITNUM_V8_CAPABLE, true); // preferred ECM frame size if (conf.class1ECMFrameSize == 64) dis_cap...
false
false
false
false
false
0
Append(Dlist *l1, Dlist *l2) { if (l1 == NULL || l2 == NULL) return iError.NullPtrError("iDlist.Append"); if ((l1->Flags & CONTAINER_READONLY) || (l2->Flags & CONTAINER_READONLY)) { l1->RaiseError("iDlist.Append",CONTAINER_ERROR_READONLY,l1); return CONTAINER_ERROR_READONLY; } if (l2->E...
false
false
false
false
false
0
ColourisePHPScriptDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { if (startPos == 0) initStyle = SCE_HPHP_DEFAULT; ColouriseHTMLDoc(startPos, length, initStyle, keywordlists, styler); }
false
false
false
false
false
0
NewGF_IPMPX_MutualAuthentication() { GF_IPMPX_MutualAuthentication *ptr; GF_IPMPX_DATA_ALLOC(ptr, GF_IPMPX_MutualAuthentication, GF_IPMPX_MUTUAL_AUTHENTICATION_TAG); ptr->candidateAlgorithms = gf_list_new(); ptr->agreedAlgorithms = gf_list_new(); ptr->certificates = gf_list_new(); return (GF_IPMPX_Data *) ptr; }
false
false
false
false
false
0
rmatrixbdunpackpt(const ap::real_2d_array& qp, int m, int n, const ap::real_1d_array& taup, int ptrows, ap::real_2d_array& pt) { int i; int j; ap::ap_error::make_assertion(ptrows<=n, "RMatrixBDUnpackPT: PTRows>N!"); ap::ap_error::make_assertion(ptrows>=0, "RMatrixBDUnpackPT: PT...
false
false
false
false
false
0
GetDefinition(const char* name) const { #ifdef CMAKE_STRICT if (this->GetCMakeInstance()) { this->GetCMakeInstance()-> RecordPropertyAccess(name,cmProperty::VARIABLE); } #endif const char* def = 0; DefinitionMap::const_iterator pos = this->DefinitionStack.back().find(name); if(pos != this...
false
false
false
false
false
0
sync_persist_terminate (PRThread *tid) { SyncRequest *cur; int rc = 1; if ( SYNC_IS_INITIALIZED() && NULL != tid ) { SYNC_LOCK_READ(); /* Find and change */ cur = sync_request_list->sync_req_head; while ( NULL != cur ) { if ( cur->req_tid == tid ) { cur->req_active = PR_FALSE; cur->req_comple...
false
false
false
false
false
0
pt_write_cont(pt_Continuation *op, PRInt16 revents) { PRIntn bytes; /* * We want to write the entire amount out, no matter how many * tries it takes. Keep advancing the buffer and the decrementing * the amount until the amount goes away. Return the total bytes * (which should be the original...
false
false
false
false
false
0
exif_ifd_from_string (const char *string) { unsigned int i; if (!string) return (-1); for (i = 0; i < EXIF_IFD_COUNT; i++) { if (!strcmp (string, exif_ifd_get_name (i))) return (i); } return (-1); }
false
false
false
false
false
0
doDeserialize() { if(_reader->get().type() != cxxtools::xml::Node::StartElement) _reader->nextElement(); _processNode = &XmlDeserializer::beginDocument; _startDepth = _reader->depth(); for(cxxtools::xml::XmlReader::Iterator it = _reader->current(); it != _reader->end(); ++it) { (th...
false
false
false
false
false
0
nv04_dac_output_offset(struct drm_encoder *encoder) { struct dcb_output *dcb = nouveau_encoder(encoder)->dcb; int offset = 0; if (dcb->or & (8 | DCB_OUTPUT_C)) offset += 0x68; if (dcb->or & (8 | DCB_OUTPUT_B)) offset += 0x2000; return offset; }
false
false
false
false
false
0
luaB_setfenv (lua_State *L) { luaL_checktype(L, 2, LUA_TTABLE); getfunc(L, 0); lua_pushvalue(L, 2); if (lua_isnumber(L, 1) && lua_tonumber(L, 1) == 0) { /* change environment of current thread */ lua_pushthread(L); lua_insert(L, -2); lua_setfenv(L, -2); return 0; } else if (lua_iscfuncti...
false
false
false
false
false
0
ael2005_get_module_type(struct cphy *phy, int delay_ms) { int v; unsigned int stat; v = t3_mdio_read(phy, MDIO_MMD_PMAPMD, AEL2005_GPIO_CTRL, &stat); if (v) return v; if (stat & (1 << 8)) /* module absent */ return phy_modtype_none; return ael2xxx_get_module_type(phy, delay_ms); }
false
false
false
false
false
0
ade7754_initial_setup(struct iio_dev *indio_dev) { int ret; struct ade7754_state *st = iio_priv(indio_dev); struct device *dev = &indio_dev->dev; /* use low spi speed for init */ st->us->mode = SPI_MODE_3; spi_setup(st->us); /* Disable IRQ */ ret = ade7754_set_irq(dev, false); if (ret) { dev_err(dev, "disa...
false
false
false
false
false
0
prepare_enc_data(unsigned char *indata, int indata_len, unsigned char **outdata, int *outdata_len) { int retval = -1; ASN1_const_CTX c; long length = indata_len; int Ttag, Tclass; long Tlen; c.pp = (const unsigned char **)&indata; c.q = *(c...
false
false
false
false
false
0
sexp_to_key (gcry_sexp_t sexp, int want_private, const char *override_elems, gcry_mpi_t **retarray, gcry_module_t *retalgo) { gcry_err_code_t err = 0; gcry_sexp_t list, l2; char *name; const char *elems; gcry_mpi_t *array; gcry_module_t module; gcry_pk_spec_t *pubkey; pk_extra_spec_t *extra...
false
false
false
false
false
0
eval (bool evaluate) { VALUE *l; VALUE *r; #ifdef EVAL_TRACE trace ("eval"); #endif l = eval1 (evaluate); while (1) { if (nextarg ("|")) { r = eval1 (evaluate && null (l)); if (null (l)) { freev (l); l = r; if (null (...
false
false
false
false
false
0
constrainOperandRegClass(const MCInstrDesc &II, unsigned Op, unsigned OpNum) { if (TargetRegisterInfo::isVirtualRegister(Op)) { const TargetRegisterClass *RegClass = TII.getRegClass(II, OpNum, &TRI, *FuncInfo.MF); if (!MRI.constrainRegClass(Op, RegClass)) { ...
false
false
false
false
false
0