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
set_storage_via_libcall (rtx object, rtx size, rtx val, bool tailcall) { tree call_expr, fn, object_tree, size_tree, val_tree; enum machine_mode size_mode; rtx retval; /* Emit code to copy OBJECT and SIZE into new pseudos. We can then place those into new pseudos into a VAR_DECL and use them later. */ ...
false
false
false
false
false
0
init_audio_stream(bgav_demuxer_context_t * ctx, AVStream * st, int index) { bgav_stream_t * s; int i; audio_codec_map_t * map = NULL; AVCodecContext *codec= st->codec; /* Get fourcc */ for(i = 0; i < sizeof(audio_codecs)/sizeof(audio_codecs[0]); i++) { if((audio_co...
false
false
false
false
false
0
artSetMaxBytesInUse (unsigned int val) { ASSERT (maxBytesInUse > 0) ; /* can only set one time. */ ASSERT (val > 0) ; maxBytesInUse = val ; }
false
false
false
false
false
0
accept_editor(FieldEditor* e) { const String* fstring = e->text(); boolean urlflag = OpenFileChooser::urltest(fstring->string()); if (!_from_command && !urlflag) { String* path = Directory::canonical(*fstring); e->field(*path); if (chdir(*path)) { /* chdir has copied the string */ delete p...
false
false
false
false
false
0
b43_lptab_write(struct b43_wldev *dev, u32 offset, u32 value) { u32 type; type = offset & B43_LPTAB_TYPEMASK; offset &= ~B43_LPTAB_TYPEMASK; B43_WARN_ON(offset > 0xFFFF); switch (type) { case B43_LPTAB_8BIT: B43_WARN_ON(value & ~0xFF); b43_phy_write(dev, B43_LPPHY_TABLE_ADDR, offset); b43_phy_write(dev, B...
false
false
false
false
false
0
LowerSTORE(SDValue Op, SelectionDAG &DAG) { SDLoc dl(Op); StoreSDNode *St = cast<StoreSDNode>(Op.getNode()); EVT MemVT = St->getMemoryVT(); if (MemVT == MVT::f128) return LowerF128Store(Op, DAG); if (MemVT == MVT::i64) { // Custom handling for i64 stores: turn it into a bitcast and a // v2i32 st...
false
false
false
false
false
0
gst_buffer_list_iterator_add_list (GstBufferListIterator * it, GList * list) { GList *last; guint len; g_return_if_fail (it != NULL); g_return_if_fail (it->next != it->list->buffers->head); if (list == NULL) return; last = list; len = 1; while (last->next) { last = last->next; len++; } ...
false
false
false
false
false
0
inet_tcp_transmit_loop(int src_sockfd, int dest_sockfd) { char buff[1024]; ssize_t rwlen; while (1) { rwlen = inet_recv(src_sockfd, buff, sizeof(buff)); if (rwlen < 0) { pr_red_info("inet_recv"); return rwlen; } if (rwlen == 0) { break; } buff[rwlen] = 0; println("buff = %s", buff); ...
true
true
false
false
false
1
VTGen_write_RMA_GET(VTGen* gen, uint64_t* time, uint32_t opid, uint32_t tpid, uint32_t cid, uint32_t tag, uint64_t len, uint32_t sid) { VTGEN_CHECK(gen); if (VTGEN_IS_TRACE_ON(gen)) { VTBuf_Entry_RMAPutGet* new_entry; static const uint32_t length = ...
false
false
false
true
false
1
delete_porosity(int narg, char **arg) { if (narg < 4) error->all(FLERR,"Illegal delete_atoms command"); int iregion = domain->find_region(arg[1]); if (iregion == -1) error->all(FLERR,"Could not find delete_atoms region ID"); double porosity_fraction = force->numeric(FLERR,arg[2]); int seed = force->inumeric...
false
false
false
false
false
0
gf_laser_decode_au(GF_LASeRCodec *codec, u16 ESID, const char *data, u32 data_len) { GF_Err e; if (!codec || !data || !data_len) return GF_BAD_PARAM; codec->info = lsr_get_stream(codec, ESID); if (!codec->info) return GF_BAD_PARAM; codec->coord_bits = codec->info->cfg.coord_bits; codec->scale_bits = codec->info-...
false
false
false
false
false
0
initFrameData() { UT_ASSERT_HARMLESS(!static_cast<AP_FrameData*>(m_pData)); AP_FrameData* pData = new AP_FrameData(); m_pData = static_cast<void*>(pData); return (pData ? true : false); }
false
false
false
false
false
0
logResults() { LogManager::getSingleton().logMessage("----------------------Profiler Results----------------------"); for(ProfileChildren::iterator it = mRoot.children.begin(); it != mRoot.children.end(); ++it) { it->second->logResults(); } LogManager::getSingl...
false
false
false
false
false
0
HandleSwitches(int argc, char *argv[]) { int s; while ((s=xgetopt(argc,argv,"bBnNvVGgh:H:i:I:o:O:P:p:t:T:c:C:Q:q:M:m:L:l:eEs:S:!:D:d:")) != EOF) { switch (s) { case 'b': case 'B': BlackPointCompensation = TRUE; break; case 'd': case 'D'...
false
false
false
false
false
0
wl1251_rx_ack(struct wl1251 *wl) { u32 data, addr; if (wl->rx_current_buffer) { addr = ACX_REG_INTERRUPT_TRIG_H; data = INTR_TRIG_RX_PROC1; } else { addr = ACX_REG_INTERRUPT_TRIG; data = INTR_TRIG_RX_PROC0; } wl1251_reg_write32(wl, addr, data); /* Toggle buffer ring */ wl->rx_current_buffer = !wl->rx_...
false
false
false
false
false
0
II_pick_table (frame_params * fr_ps) { int table, ver, lay, bsp, br_per_ch, sfrq; ver = fr_ps->header.version; lay = fr_ps->header.layer - 1; bsp = fr_ps->header.bitrate_idx; /* decision rules refer to per-channel bitrates (kbits/sec/chan) */ if (ver == MPEG_VERSION_1) { br_per_ch = bitrates_v1[lay][b...
false
false
false
false
false
0
getDisplayLUT(unsigned long count) { DiDisplayLUT *lut = NULL; if (count <= MAX_TABLE_ENTRY_COUNT) { if ((DeviceType == EDT_Printer) || (DeviceType == EDT_Scanner)) { /* hardcopy: values are in optical density, first convert them to luminance */ double *tmp_tab = conv...
false
false
false
false
false
0
process_alarm(void) { time_t now = time((time_t *) 0); unsigned mintime = 0, nexttime; int prodtime, killtime, cnt; for (cnt = 0; cnt < MAX_PEND_JOBS; cnt++) if (pend_list[cnt].clientfrom != 0L) { struct pend_job *pj = &pend_list[cnt]; prodtime = pj->lastaction + pj->timeout - now; killtime = pro...
false
false
false
false
false
0
gravityLight(uint8_t buffer[][3], bool reset) { static int pitchid, rollid; static bool isInitialized = false; if (!isInitialized) { pitchid = logGetVarId("stabilizer", "pitch"); rollid = logGetVarId("stabilizer", "roll"); isInitialized = true; } float pitch = logGetFloat(pitchid); // -180 to 18...
false
false
false
false
false
0
round_down_ttl(time_t end_time, int ttl) { if (ttl < 15) return end_time; /* Less than 5 minutes, round to 10 second boundary */ if (ttl < 300) { end_time = end_time / 10; end_time = end_time * 10; } else { /* 5 or more minutes, round to 30 seconds */ end_time = end_time / 30; end_time = end_time * 30; ...
false
false
false
false
false
0
snd_dg00x_create_midi_devices(struct snd_dg00x *dg00x) { struct snd_rawmidi *rmidi[2]; struct snd_rawmidi_str *str; unsigned int i; int err; /* Add physical midi ports. */ err = snd_rawmidi_new(dg00x->card, dg00x->card->driver, 0, DOT_MIDI_OUT_PORTS, DOT_MIDI_IN_PORTS, &rmidi[0]); if (err < 0) return err; ...
false
false
false
false
false
0
max8998_ldo_is_enabled(struct regulator_dev *rdev) { struct max8998_data *max8998 = rdev_get_drvdata(rdev); struct i2c_client *i2c = max8998->iodev->i2c; int ret, reg, shift = 8; u8 val; ret = max8998_get_enable_register(rdev, &reg, &shift); if (ret) return ret; ret = max8998_read_reg(i2c, reg, &val); if (r...
false
false
false
false
false
0
tdb_read(struct tdb_context *tdb, tdb_off_t off, void *buf, tdb_len_t len, int cv) { if (tdb->methods->tdb_oob(tdb, off + len, 0) != 0) { return -1; } if (tdb->map_ptr) { memcpy(buf, off + (char *)tdb->map_ptr, len); } else { ssize_t ret = pread(tdb->fd, buf, len, off); if (ret != (ssize_t)len) { ...
false
false
false
false
false
0
_pack_will_run_response_msg(will_run_response_msg_t *msg, Buf buffer, uint16_t protocol_version) { uint32_t count = NO_VAL, *job_id_ptr; pack32(msg->job_id, buffer); pack32(msg->proc_cnt, buffer); pack_time(msg->start_time, buffer); packstr(msg->node_list, buffer); if (msg->preemptee_job_id) count = li...
false
false
false
false
false
0
kv_get_high_voltage_limit(struct radeon_device *rdev, int *limit) { struct kv_power_info *pi = kv_get_pi(rdev); struct radeon_clock_voltage_dependency_table *table = &rdev->pm.dpm.dyn_state.vddc_dependency_on_sclk; int i; if (table && table->count) { for (i = table->count - 1; i >= 0; i--) { if (pi->high_vo...
false
false
false
false
false
0
Plugin_FindHook(PyObject *plugin, char *name) { Hook *hook = NULL; GSList *plugin_hooks = Plugin_GetHooks(plugin); while (plugin_hooks) { if (g_strcmp0 (((Hook *)plugin_hooks->data)->name, name) == 0) { hook = (Hook *)plugin_hooks->data; break; } plugin_hooks = g_slist_next(plugin_hooks); } re...
false
false
false
false
false
0
display_archive (file) bfd *file; { bfd *arfile = (bfd *) NULL; bfd *last_arfile = (bfd *) NULL; for (;;) { bfd_set_error (bfd_error_no_error); arfile = bfd_openr_next_archived_file (file, arfile); if (arfile == NULL) { if (bfd_get_error () != bfd_error_no_more_archived_files) ...
false
false
false
false
false
0
do_local(gpasmVal r, char *name, int arity, struct pnode *parms) { struct pnode *p; state.lst.line.linetype = dir; /* like variable except it is put in TOP instead of GLOBAL */ if (state.stGlobal == state.stTop) { gperror(GPE_UNKNOWN, "Attempt to use \"local\" outside of macro"); } else { ...
false
false
false
false
false
0
slotReconfigure() { if(AppSettings->getValue("/MainWindow/VerticalTabs").toBool()) { setDockOptions(QMainWindow::AnimatedDocks | QMainWindow::AllowNestedDocks | QMainWindow::VerticalTabs); } else { setDockOptions(QMainWindow::AnimatedDocks | QMainWindow::AllowTabbedDocks | QMainWindo...
false
false
false
false
false
0
qh_refresh(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) { struct fotg210_qtd *qtd; if (list_empty(&qh->qtd_list)) qtd = qh->dummy; else { qtd = list_entry(qh->qtd_list.next, struct fotg210_qtd, qtd_list); /* * first qtd may already be partially processed. * If we come here during unlink, the ...
false
false
false
false
false
0
dvdlpcmdec_sink_event (GstPad * pad, GstEvent * event) { GstDvdLpcmDec *dvdlpcmdec; gboolean res; dvdlpcmdec = GST_DVDLPCMDEC (GST_PAD_PARENT (pad)); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_NEWSEGMENT: { gdouble rate, arate; GstFormat format; gboolean update; gint64 st...
false
false
false
false
false
0
acc_get_next (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor, krb5_creds *creds) { cc_credentials_iterator_t iter = *cursor; cc_credentials_t cred; krb5_error_code ret; int32_t error; while (1) { error = (*iter->func->next)(iter, &cred); if (error) return t...
false
false
false
false
false
0
shrinkFloorplan(apPhfig) struct phfig *apPhfig; { struct phseg *pPhseg; struct phcon *pPhcon; struct phref *pPhref; long XAB1, YAB1, XAB2, YAB2; XAB1 = apPhfig->XAB1; YAB1 = apPhfig->YAB1; XAB2 = apPhfig->XAB2; YAB2 = apPhfig->YAB2; /* Shrink the abutment-box. */ apPhfig->XAB1 += FLOOR...
false
false
false
false
false
0
xgbe_set_mac_address(struct net_device *netdev, void *addr) { struct xgbe_prv_data *pdata = netdev_priv(netdev); struct xgbe_hw_if *hw_if = &pdata->hw_if; struct sockaddr *saddr = addr; DBGPR("-->xgbe_set_mac_address\n"); if (!is_valid_ether_addr(saddr->sa_data)) return -EADDRNOTAVAIL; memcpy(netdev->dev_add...
false
false
false
false
false
0
find_matching_paren(char *str, int i,char *&contents) { // istop = matching ')' at same level, allowing for nested parens int istart = i; int ilevel = 0; while (1) { i++; if (!str[i]) break; if (str[i] == '(') ilevel++; else if (str[i] == ')' && ilevel) ilevel--; else if (str[i] == ')') bre...
false
false
false
false
false
0
add_value_to_lattice (struct ipcp_lattice *lat, tree newval, struct cgraph_edge *cs, struct ipcp_value *src_val, int src_idx, HOST_WIDE_INT offset) { struct ipcp_value *val; if (lat->bottom) return false; for (val = lat->values; val; val = val->next) if (values_equal_for_ipcp_p (val->val...
false
false
false
false
false
0
toRange() const { if (isEmpty()) return Range(); NodeImpl *start, *end; long so, eo; getRange(start, so, end, eo); return Range(Node(start), so, Node(end), eo); }
false
false
false
false
false
0
aa_replace_current_label(struct aa_label *label) { struct aa_task_ctx *ctx = current_ctx(); struct cred *new; BUG_ON(!label); if (ctx->label == label) return 0; if (current_cred() != current_real_cred()) return -EBUSY; new = prepare_creds(); if (!new) return -ENOMEM; ctx = cred_ctx(new); if (unconfi...
false
false
false
false
false
0
_bfd_elf_init_2_index_sections (bfd *output_bfd, struct bfd_link_info *info) { asection *s; /* Data first, since setting text_index_section changes _bfd_elf_link_omit_section_dynsym. */ for (s = output_bfd->sections; s != NULL; s = s->next) if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY)) == ...
false
false
false
false
false
0
xen_init_spinlocks(void) { if (!xen_pvspin) { printk(KERN_DEBUG "xen: PV spinlocks disabled\n"); return; } printk(KERN_DEBUG "xen: PV spinlocks enabled\n"); #ifdef CONFIG_QUEUED_SPINLOCKS __pv_init_lock_hash(); pv_lock_ops.queued_spin_lock_slowpath = __pv_queued_spin_lock_slowpath; pv_lock_ops.queued_spin_un...
false
false
false
false
false
0
be_isr_mcc(int irq, void *dev_id) { struct beiscsi_hba *phba; struct be_eq_entry *eqe = NULL; struct be_queue_info *eq; struct be_queue_info *mcc; unsigned int num_eq_processed; struct be_eq_obj *pbe_eq; unsigned long flags; pbe_eq = dev_id; eq = &pbe_eq->q; phba = pbe_eq->phba; mcc = &phba->ctrl.mcc_obj.c...
false
false
false
false
false
0
value_new (GUPnPDLNAValueType *type, gchar *raw) { GUPnPDLNAInfoValue *info_value = g_slice_new (GUPnPDLNAInfoValue); info_value->type = type; if (!gupnp_dlna_value_type_init (type, &info_value->value, raw)) { g_slice_free (GUPnPDLNAInfoValue, info_value); ...
false
false
false
false
false
0
perform_auto_logon(World *world) { gchar *character = NULL; gchar *password; gchar *command = NULL; GtkTreePath *path; GtkTreeIter iter; if (world->character_used == NULL || world->connection_style == NONE) { return; } path = gtk_tree_row_reference_get_path(world->character_used...
false
false
false
false
false
0
print_pid_read(struct text_object *obj, char *p, int p_max_size) { char *begin, *end, *buf = NULL; int bytes_read; asprintf(&buf, PROCDIR "/%s/io", obj->data.s); strcpy(obj->data.s, buf); free(buf); buf = readfile(obj->data.s, &bytes_read, 1); if(buf != NULL) { begin = strstr(buf, READ_ENTRY); if(begin != N...
false
true
false
false
false
1
expand_range(char a, char b, char_class_t chrclass) { do { chrclass[(int)a] = 1; } while (++a <= b); return; }
false
false
false
false
false
0
gsql_source_editor_property_set (gpointer src) { GSQL_TRACE_FUNC; GtkWidget *source = src; PangoFontDescription * font_desc; gchar * conf_string; gboolean conf_boolean; gint conf_int; conf_boolean = gsql_conf_value_get_boolean (GSQL_CONF_EDITOR_USE_SYSTEM_FONT); if (conf_boolean) conf_string = gsql_...
false
false
false
false
false
0
importPartToCurrentBin(const QString & filename) { if (!filename.isEmpty() && !filename.isNull()) { PartsBinPaletteWidget * bin = currentBin(); if (bin == NULL) return; importPart(filename, bin); } }
false
false
false
false
false
0
usage(const char *arg0, bool brief) { printf("Usage: sechecker [OPTIONS] -p profile [POLICY ...]\n"); printf(" sechecker [OPTIONS] -m module [POLICY ...]\n"); printf(" sechecker [OPTIONS] -p profile -m module [POLICY ...]\n"); printf("\n"); if (brief) { printf("\tTry %s --help for more help.\n\n", ar...
false
false
false
false
false
0
cell_in_cr (GnmCell const *cell, GnmSheetRange *sr, gboolean follow, int *px, int *py) { if (!cell) return FALSE; if (sr->sheet != cell->base.sheet || !range_contains (&sr->range, cell->pos.col, cell->pos.row)) { /* If the expression is just =X42 thenm look at X42 instead. This is because the mps ...
false
false
false
false
false
0
sumnsteps(node *p, node *left, node *rt, long a, long b) { /* sets up for each node in the tree the base sequence at that point and counts the changes. */ long i; unsigned char ns, rs, ls; if (!left) { memcpy(p->numsteps, rt->numsteps, endsite*sizeof(long)); memcpy(p->discbase, rt->discbase, endsi...
false
false
false
false
false
0
make_room_for_directories_of_df_conflicts(struct merge_options *o, struct string_list *entries) { /* If there are D/F conflicts, and the paths currently exist * in the working copy as a file, we want to remove them to * make room for the corresponding directory. Such paths will * later be processed ...
false
false
false
false
false
0
rsi_load_bootup_params(struct rsi_common *common) { struct sk_buff *skb; struct rsi_boot_params *boot_params; rsi_dbg(MGMT_TX_ZONE, "%s: Sending boot params frame\n", __func__); skb = dev_alloc_skb(sizeof(struct rsi_boot_params)); if (!skb) { rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n", __func__); ...
false
false
false
false
false
0
main() { const unsigned int high = 100, limit = 1000000; unsigned int sum = 0, c[high + 2][high + 2]; c[1][1] = 1; for (unsigned int row = 2; row < high + 2; ++row) { c[row][row] = 1; for (unsigned int column = row - 1; column > 1; --column) { c[row][column] = c[row - 1...
false
false
false
false
false
0
awtc_check_input_format(AW_window *aww) { AW_root *root = aww->get_root(); char **files = GBS_read_dir(GB_path_in_ARBLIB("import", NULL), "*.ift"); char buffer[AWTC_IMPORT_CHECK_BUFFER_SIZE+10]; GB_ERROR error = 0; int matched = -1; int first = -1; int matched_c...
false
false
false
false
false
0
ConstantFoldFP(double (*NativeFP)(double), double V, const Type *Ty) { errno = 0; V = NativeFP(V); if (errno != 0) { errno = 0; return 0; } if (Ty->isFloatTy()) return ConstantFP::get(Ty->getContext(), APFloat((float)V)); if (Ty->isDoubleTy()) return Const...
false
false
false
false
false
0
runTestMethod(svutTestMethod * test) { bool needTearDown = false; svutStatusInfo res(SVUT_STATUS_SUCCESS,"SUCCESS",test->getLocation()); //start time measurement double testStartTime = getCurrentTime(); //notify start try { //disable failIsTodo by default this->tmpFailIsTodo = false; this->context.clear()...
false
false
false
false
false
0
file_interactive(scheme *sc) { return sc->file_i==0 && sc->load_stack[0].rep.stdio.file==stdin && sc->inport->_object._port->kind&port_file; }
false
false
false
false
false
0
address_populate (EContact *card, gchar **values, EContactField field, EContactField other_field) { if (values[0]) { EContactAddress *contact_addr; gchar *temp = g_strdup (values[0]); gchar *i; for (i = temp; *i != '\0'; i++) { if (*i == '$') { *i = ...
false
false
false
false
false
0
nv_do_interrupt(struct ata_host *host, u8 irq_stat) { int i, handled = 0; for (i = 0; i < host->n_ports; i++) { handled += nv_host_intr(host->ports[i], irq_stat); irq_stat >>= NV_INT_PORT_SHIFT; } return IRQ_RETVAL(handled); }
false
false
false
false
false
0
cm_str_realloc(cm_string_t *str, size_t bufflen) /** Ensure that string object can contain at least bufflen bytes */ { if (str->bufflen < bufflen) { const size_t newbuff = 32 * (1 + (bufflen + 31) / 32); str->buffer = (char*)realloc(str->buffer, newbuff); str->bufflen = newbuff; } ...
false
false
false
false
false
0
findFile(const io::path& filename, bool isDirectory = false) const { SFileListEntry entry; entry.FullName = filename; entry.IsDirectory = isDirectory; // swap entry.FullName.replace('\\', '/'); // remove trailing slash if (entry.Name.lastChar() == '/') { entry.IsDirectory = true; entry.Name[ ...
false
false
false
false
false
0
finish_request(struct transfer_request *request) { struct http_pack_request *preq; struct http_object_request *obj_req; request->curl_result = request->slot->curl_result; request->http_code = request->slot->http_code; request->slot = NULL; /* Keep locks active */ check_locks(); if (request->headers != NULL) ...
false
false
false
false
false
0
append_file_to_cmd(GFile* gf, GString* cmd) { char* file = g_file_get_path(gf); char* quote; if(file == NULL) /* trash:// gvfs is incomplete in resolving it */ { /* we can retrieve real path from GVFS >= 1.13.3 */ if(g_file_has_uri_scheme(gf, "trash")) { GFileInfo *in...
false
false
false
false
false
0
cm_tdbusm_get_b(DBusMessage *msg, void *parent, dbus_bool_t *b) { DBusError err; dbus_error_init(&err); if (dbus_message_get_args(msg, &err, DBUS_TYPE_BOOLEAN, b, DBUS_TYPE_INVALID)) { return 0; } else { if (dbus_error_is_set(&err)) { dbus_error_free(&err); dbus_error_init(&err); } return ...
false
false
false
false
false
0
encapsulate() { int index, length; int position = 0; int new_word = TRUE; length = strlen(text_buffer); /* QUOTED IS USED TO STORE WHETHER EACH WORD WAS ENCLOSED IN QUOTES * IN THE PLAYERS COMMAND - RESET EACH WORD TO NO */ for (index = 0; index < MAX_WO...
false
false
false
false
false
0
editor_set_font(GeanyEditor *editor, const gchar *font) { gint style, size; gchar *font_name; PangoFontDescription *pfd; g_return_if_fail(editor); pfd = pango_font_description_from_string(font); size = pango_font_description_get_size(pfd) / PANGO_SCALE; font_name = g_strdup_printf("!%s", pango_font_description...
false
false
false
false
false
0
iguanair_set_tx_mask(struct rc_dev *dev, uint32_t mask) { struct iguanair *ir = dev->priv; if (mask > 15) return 4; mutex_lock(&ir->lock); ir->packet->channels = mask << 4; mutex_unlock(&ir->lock); return 0; }
false
false
false
false
false
0
setup_engine(BIO *err, const char *engine, int debug) { ENGINE *e = NULL; if (engine) { if(strcmp(engine, "auto") == 0) { BIO_printf(err,"enabling auto ENGINE support\n"); ENGINE_register_all_complete(); return NULL; } if((e = ENGINE_by_id(engine)) == NULL ...
false
false
false
false
false
0
es_opaque_ctrl (estream_t ES__RESTRICT stream, void *ES__RESTRICT opaque_new, void **ES__RESTRICT opaque_old) { if (opaque_old) *opaque_old = stream->intern->opaque; if (opaque_new) stream->intern->opaque = opaque_new; }
false
false
false
false
false
0
unpack_raw_entry(struct object_entry *obj, union delta_base *delta_base) { unsigned char *p; unsigned long size, c; off_t base_offset; unsigned shift; void *data; obj->idx.offset = consumed_bytes; input_crc32 = crc32(0, NULL, 0); p = fill(1); c = *p; use(1); obj->type = (c >> 4) & 7; size = (c & 15); shi...
false
false
false
false
false
0
do_scroll_view(struct view *view, int lines) { bool redraw_current_line = FALSE; /* The rendering expects the new offset. */ view->offset += lines; assert(0 <= view->offset && view->offset < view->lines); assert(lines); /* Move current line into the view. */ if (view->lineno < view->offset) { view->lineno =...
false
false
false
false
false
0
hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops) { struct hvc_struct *hp; if (index < 0 || index >= MAX_NR_HVC_CONSOLES) return -1; if (vtermnos[index] != -1) return -1; /* make sure no no tty has been registered in this index */ hp = hvc_get_by_index(index); if (hp) { tty_port_put(...
false
false
false
false
false
0
ocrdma_create_eq(struct ocrdma_dev *dev, struct ocrdma_eq *eq, u16 q_len) { int status; status = ocrdma_alloc_q(dev, &eq->q, OCRDMA_EQ_LEN, sizeof(struct ocrdma_eqe)); if (status) return status; status = ocrdma_mbx_create_eq(dev, eq); if (status) goto mbx_err; eq->dev = dev; ocrdma_ring_eq_db(de...
false
false
false
false
false
0
open(const char *name) { unsigned char buf[16]; close(); fd = ::open(name,O_RDWR | O_BINARY,0644); if (fd < 0) { if (errno == ENOENT) { fd = ::open(name,O_RDWR | O_CREAT | O_TRUNC | O_BINARY,0644); if (fd < 0) { bitch(BITCHERROR,"Cannot create ripmap file %s",name); return -1; } if (lseek(f...
false
false
false
false
false
0
ExecEndBitmapAnd(BitmapAndState *node) { PlanState **bitmapplans; int nplans; int i; /* * get information from the node */ bitmapplans = node->bitmapplans; nplans = node->nplans; /* * shut down each of the subscans (that we've initialized) */ for (i = 0; i < nplans; i++) { if (bitmapplans[i]) ...
false
false
false
false
false
0
think_assign_spy_own_town(int raceId, int regionId) { Town *townPtr; int townCount = town_array.size(); int townRecno = misc.random(townCount)+1; int spyCount; for( int i=town_array.size() ; i>0 ; i-- ) { if( ++townRecno > townCount ) townRecno = 1; if( town_array.is_deleted(townRecno) ) contin...
false
false
false
false
false
0
showGameParameters ( void ) { ViewFormattedText vft( "Game Parameters", writeGameParametersToString(actmap), PG_Rect( -1, -1, 500, 550 ) ); vft.Show(); vft.RunModal(); }
false
false
false
false
false
0
kbd_backlight_timeout_show(struct device *dev, struct device_attribute *attr, char *buf) { struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); u32 time; if (toshiba_kbd_illum_status_get(toshiba, &time) < 0) return -EIO; return sprintf(buf, "%i\n", time >> HCI_MISC_SHIFT); }
false
true
false
false
false
1
darray_create_ex(int cap, void (*vd)(void*)) { DArray* da = zalloc(sizeof(DArray)); da->len = 0; da->cap = (cap > 0) ? cap : DEFAULT_CAPACITY; da->items = zalloc(sizeof(void*) * da->cap); da->value_destroyer = vd; return da; }
false
false
false
false
false
0
my_missing_function_error(const LEX_STRING &token, const char *func_name) { if (token.length && is_lex_native_function (&token)) my_error(ER_FUNC_INEXISTENT_NAME_COLLISION, MYF(0), func_name); else my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", func_name); }
false
false
false
false
false
0
results_update_stats(results_t * r) { GString *string = g_string_new(""); int i, j, forms[5]; size_t diffs[5] = { 0, 0, 0, 0, 0 }; for (i = 0; i < NUM_RESULT_ITEMS; i++) { if (result_item_is_supported(r->items[i])) { const char *label; result_item_get_forms(r->items[i], forms); label = result_item_get_la...
false
false
false
false
false
0
syn_add_group(name) char_u *name; { char_u *p; /* Check that the name is ASCII letters, digits and underscore. */ for (p = name; *p != NUL; ++p) { if (!vim_isprintc(*p)) { EMSG(_("E669: Unprintable character in group name")); vim_free(name); return 0; } else if (!ASCII_ISALNUM(*p...
false
false
false
false
false
0
game_setup(game_info_t * game, int player) { ASSERT(game!=NULL); ASSERT(player==ENGINE_DEFAULT||player==ENGINE_TEST); if (false) { } else if (MatchInfo->depth > 0) { SearchInput->depth_is_limited = true; SearchInput->depth_limit = MatchInfo->depth; } else if (MatchInfo->nodes > 0) { ...
false
false
false
false
false
0
xadc_handle_event(struct iio_dev *indio_dev, unsigned int event) { const struct iio_chan_spec *chan; /* Temperature threshold error, we don't handle this yet */ if (event == 0) return; chan = xadc_event_to_channel(indio_dev, event); if (chan->type == IIO_TEMP) { /* * The temperature channel only supports...
false
false
false
false
false
0
dbg(int l, const char* msg, ...) { va_list ap; va_start(ap, msg); if (global_opts.debug_level >= l) { vfprintf(stderr,msg, ap); fflush(stderr); } va_end(ap); }
false
false
false
false
true
1
ds2482_w1_read_byte(void *data) { struct ds2482_w1_chan *pchan = data; struct ds2482_data *pdev = pchan->pdev; int result; mutex_lock(&pdev->access_lock); /* Select the channel */ ds2482_wait_1wire_idle(pdev); if (pdev->w1_count > 1) ds2482_set_channel(pdev, pchan->channel); /* Send the read byte comman...
false
false
false
false
false
0
CheckSearchMask( DcmDataset *searchMask ) // Date : March 18, 2001 // Author : Thomas Wilkens // Task : This function checks if the search mask has a correct format. It returns OFTrue if this // is the case, OFFalse if this is not the case. // Parameters : searchMask - [in] Contai...
false
false
false
false
false
0
size() const { switch (_type) { case GEARMAN_RESULT_BINARY: return value.string.size(); case GEARMAN_RESULT_BOOLEAN: return 1; case GEARMAN_RESULT_INTEGER: return sizeof(int64_t); case GEARMAN_RESULT_NULL: return 0; } return 0; }
false
false
false
false
false
0
abook_setacl(id, name, ident, rights) auth_id *id; char *name, *ident, *rights; { char dbname[256]; char *value, *acl, tmpc; int ownerlen, result = AB_FAIL; /* check permissions */ if (!(abook_rights(id, name, NULL) & ACL_ADMIN)) { return (AB_PERM); } /* make sure db exists */ ...
false
false
false
false
true
1
impl_activate (PeasActivatable *plugin) { TotemGromitPlugin *pi = TOTEM_GROMIT_PLUGIN (plugin); GtkWindow *window; pi->priv->id = -1; pi->priv->pid = -1; if (!totem_gromit_available (pi)) { //FIXME #if 0 g_set_error_literal (error, TOTEM_PLUGIN_ERROR, TOTEM_PLUGIN_ERROR_ACTIVATION, ...
false
false
false
false
false
0
isGrounded(ConnectorItem * c1, ConnectorItem * c2) { QList<ConnectorItem *> connectorItems; if (c1 != NULL) { connectorItems.append(c1); } if (c2 != NULL) { connectorItems.append(c2); } collectEqualPotential(connectorItems, true, ViewGeometry::NoFlag); foreach (ConnectorItem * end, connectorItems) { if (e...
false
false
false
false
false
0
pcxhr_threaded_irq(int irq, void *dev_id) { struct pcxhr_mgr *mgr = dev_id; int i, j; struct snd_pcxhr *chip; mutex_lock(&mgr->lock); if (mgr->src_it_dsp & PCXHR_IRQ_TIMER) { /* is a 24 bit counter */ int dsp_time_new = PCXHR_INPL(mgr, PCXHR_PLX_MBOX4) & PCXHR_DSP_TIME_MASK; int dsp_time_diff = dsp_time_...
false
false
false
false
false
0
gvfs_udisks2_drive_stop (GDrive *_drive, GMountUnmountFlags flags, GMountOperation *mount_operation, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer ...
false
false
false
false
false
0
get_env_user(void) { const char *user = getenv("USER"); if(user == NULL) user = getenv("LOGNAME"); if(user == NULL) user = getenv("USERNAME"); return user; }
false
false
false
false
false
0
gda_meta_struct_get_db_object (GdaMetaStruct *mstruct, const GValue *catalog, const GValue *schema, const GValue *name) { GdaMetaDbObject *dbo; GValue *icatalog = NULL, *ischema = NULL, *iname = NULL; /* GValue with identifiers ready to be compared */ g_return_val_if_fail (GDA_IS_META_STRUCT (mstruct), NULL); g_re...
false
false
false
false
false
0
CreateCSV( AllData& alldata ) { bool error= false; /* start runtime measurement for creating CSV output */ StartMeasurement( alldata, 1, true, "produce CSV output" ); VerbosePrint( alldata, 1, true, "producing CSV output\n" ); /* compose output file name */ string csv_file_name= alldata.para...
false
false
false
false
false
0
root_timer( int n_counter ) { int n_duration; n_duration = m_p_n_root_target[ n_counter ] - m_p_n_root_count[ n_counter ]; if( n_duration < 1 ) { n_duration += 0x10000; } if( n_counter == 0 ) { n_duration *= 1200; } else if( n_counter == 1 && ( m_p_n_root_mode[ n_counter ] & ( 1 << 0x08 ) )...
false
false
false
false
false
0
ecryptfs_destroy_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat) { struct ecryptfs_key_sig *key_sig, *key_sig_tmp; if (crypt_stat->tfm) crypto_free_ablkcipher(crypt_stat->tfm); if (crypt_stat->hash_tfm) crypto_free_hash(crypt_stat->hash_tfm); list_for_each_entry_safe(key_sig, key_sig_tmp, &crypt_stat->...
false
false
false
false
false
0
memory_usage() { bigint bytes = 0; if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); if (atom->memcheck("type")) bytes += memory->usage(type,nmax); if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("...
false
false
false
false
false
0
setWidth(void) { AplusModel *pModel = (AplusModel *)model(); if (pModel!=0 && pModel->aplusVar()!=0) { int width = pModel->pAVarData()->colWidth(); if (width<0) // width has not been set { // Set value width to 0, which will set it // to the length of the longest option string // value...
false
false
false
false
false
0