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
bluetooth_chooser_get_selected_device_info (BluetoothChooser *self, const char *field, GValue *value) { BluetoothChooserPrivate *priv = BLUETOOTH_CHOOSER_GET_PRIVATE(self); GEnumClass *eclass; GEnumValue *ev; GtkTreeIter iter; g_return_val_if_fail (field != NULL, FALSE); if (gtk_tree_selection...
false
false
false
false
false
0
mapper_next_mapping(Mapper *mapper) { if (!mapper) return set_errnull(EINVAL); mapper->chain_index = mapper->next_chain_index; mapper->item_index = mapper->next_item_index; return (Mapping *)list_item_unlocked(mapper->map->chain[mapper->chain_index], mapper->item_index); }
false
false
false
false
false
0
SplitVecRes_UnaryOp(SDNode *N, SDValue &Lo, SDValue &Hi) { // Get the dest types - they may not match the input types, e.g. int_to_fp. EVT LoVT, HiVT; SDLoc dl(N); std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0)); // If the input also splits, handle it...
false
false
false
false
false
0
HttpProxyValidate(xstring_c *p) { ParsedURL url(*p); if(url.host==0) { p->truncate(0); return 0; } if(url.proto) { if(strcmp(url.proto,"http") && strcmp(url.proto,"https")) return _("Proxy protocol unsupported"); } return 0; }
false
false
false
false
false
0
bt_ctf_field_floating_point_set_value(struct bt_ctf_field *field, double value) { int ret = 0; struct bt_ctf_field_floating_point *floating_point; if (!field || bt_ctf_field_type_get_type_id(field->type) != CTF_TYPE_FLOAT) { ret = -1; goto end; } floating_point = container_of(field, struct bt_ctf_field...
false
false
false
false
false
0
addTimeout(int nextTimeout) { /* We need to set the counter to the idle time + the value * requested for next timeout */ // If there's already an alarm for the requested timeout, skip if (m_timeoutAlarm.contains(nextTimeout)) { return; } XSyncValue timeout; XSyncAlarm newalar...
false
false
false
false
false
0
_account_removed_cb (GoaClient *client, GoaObject *object, McpAccountManagerGoa *self) { GoaAccount *account = goa_object_peek_account (object); char *name = get_tp_account_name (account); if (name == NULL) return; if (self->priv->ready) g_signal_emit_by_name (self, "deleted", name); g_hash...
false
false
false
false
false
0
i40e_dcbnl_ieee_getets(struct net_device *dev, struct ieee_ets *ets) { struct i40e_pf *pf = i40e_netdev_to_pf(dev); struct i40e_dcbx_config *dcbxcfg; struct i40e_hw *hw = &pf->hw; if (!(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) return -EINVAL; dcbxcfg = &hw->local_dcbx_config; ets->willing = dcbxcfg->etscf...
false
true
false
false
false
1
gfs_event_filter_event (GfsEvent * event, GfsSimulation * sim) { if ((* GFS_EVENT_CLASS (GTS_OBJECT_CLASS (gfs_event_filter_class ())->parent_class)->event) (event, sim)) { GfsEventFilter * f = GFS_EVENT_FILTER (event); f->tmp = gfs_temporary_variable (GFS_DOMAIN (sim)); gfs_domain_cell_traverse (...
false
false
false
false
false
0
prepare (GeglOperation *operation) { GeglChantO *o = GEGL_CHANT_PROPERTIES (operation); GeglChant *self = GEGL_CHANT (operation); /* warning: this might trigger regeneration of the graph, * for now this is evaded by just ignoring additional * requests to be made into members of the graph ...
false
false
false
false
false
0
async_refresh_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data) { ECalClient *cal_client; GError *error = NULL; GMainLoop *loop = (GMainLoop *) user_data; cal_client = E_CAL_CLIENT (source_object); if (!e_client_refresh_finish ...
false
false
false
false
false
0
fimc_isp_subdev_s_stream(struct v4l2_subdev *sd, int on) { struct fimc_isp *isp = v4l2_get_subdevdata(sd); struct fimc_is *is = fimc_isp_to_is(isp); int ret; isp_dbg(1, sd, "%s: on: %d\n", __func__, on); if (!test_bit(IS_ST_INIT_DONE, &is->state)) return -EBUSY; fimc_is_mem_barrier(); if (on) { if (__get...
false
false
false
false
false
0
finishInput(void) #else finishInput(int exitstatus, void *arg) #endif { #ifdef USE_READLINE if (useHistory && psql_history) { int hist_size; hist_size = GetVariableNum(pset.vars, "HISTSIZE", 500, -1, true); saveHistory(psql_history, hist_size, true, true); free(psql_history); psql_history = NULL; } #end...
false
false
false
false
false
0
handle_blocked_attack_firm(Unit *unitPtr) { if(action_x_loc==unitPtr->action_x_loc && action_y_loc==unitPtr->action_y_loc && action_para==unitPtr->action_para && action_mode==unitPtr->action_mode) { //------------- both attacks the same firm ------------// Location *locPtr = world.get_loc(action_x_loc, action_y...
false
false
false
false
false
0
step_terminate_monitor_stop(void) { pthread_mutex_lock(&lock); if (!running_flag) { pthread_mutex_unlock(&lock); return; } if (stop_flag) { error("step_terminate_monitor_stop: already stopped"); pthread_mutex_unlock(&lock); return; } stop_flag = 1; debug("step_terminate_monitor_stop signalling condit...
false
false
false
false
false
0
ecs_tab_int__inverse(ecs_tab_int_t *this_tab) { size_t itab ; ecs_int_t * val_tab; /*xxxxxxxxxxxxxxxxxxxxxxxxxxx Instructions xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ assert(this_tab->nbr != 0); assert(this_tab->val != NULL); ECS_MALLOC(val_tab, this_tab->nbr, ecs_int_t); for (itab = 0; itab < this...
false
false
false
false
false
0
thread_destroy( ) { Condition_Destroy( &thread_sNum_cond ); }
false
false
false
false
false
0
preferences_set_column_visible(preferences_t * prefs, preference_field_e id, int visible) { size_t i; for (i = 0; i < num_visible_fields; i++) { if (prefs->fields[i].id == id) { prefs->fields[i].visible = visible; return; } } assert(0); }
false
false
false
false
false
0
decide_watch_type (GUnixMountEntry *mount, gboolean is_home_trash) { const gchar *fs_type; fs_type = g_unix_mount_get_fs_type (mount); if (strcmp (fs_type, "nfs") == 0) return TRASH_WATCHER_WATCH; else return TRASH_WATCHER_TRUSTED; }
false
false
false
false
false
0
rerror(sym1,mess,sym2) truc sym1, sym2; char *mess; { char *st = "terminal input"; char *sf = "loaded file"; wtruc src; if(inpsource == STRINGINPUT) strcopy(OutBuf,"error while reading from string"); else if(inpsource == READLNINPUT) strcopy(OutBuf,"error in function readln"); e...
false
false
false
false
false
0
mlx4_buddy_free(struct mlx4_buddy *buddy, u32 seg, int order) { seg >>= order; spin_lock(&buddy->lock); while (test_bit(seg ^ 1, buddy->bits[order])) { clear_bit(seg ^ 1, buddy->bits[order]); --buddy->num_free[order]; seg >>= 1; ++order; } set_bit(seg, buddy->bits[order]); ++buddy->num_free[order]; s...
false
false
false
false
false
0
encrypt_request_start(unsigned char *data, int cnt) { if (encrypt_mode == 0) { if (Server) autoencrypt = 1; return; } encrypt_start_output(encrypt_mode); }
false
false
false
false
false
0
gst_matroska_demux_push_flac_codec_priv_data (GstMatroskaDemux * demux, GstMatroskaTrackContext * stream) { GstFlowReturn ret; guint8 *pdata; guint off, len; GST_LOG_OBJECT (demux, "priv data size = %u", stream->codec_priv_size); pdata = (guint8 *) stream->codec_priv; /* need at least 'fLaC' marker +...
false
false
false
false
false
0
_evry_cb_free_plugin_selected(void *data __UNUSED__, void *event) { Evry_Event_Item_Selected *ev = event; evry_item_free(ev->item); E_FREE(ev); }
false
false
false
false
false
0
namehash_from_uid(PKT_user_id *uid) { if(uid->namehash==NULL) { uid->namehash=xmalloc(20); if(uid->attrib_data) rmd160_hash_buffer(uid->namehash,uid->attrib_data,uid->attrib_len); else rmd160_hash_buffer(uid->namehash,uid->name,uid->len); } return uid->namehash; }
false
false
false
false
false
0
Scanner_skip_line(Scanner * s) { char c; int done = 0; Clear(s->text); Setfile(s->text, Getfile(s->str)); Setline(s->text, s->line); while (!done) { if ((c = nextchar(s)) == 0) return; if (c == '\\') { c = nextchar(s); } else if (c == '\n') { done = 1; } } return; }
false
false
false
false
false
0
countlevels (lua_State *L) { lua_Debug ar; int li = 1, le = 1; /* find an upper bound */ while (lua_getstack(L, le, &ar)) { li = le; le *= 2; } /* do a binary search */ while (li < le) { int m = (li + le)/2; if (lua_getstack(L, m, &ar)) li = m + 1; else le = m; } return le - 1; }
false
false
false
false
false
0
na_tray_applet_style_updated (GtkWidget *widget) { NaTrayApplet *applet = NA_TRAY_APPLET (widget); GtkStyleContext *context; GdkRGBA rgba; GdkColor fg; GdkColor error; GdkColor warning; GdkColor success; gint padding; gint icon_size; ...
false
false
false
false
false
0
option_was_set(name) char_u *name; { int idx; idx = findoption(name); if (idx < 0) /* unknown option */ return FALSE; if (options[idx].flags & P_WAS_SET) return TRUE; return FALSE; }
false
false
false
false
false
0
gtk_plot_export_ps (GtkPlot *plot, char *psname, GtkPlotPageOrientation orient, gboolean epsflag, ...
false
false
false
false
false
0
operator*(FieldElement s, const FieldMatrix& m) { FieldMatrix ret=m; for(int i=0;i<ret.getHeight();i++) ret[i]=s*ret[i]; return ret; }
false
false
false
false
false
0
build_model (XML_Parser parser) { XML_Content *ret; XML_Content *cpos; char * str; int allocsize = dtd.scaffCount * sizeof(XML_Content) + dtd.contentStringLen; ret = MALLOC(allocsize); if (! ret) return 0; str = (char *) (&ret[dtd.scaffCount]); cpos = &ret[1]; build_node(parser, 0, ret, &cpo...
false
false
false
false
false
0
process_cmdline(char **anArgv) { lList *alp, *pcmdline; lListElem *aep; u_long32 help = 0; DENTER(TOP_LAYER, "process_cmdline"); alp = pcmdline = NULL; alp = parse_cmdline_qmaster(&anArgv[1], &pcmdline); if(alp) { /* ** high level parsing error! show answer list */ for_ea...
false
false
false
false
true
1
ofs_write(TDB_CONTEXT *tdb, tdb_off offset, tdb_off *d) { tdb_off off = *d; return tdb_write(tdb, offset, CONVERT(off), sizeof(*d)); }
false
false
false
false
false
0
fpixaDestroy(FPIXA **pfpixa) { l_int32 i; FPIXA *fpixa; PROCNAME("fpixaDestroy"); if (pfpixa == NULL) { L_WARNING("ptr address is NULL!\n", procName); return; } if ((fpixa = *pfpixa) == NULL) return; /* Decrement the refcount. If it is 0, destroy the pixa. */ ...
false
false
false
false
false
0
StartConnect(const SocksHostAddress &dest_host) { QByteArray verif_bytes = _verif_key->GetByteArray(); QByteArray packet = TcpStartPacket(verif_bytes, dest_host).ToByteArray(); // Start the connection _conn_id = _hash_algo->ComputeHash(verif_bytes); emit ProxyConnected(); _state = ConnState_...
false
false
false
false
false
0
cli_cmd_volume_gsync_set_cbk (struct cli_state *state, struct cli_cmd_word *word, const char **words, int wordcount) { int ret = 0; int parse_err = 0; dict_t *options = NULL; rpc_clnt_procedure_t...
false
false
false
false
false
0
antigray(void *data, struct taskinfo *task, int r1, int r2) { struct filter *f = (struct filter *) data; struct image *srci = f->childimage, *desti = f->image; struct antidata *s = (struct antidata *) f->data; register unsigned char *src; unsigned char *destend, *dest; unsigned int ystart, y; ...
false
false
false
false
false
0
ssl3_GatherData(sslSocket *ss, sslGather *gs, int flags) { unsigned char *bp; unsigned char *lbp; int nb; int err; int rv = 1; PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); if (gs->state == GS_INIT) { gs->state = GS_HEADER; gs->remainde...
false
false
false
false
false
0
EffectEnchantItemPrismatic(SpellEffectIndex eff_idx) { if (m_caster->GetTypeId() != TYPEID_PLAYER) return; if (!itemTarget) return; Player* p_caster = (Player*)m_caster; uint32 enchant_id = m_spellInfo->EffectMiscValue[eff_idx]; if (!enchant_id) return; SpellItemEnchan...
false
false
false
false
false
0
setAttribute(Attribute attr, bool b) { switch (attr) { case CheckUppercase: d->settings->setCheckUppercase(b); break; case SkipRunTogether: d->settings->setSkipRunTogether(b); break; } }
false
false
false
false
false
0
imFileLineBufferInc(imFile* ifile, int *row, int *plane) { if (!imColorModeIsPacked(ifile->file_color_mode)) { if (*row == ifile->height-1) { *row = 0; (*plane)++; return; } } (*row)++; }
false
false
false
false
false
0
format_handler(char **format_fullstring, format_details_t *details) { int state = 0; char next_input = 0; char *next_output = details->format_substring; details->format_substring[0] = '\0'; details->plain_output = -1; details->error_char = -1; next_input = **format_fullstring; (*format...
false
false
false
false
false
0
snd_m3_substream_open(struct snd_m3 *chip, struct snd_pcm_substream *subs) { int i; struct m3_dma *s; spin_lock_irq(&chip->reg_lock); for (i = 0; i < chip->num_substreams; i++) { s = &chip->substreams[i]; if (! s->opened) goto __found; } spin_unlock_irq(&chip->reg_lock); return -ENOMEM; __found: s->open...
false
false
false
false
false
0
Compile() { uint32 w[80], i, a, b, c, d, e, t; /* note that words are compiled from the buffer into 32-bit */ /* words in big-endian order so an order reversal is needed */ /* here on little endian machines */ for(i = 0; i < SHA1_BLOCK_SIZE / 4; ++i) w[i] = swap_b3...
false
false
false
false
false
0
ib_send_cm_drep(struct ib_cm_id *cm_id, const void *private_data, u8 private_data_len) { struct cm_id_private *cm_id_priv; struct ib_mad_send_buf *msg; unsigned long flags; void *data; int ret; if (private_data && private_data_len > IB_CM_DREP_PRIVATE_DATA_SIZE) return -EINVAL; data = cm_copy_pri...
false
false
false
false
false
0
_xl_remove_hash_entry(XLogRelDesc *rdesc) { Form_pg_class tpgc = rdesc->reldata.rd_rel; XLogRelCacheEntry *hentry; rdesc->lessRecently->moreRecently = rdesc->moreRecently; rdesc->moreRecently->lessRecently = rdesc->lessRecently; hentry = (XLogRelCacheEntry *) hash_search(_xlrelcache, (void *) &(rdesc->rel...
false
false
false
false
false
0
find_supporting_driver(libusb_device *udev, const struct usb_id **usb_id, uint32_t *devtype) { int ret; GSList *elem = registered_drivers; struct libusb_device_descriptor dsc; const struct usb_id *best_usb_id; struct fp_driver *best_drv; uint32_t best_devtype; int drv_score = 0; ret = libusb_get_device_descr...
false
false
false
false
false
0
RDoNoise(void) { uint32 V; //mbg merge 7/17/06 made uint32 int32 outo; uint32 amptab[2]; if(EnvUnits[2].Mode&0x1) amptab[0]=EnvUnits[2].Speed; else amptab[0]=EnvUnits[2].decvolume; //Modfiy Noise channel volume based on channel volume setting //adelikat: Note: the formulat x = x * y /100 does n...
false
false
false
false
false
0
tifm_7xx1_isr(int irq, void *dev_id) { struct tifm_adapter *fm = dev_id; struct tifm_dev *sock; unsigned int irq_status, cnt; spin_lock(&fm->lock); irq_status = readl(fm->addr + FM_INTERRUPT_STATUS); if (irq_status == 0 || irq_status == (~0)) { spin_unlock(&fm->lock); return IRQ_NONE; } if (irq_status & T...
false
false
false
false
false
0
xmms_collection_media_match_operand (xmms_coll_dag_t *dag, GHashTable *mediainfo, xmmsv_coll_t *coll, guint nsid, GHashTable *match_table) { xmmsv_coll_t *op; xmmsv_t *tmp; gboolean match = FALSE; if (xmmsv_list_get (xmmsv_coll_operands_get ...
false
false
false
false
false
0
GetNthWindowLevelPreset( int idx, double *w, double *l) { if (this->Internals && idx >= 0 && idx < this->GetNumberOfWindowLevelPresets()) { *w = this->Internals->WindowLevelPresetPool[idx].Window; *l = this->Internals->WindowLevelPresetPool[idx].Level; return 1; } return 0; }
false
false
false
false
false
0
tls_start_clienttls(unsigned *layer, char **authid) { int sts; const SSL_CIPHER *cipher; X509 *peer; if (verbose==1) printf("setting up TLS connection\n"); if (tls_conn == NULL) { tls_conn = (SSL *) SSL_new(tls_ctx); } if (tls_conn == NULL) { printf("Could not allocate 'co...
false
false
false
false
false
0
bnx2fc_send_session_disable_req(struct fcoe_port *port, struct bnx2fc_rport *tgt) { struct bnx2fc_interface *interface = port->priv; struct fcoe_ctlr *ctlr = bnx2fc_to_ctlr(interface); struct bnx2fc_hba *hba = interface->hba; struct fcoe_kwqe_conn_enable_disable disable_req; struct kwqe *kwqe_arr[2]; stru...
false
false
false
false
false
0
isFileExists(const QString &absPath) { if (QFile(absPath).exists()) return QDir::cleanPath(absPath); return QString(); }
false
false
false
false
false
0
lengthFunc(sqlite_func *context, int argc, const char **argv){ const char *z; int len; assert( argc==1 ); z = argv[0]; if( z==0 ) return; #ifdef SQLITE_UTF8 for(len=0; *z; z++){ if( (0xc0&*z)!=0x80 ) len++; } #else len = strlen(z); #endif sqlite_set_result_int(context, len); }
false
false
false
false
false
0
lowerFCOPYSIGN64(SDValue Op, SelectionDAG &DAG, bool HasExtractInsert) { unsigned WidthX = Op.getOperand(0).getValueSizeInBits(); unsigned WidthY = Op.getOperand(1).getValueSizeInBits(); EVT TyX = MVT::getIntegerVT(WidthX), TyY = MVT::getIntegerVT(WidthY); SDLoc DL(Op); SDValue...
false
false
false
false
false
0
slotInfoMessage(KJob* kio_job, const QString& msg) { assert(d->m_job == kio_job); Q_ASSERT(kio_job); Q_UNUSED(kio_job); if (!parentPart()) setStatusBarText(msg, BarDefaultText); }
false
false
false
false
false
0
gsslrtma_removing_cb(GncSxInstanceModel *instances, SchedXaction *to_remove_sx, gpointer user_data) { GncSxSlrTreeModelAdapter *model = GNC_SX_SLR_TREE_MODEL_ADAPTER(user_data); GtkTreeIter tree_iter; GList *iter; int index = 0; // get index, create path, remove for (iter = instances->sx_instanc...
false
false
false
false
false
0
ompi_osc_rdma_raccumulate(void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, OPAL_PTRDIFF_TYPE target_disp, int target_count, struct ompi_datatype_t *target_dt, struct ompi_op_t *op, ...
false
false
false
false
false
0
stk8312_otp_init(struct stk8312_data *data) { int ret; int count = 10; struct i2c_client *client = data->client; ret = i2c_smbus_write_byte_data(client, STK8312_REG_OTPADDR, 0x70); if (ret < 0) goto exit_err; ret = i2c_smbus_write_byte_data(client, STK8312_REG_OTPCTRL, 0x02); if (ret < 0) goto exit_err; d...
false
false
false
false
false
0
fl_show_message(const char *q1,const char *q2,const char *q3) { fl_message("%s\n%s\n%s", q1?q1:"", q2?q2:"", q3?q3:""); }
false
false
false
false
false
0
auto_apt_conf_var(char *name, char *def) { char *p = getenv(name); if (p == NULL) return def; if (*p == '\0') return def; return p; }
false
false
false
false
false
0
event_whois_realhost338(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *arg1, *arg2, *arg3; g_return_if_fail(data != NULL); /* * :<server> 338 <yournick> <nick> <user>@<host> <ip> :Actual user@host, actual IP * (ircu) or * :<server> 338 <yournick> <nick> <ip> :actually using host * (ratbo...
false
false
false
false
false
0
gf_bs_align(GF_BitStream *bs) { u8 res = 8 - bs->nbBits; if ( (bs->bsmode == GF_BITSTREAM_READ) || (bs->bsmode == GF_BITSTREAM_FILE_READ)) { if (res > 0) { gf_bs_read_int(bs, res); } return res; } if (bs->nbBits > 0) { gf_bs_write_int (bs, 0, res); return res; } return 0; }
false
false
false
false
false
0
proc_finished(int exitCode) { diagnosticText += QString("GPG Process Finished: exitStatus=%1\n").arg(exitCode); ensureDTextEmit(); processResult(exitCode); }
false
false
false
false
false
0
get_char_class(pp) char_u **pp; { static const char *(class_names[]) = { "alnum:]", #define CLASS_ALNUM 0 "alpha:]", #define CLASS_ALPHA 1 "blank:]", #define CLASS_BLANK 2 "cntrl:]", #define CLASS_CNTRL 3 "digit:]", #define CLASS_DIGIT 4 "graph:]", #define CLASS_GRAPH 5 "lower:]", #define CLASS_LOWER...
false
false
false
false
false
0
ReadImageInfo(VP8LBitReader* const br, int* const width, int* const height, int* const has_alpha) { if (VP8LReadBits(br, 8) != VP8L_MAGIC_BYTE) return 0; *width = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1; *height = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1; *...
false
false
false
false
false
0
draw_caravan_categories(WINDOW *w, int category_selected, int total_price, int cash) { // Clear the window for (int i = 1; i <= 10; i++) mvwprintz(w, i, 1, c_black, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); mvwprintz(w, 1, 1, c_white, "Your Cash:%s%d", (cash >= 10000 ? " " :...
false
false
false
false
false
0
Upload(const unsigned char * buffer, unsigned long size, unsigned long address) { unsigned long c=0; if (InitGSComms()) return 1; ReadWriteByte(2); ReadWrite32(address); ReadWrite32(size); for (c=0; c < size; c++) ReadWriteByte(buffer[c]); for ...
false
false
false
false
false
0
equiv_init_varies_p (x) rtx x; { RTX_CODE code = GET_CODE (x); int i; const char *fmt; switch (code) { case MEM: return ! RTX_UNCHANGING_P (x) || equiv_init_varies_p (XEXP (x, 0)); case QUEUED: return 1; case CONST: case CONST_INT: case CONST_DOUBLE: case CONST_VE...
false
false
false
false
false
0
IsSharedRelation(Oid relationId) { /* These are the shared catalogs (look for BKI_SHARED_RELATION) */ if (relationId == AuthIdRelationId || relationId == AuthMemRelationId || relationId == DatabaseRelationId || relationId == PLTemplateRelationId || relationId == SharedDescriptionRelationId || relationId == ...
false
false
false
false
false
0
gst_structure_get_value (const GstStructure * structure, const gchar * fieldname) { GstStructureField *field; g_return_val_if_fail (structure != NULL, NULL); g_return_val_if_fail (fieldname != NULL, NULL); field = gst_structure_get_field (structure, fieldname); if (field == NULL) return NULL; ret...
false
false
false
false
false
0
get_pf2_tile_info(int tile_index) { data32_t tile=deco32_pf2_data[tile_index]; data8_t colour=(tile>>12)&0xf; data8_t flags=0; if (tile&0x8000) { if ((deco32_pf12_control[6]>>8)&0x01) { flags|=TILE_FLIPX; colour&=0x7; } if ((deco32_pf12_control[6]>>8)&0x02) { flags|=TILE_FLIPY; colou...
false
false
false
false
false
0
Binits(Biobuf *bp, int f, int mode, unsigned char *p, int size) { p += Bungetsize; /* make room for Bungets */ size -= Bungetsize; switch(mode&~(OCEXEC|ORCLOSE|OTRUNC)) { default: fprint(2, "Bopen: unknown mode %d\n", mode); return Beof; case OREAD: bp->state = Bractive; bp->ocount = 0; break; case ...
false
false
false
false
false
0
numaInterpolateEqxInterval(l_float32 startx, l_float32 deltax, NUMA *nasy, l_int32 type, l_float32 x0, l_float32 x1, l_int32 npts, ...
false
false
false
false
false
0
choose_mult_variant (enum machine_mode mode, HOST_WIDE_INT val, struct algorithm *alg, enum mult_variant *variant, int mult_cost) { struct algorithm alg2; struct mult_cost limit; int op_cost; bool speed = optimize_insn_for_speed_p (); /* Fail quickly for impossible bounds. */ if (mult_cost <...
false
false
false
false
false
0
Type_LUTB2A_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag) { cmsUInt8Number inputChan; // Number of input channels cmsUInt8Number outputChan; // Number of output channels cmsUInt32Number BaseOffset; // ...
false
false
false
false
false
0
layoutChanged() { KMahjonggLayout * selLayout = layoutMap.value(layoutList->currentItem()->text()); //Sanity checkings. Should not happen. if (!selLayout) return; if (selLayout->path()==kcfg_Layout->text()) { return; } QString authstr("Author"); QString contactstr("AuthorEmail");...
false
false
false
false
false
0
remove_wizard_from_generic_toolbar(void) { if (glatex_wizard_generic_toolbar_item != NULL) { gtk_widget_destroy(GTK_WIDGET(glatex_wizard_generic_toolbar_item)); glatex_wizard_generic_toolbar_item = NULL; } }
false
false
false
false
false
0
seg_coda_ctype(const cst_item *seg, const char *ctype) { const cst_item *s; const cst_phoneset *ps = item_phoneset(seg); for (s=item_last_daughter(item_parent(item_as(seg,"SylStructure"))); s; s=item_prev(s)) { if (cst_streq("+",phone_feature_string(ps,item_feat_string(s,"name"), "...
false
false
false
false
false
0
FoldVBDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { int endPos = startPos + length; // Backtrack to previous line in case need to fix its fold status int lineCurrent = styler.GetLine(startPos); if (startPos > 0) { if (lineCurrent > 0) { lineCurrent--; startPos = sty...
false
false
false
false
false
0
data_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, API_PARSE *parms) { word n; word ncci; word NCCIcode; dbug(1, dprintf("data_b3_res")); ncci = (word)(Id >> 16); if (plci && ncci) { n = GET_WORD(parms[0].info); dbug(1, dprintf("free(%d)", n)); NCCIcode = ncci | (((word) a...
false
false
false
false
false
0
ucm_countChars(UCMStates *states, const uint8_t *bytes, int32_t length) { uint32_t offset; int32_t i, entry, count; uint8_t state; offset=0; count=0; state=0; if(states->countStates==0) { fprintf(stderr, "ucm error: there is no state information!\n"); return ...
false
false
false
false
false
0
parse_config_file ( char *config_file ) { configfile_t *configfile; set_defaults(&gmetad_config); configfile = dotconf_create( config_file, gmetad_options, 0, CASE_INSENSITIVE ); if (!configfile) { err_quit("Unable to open config file: %s\n", config_file); } configfile->errorhandl...
false
false
false
true
false
1
copy_until_nul(const char *field_name, Octstr *os, long *pos, long max_octets, Octstr **data) { long nul; *data = NULL; nul = octstr_search_char(os, '\0', *pos); if (nul == -1) { warning(0, "SMPP: PDU NULL terminated string (%s) has no NULL.", field_name); return -1; } if (*pos...
false
false
false
false
false
0
fr_packet_list_socket_add(fr_packet_list_t *pl, int sockfd, int proto, fr_ipaddr_t *dst_ipaddr, int dst_port, void *ctx) { int i, start; struct sockaddr_storage src; socklen_t sizeof_src; fr_packet_socket_t *ps; if (!pl || !dst_ipaddr || (dst_ipaddr->af == AF_UNSPEC)) { fr_strerror_pri...
false
false
false
false
false
0
timblogiw_streamon(struct file *file, void *priv, enum v4l2_buf_type type) { struct video_device *vdev = video_devdata(file); struct timblogiw_fh *fh = priv; dev_dbg(&vdev->dev, "%s: entry\n", __func__); if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { dev_dbg(&vdev->dev, "%s - No capture device\n", __func__); re...
false
false
false
false
false
0
print_int(FILE *f, int val) { char buf[20]; sprintf(buf, "%d", val); if (print_com) { fputc(',', f); print_col ++; } else { fprintf(f, " "); print_col = 2; } if (print_col + strlen(buf) > 70) { fprintf(f, "\n "); print_col = 2; } fputs(buf, f); print_col += strlen(buf); pri...
true
true
false
false
false
1
flickcurl_free_form(char **form, int count) { if(!form) return; /* free content which is the first key */ free(form[0]); free(form); }
false
false
false
false
false
0
iwl_mvm_rx_stats_check_trigger(struct iwl_mvm *mvm, struct iwl_rx_packet *pkt) { struct iwl_fw_dbg_trigger_tlv *trig; struct iwl_fw_dbg_trigger_stats *trig_stats; u32 trig_offset, trig_thold; if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_STATS)) return; trig = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_T...
false
false
false
false
false
0
epsilon_set_transitions (tree_t *cur_states) { if (NULL == cur_states) { return; } state_t *state; int count = 0; tree_t *new_states; tree_t *new_states_closure; ALLOC_TREE (new_states); fprintf (stderr, "Inside set transitions. before FOR_EACH\n"); FOR_EACH (cur_states, state, epsilon_state_transitions...
false
false
false
false
false
0
__schedule_frame_adjust(ulong rsp_in, struct bt_info *bt) { int i, found; ulong rsp, *up; struct syment *sp; int framesize; if (!INSTACK(rsp_in, bt)) error(FATAL, "invalid RSP: %lx bt->stackbase/stacktop: %lx/%lx cpu: %d\n", rsp_in, bt->stackbase, bt->stacktop, bt->tc->processor); if (x86_64_frames...
false
false
false
false
false
0
new_mcc_data (const char *name, krb5_mcc_data **dataptr) { krb5_error_code err; krb5_mcc_data *d; krb5_mcc_list_node *n; d = malloc(sizeof(krb5_mcc_data)); if (d == NULL) return KRB5_CC_NOMEM; err = k5_cc_mutex_init(&d->lock); if (err) { free(d); return err; } ...
false
false
false
false
false
0
AH_Job_ValueToChallengeString(const AB_VALUE *v, GWEN_BUFFER *buf) { char *p; uint32_t pos; pos=GWEN_Buffer_GetPos(buf); AB_Value_toHumanReadableString2(v, buf, 2, 0); p=GWEN_Buffer_GetStart(buf)+pos; while(*p) { if (*p=='.') { *p=','; break; } p++; } }
false
false
false
false
false
0
handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb, struct futex_q *q, union futex_key *key2, struct hrtimer_sleeper *timeout) { int ret = 0; /* * With the hb lock held, we avoid races while we process the wakeup. * We only need to hold hb (and not hb2) to ensure atomicity as the * wakeu...
false
false
false
false
false
0
iter_get_index_regions (GelETree *i1, GelETree *i2, int max1, int max2, int **reg1, int **reg2, int *l1, int *l2) { if G_UNLIKELY ( ! iter_get_index_region (i1, max1, reg1, l1)) return FALSE; if G_UNLIKELY ( ! iter_get_index_region (i2, max2, reg2, l2)) { g_free (reg1); return FALSE; } return TRUE; }
false
false
false
false
false
0
test_attr_repo__foreach(void) { int count; count = 0; cl_git_pass(git_attr_foreach( g_repo, 0, "root_test1", &count_attrs, &count)); cl_assert(count == 2); count = 0; cl_git_pass(git_attr_foreach(g_repo, 0, "sub/subdir_test1", &count_attrs, &count)); cl_assert(count == 4); /* repoattr, rootattr, subattr, n...
false
false
false
false
false
0
classify_lm_var_info_list(Block *block, Scope_lm_var_info *outer_info) { Block *bpt; Scope_lm_var_info *info, *p; info = classify_lm_var_info_list_for_one_block(block, outer_info); p = (info != NULL) ? info : outer_info; for (bpt = block->inner; bpt != NULL; bpt = bpt...
false
false
false
false
false
0
InitTranslation() { const char *charset="UTF-8"; // default recv_translate_utf8=new DirectedBuffer(DirectedBuffer::GET); recv_translate_utf8->SetTranslation(charset,true); BeNode *b_charset=metainfo_tree->lookup("encoding",BeNode::BE_STR); if(b_charset) charset=b_charset->str; recv_translate=new...
false
false
false
false
false
0