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 |
|---|---|---|---|---|---|---|
d_listnoun(void)
{
int i;
int len;
writestr(" NOUN ");padout(SEPLENG-6);writeln(" LOCATION ");
writestr(" ------");padout(SEPLENG-6);writeln(" ----------");
writeln("");
len=SEPLENG-print_objid(1);
padout(len);
writestr("[");
print_objid(loc);
writeln("]");
nounloop(i) {
le... | false | false | false | false | false | 0 |
set_av_transport_uri_cb (GUPnPService *service,
GUPnPServiceAction *action,
BognorAvTransport *transport)
{
BognorAvTransportPrivate *priv = transport->priv;
struct _set_av_transport_uri_data data;
GUPnPDIDLLiteParser *parser;
char *uri, *metadata... | false | false | false | false | false | 0 |
_dxfField_GetType(Field f, Type *t, Category *c, int *rank, int *shape)
{
Array a = (Array) DXGetComponentValue(f, "data");
if (!a)
return NULL;
return DXGetType((Object)a, t, c, rank, shape);
} | false | true | false | false | false | 1 |
SyByteFind2(const char *zStr, sxu32 nLen, sxi32 c, sxu32 *pPos)
{
const char *zIn = zStr;
const char *zEnd;
zEnd = &zIn[nLen - 1];
for( ;; ){
if( zEnd < zIn ){ break; } if( zEnd[0] == c ){ if( pPos ){ *pPos = (sxu32)(zEnd - zIn);} return SXRET_OK; } zEnd--;
if( zEnd < zIn ){ break; } if( zEnd[0] == c ){ if( ... | false | false | false | false | false | 0 |
nv04_dfp_disable(struct drm_device *dev, int head)
{
struct nv04_crtc_reg *crtcstate = nv04_display(dev)->mode_reg.crtc_reg;
if (NVReadRAMDAC(dev, head, NV_PRAMDAC_FP_TG_CONTROL) &
FP_TG_CONTROL_ON) {
/* digital remnants must be cleaned before new crtc
* values programmed. delay is time for the vga stuff
... | false | false | false | false | false | 0 |
soap_in_PointerTo_wsrm__SequenceAcknowledgement_Final(struct soap *soap, const char *tag, struct _wsrm__SequenceAcknowledgement_Final **a, const char *type)
{
if (soap_element_begin_in(soap, tag, 1, NULL))
return NULL;
if (!a)
if (!(a = (struct _wsrm__SequenceAcknowledgement_Final **)soap_malloc(soap, sizeof(stru... | false | false | false | false | false | 0 |
ipoib_init_addr ( const void *hw_addr, void *ll_addr ) {
const uint8_t *guid = hw_addr;
uint8_t *eth_addr = ll_addr;
uint8_t guid_mask = IPOIB_GUID_MASK;
unsigned int i;
/* Extract bytes from GUID according to mask */
for ( i = 0 ; i < 8 ; i++, guid++, guid_mask <<= 1 ) {
if ( guid_mask & 0x80 )
*(eth_addr+... | false | false | false | false | false | 0 |
gt_gff3_out_stream_retain_id_attributes(GtGFF3OutStream *gff3_out_stream)
{
gt_assert(gff3_out_stream);
gt_gff3_visitor_retain_id_attributes((GtGFF3Visitor*)
gff3_out_stream->gff3_visitor);
} | false | false | false | false | false | 0 |
camel_cert_set_string (CamelCertDB *certdb,
CamelCert *cert,
gint string,
const gchar *value)
{
CamelCertDBClass *class;
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
g_return_if_fail (cert != NULL);
class = CAMEL_CERTDB_GET_CLASS (certdb);
g_re... | false | false | false | true | false | 1 |
fs_rtp_stream_add_substream_unlock (FsRtpStream *stream,
FsRtpSubStream *substream,
GError **error)
{
gboolean ret = TRUE;
FsRtpSession *session = fs_rtp_stream_get_session (stream, error);
if (!session)
return FALSE;
stream->substreams = g_list_prepend (stream->substreams,
substream);
g_o... | false | false | false | false | false | 0 |
change_production(struct universal prod)
{
if(!are_the_same_class(pEditor->currently_building, prod)) {
if(pEditor->stock != pEditor->pCity->shield_stock) {
if(are_the_same_class(pEditor->pCity->production, prod)) {
pEditor->stock = pEditor->pCity->shield_stock;
}
} else {
pEditor->sto... | false | false | false | false | false | 0 |
on_item19_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
gboolean active;
active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem));
global_show_friends = (active) ? TRUE : FALSE;
if(global_show_friends && !global_fft... | false | false | false | false | false | 0 |
KillToLineEnd() {
int Y = VToR(CP.Row);
if (DelText(Y, CP.Col, LineLen() - CP.Col)) return 1;
return 0;
} | false | false | false | false | false | 0 |
acl_initialize(struct hub_config* config, struct acl_handle* handle)
{
int ret;
memset(handle, 0, sizeof(struct acl_handle));
handle->users = list_create();
handle->users_denied = list_create();
handle->users_banned = list_create();
handle->cids = list_create();
handle->networks = list_create... | false | false | false | false | false | 0 |
xircom_close(struct net_device *dev)
{
struct xircom_private *card;
unsigned long flags;
card = netdev_priv(dev);
netif_stop_queue(dev); /* we don't want new packets */
spin_lock_irqsave(&card->lock,flags);
disable_all_interrupts(card);
#if 0
/* We can enable this again once we send dummy packets on ifconfig... | false | false | false | false | false | 0 |
amdmsFindSmoothDataSaturation(amdmsFIT_SMOOTH_DATA_ENV *env)
{
int i;
int lowerSlopeCount = 0;
double lowerSlope = 0.0;
int upperSlopeCount = 0;
double upperSlope = 0.0;
double limit;
int satFound = 0;
int belowFlag = 0;
/* amdmsDebug(__FILE__, _... | false | false | false | false | false | 0 |
xmlparser_close(XMLParserObject* self, PyObject* args)
{
/* end feeding data to parser */
PyObject* res;
if (!PyArg_ParseTuple(args, ":close"))
return NULL;
res = expat_parse(self, "", 0, 1);
if (!res)
return NULL;
if (TreeBuilder_CheckExact(self->target)) {
Py_DECREF(... | false | false | false | false | false | 0 |
gst_multi_fd_sink_stop (GstBaseSink * bsink)
{
GstMultiFdSinkClass *fclass;
GstMultiFdSink *this;
GstBuffer *buf;
int i;
this = GST_MULTI_FD_SINK (bsink);
fclass = GST_MULTI_FD_SINK_GET_CLASS (this);
if (!GST_OBJECT_FLAG_IS_SET (bsink, GST_MULTI_FD_SINK_OPEN))
return TRUE;
this->running = FALSE;
... | false | false | false | false | false | 0 |
m52790_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
{
struct m52790_state *state = to_state(sd);
if (reg->reg != 0)
return -EINVAL;
reg->size = 1;
reg->val = state->input | state->output;
return 0;
} | false | false | false | false | false | 0 |
remove_identity (GoaKerberosIdentityManager *self,
Operation *operation,
GoaIdentity *identity)
{
IdentitySignalWork *work;
const char *identifier;
char *name;
GList *other_identities = NULL;
identifier = goa_identity_get_identifier (identity... | false | false | false | false | false | 0 |
compute_device_groups_stats(int curr)
{
struct io_stats gdev, *ioi;
struct io_hdr_stats *shi = st_hdr_iodev;
int i, nr_disks;
memset(&gdev, 0, IO_STATS_SIZE);
nr_disks = 0;
for (i = 0; i < iodev_nr; i++, shi++) {
if (shi->used && (shi->status == DISK_REGISTERED)) {
ioi = st_iodev[curr] + i;
if (!DISPLA... | false | false | false | false | false | 0 |
onCmdSearchNext(FXObject*,FXSelector sel,void*){
if(!searchstring.empty()){
FXint pos=cursorpos;
FXint beg[10];
FXint end[10];
if(FXSELID(sel)==ID_SEARCH_FORW){
if(isPosSelected(pos)) pos=selendpos;
searchflags&=~SEARCH_BACKWARD;
}
else{
if(isPosSelected(pos)) pos=selstartp... | false | false | false | false | false | 0 |
dfb_input_device_get_keymap_entry( CoreInputDevice *device,
int keycode,
DFBInputDeviceKeymapEntry *entry )
{
DFBInputDeviceKeymapEntry *keymap_entry;
D_MAGIC_ASSERT( device, CoreInputDevice );
D_ASSE... | false | false | false | false | false | 0 |
get_default_keyring_reply (GkrOperation *op, DBusMessage *reply, gpointer user_data)
{
GkrCallback *cb;
const char *path;
gchar *name;
if (gkr_operation_handle_errors (op, reply))
return;
if (!dbus_message_get_args (reply, NULL, DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID)) {
... | false | false | false | false | false | 0 |
StatusMsg(int state)
{
char *what;
switch (state) {
case 0:
what = "starting";
break;
case 1:
what = "running";
break;
case 2:
what = "stopping";
break;
case 3:
what = "exiting";
break;
default:
what = "unknown";
break;
}
Ns_Log(Notice, "nsmain: %s/%s %s",
Ns_InfoServe... | false | false | false | false | false | 0 |
mpd_qmaxcoeff(mpd_t *result, const mpd_context_t *ctx, uint32_t *status)
{
mpd_ssize_t len, r;
_mpd_idiv_word(&len, &r, ctx->prec, MPD_RDIGITS);
len = (r == 0) ? len : len+1;
if (!mpd_qresize(result, len, status)) {
return;
}
result->len = len;
result->digits = ctx->prec;
--l... | false | false | false | false | false | 0 |
eliminate_nt_for_dlg_blocks(Block *block_head)
{
Block *bpt;
for(bpt = block_head; bpt != NULL; bpt = bpt->next) {
if(bpt->inner != NULL) {
eliminate_nt_for_dlg_blocks(bpt->inner);
}
if(bpt->usage == USE_MT) {
/*
if(bpt->dlg_tag && check_dlg_start... | false | false | false | false | false | 0 |
ConditionalMultiXactIdWait(MultiXactId multi)
{
bool result = true;
TransactionId *members;
int nmembers;
nmembers = GetMultiXactIdMembers(multi, &members);
if (nmembers >= 0)
{
int i;
for (i = 0; i < nmembers; i++)
{
TransactionId member = members[i];
debug_elog4(DEBUG2, "ConditionalMultiXac... | false | false | false | false | false | 0 |
heim_db_rollback(heim_db_t db, heim_error_t *error)
{
int ret = 0;
if (heim_get_tid(db) != HEIM_TID_DB)
return EINVAL;
if (!db->in_transaction)
return 0;
if (db->plug->rollbackf != NULL)
ret = db->plug->rollbackf(db->db_data, error);
else if (db->plug->unlockf != NULL)
ret = db->plug->unlockf(... | false | false | false | false | false | 0 |
gt_sam_interface_runner(GT_UNUSED int argc,
GT_UNUSED const char **argv,
GT_UNUSED int parsed_args,
void *tool_arguments, GtError *err)
{
GtSamInterfaceArguments *arguments = tool_arguments;
int had_err = 0, cou... | false | false | false | false | false | 0 |
formatAllHdrFtr(void)
{
xxx_UT_DEBUGMSG(("SEVIOR: Doing formatAllHdrFtr \n"));
UT_GenericVector<fl_HdrFtrSectionLayout *> vecHdrFtr;
getVecOfHdrFtrs( &vecHdrFtr);
UT_sint32 i = 0;
for(i = 0; i < vecHdrFtr.getItemCount(); i++)
{
fl_HdrFtrSectionLayout * pHdrFtr = vecHdrFtr.getNthItem(i);
xxx_UT_DEBUGMSG(("SEVI... | false | false | false | false | false | 0 |
e_box_pack_after(Evas_Object *obj, Evas_Object *child, Evas_Object *after)
{
E_Smart_Data *sd;
E_Box_Item *bi, *bi2;
int i = 0;
Eina_Inlist *l;
if (!child) return 0;
if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
sd = evas_object_smart_data_get(obj);
if (!sd) return 0;
bi2 = ... | false | false | false | true | false | 1 |
compute_frame_pointer_to_fb_displacement (HOST_WIDE_INT offset)
{
rtx reg, elim;
#ifdef FRAME_POINTER_CFA_OFFSET
reg = frame_pointer_rtx;
offset += FRAME_POINTER_CFA_OFFSET (current_function_decl);
#else
reg = arg_pointer_rtx;
offset += ARG_POINTER_CFA_OFFSET (current_function_decl);
#endif
elim = elimina... | false | false | false | false | false | 0 |
write_to_stdout(char *buf, unsigned int nr)
{
ssize_t ret;
ret = write(STDOUT_FILENO, buf, nr);
if (ret != nr) {
fprintf(stderr, "Failed to write out the dmesg log buffer!:"
" %s\n", strerror(errno));
exit(54);
}
} | false | false | false | false | false | 0 |
httpd_main(void)
{
int rv, n, t, accepting;
time_t hours, last_time;
accepting = 1;
last_time = current_time = startuptime = time(0);
hours = current_time / 3600;
log_d("*** %s starting", server_version);
while (gotsigterm == 0) {
if (gotsighup) {
gotsighup = 0;
init_logs(0);
if (debug)
log_d("lo... | false | false | false | false | false | 0 |
eel_canvas_item_reparent (EelCanvasItem *item, EelCanvasGroup *new_group)
{
g_return_if_fail (EEL_IS_CANVAS_ITEM (item));
g_return_if_fail (EEL_IS_CANVAS_GROUP (new_group));
/* Both items need to be in the same canvas */
g_return_if_fail (item->canvas == EEL_CANVAS_ITEM (new_group)->canvas);
/* The group cannot ... | false | false | false | false | false | 0 |
eb_jabber_set_idle(eb_local_account *account, int idle)
{
if ((idle == 0) && eb_jabber_get_current_state(account) == JABBER_AWAY) {
if (account->status_menu) {
eb_set_active_menu_status(account->status_menu,
JABBER_ONLINE);
}
}
if (idle >= 600
&& eb_jabber_get_current_state(account) == JABBER_ONLINE) {
... | false | false | false | false | false | 0 |
visitRenderables(Renderable::Visitor* visitor,
bool debugRenderables)
{
for (BatchInstanceMap::const_iterator ri = mBatchInstanceMap.begin();
ri != mBatchInstanceMap.end(); ++ri)
{
ri->second->visitRenderables(visitor, debugRenderables);
}
} | false | false | false | false | false | 0 |
nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{
int chs;
unsigned int dataDCC2, channel_id;
int i;
struct hdmi_spec *spec = codec->spec;
struct hda_spdif_out *sp... | false | false | false | false | false | 0 |
get_search_arr(int *search_arr) {
int i;
for (i = 0; i < SIZEOFFREE; i++) {
search_arr[i] = i;
}
permute(search_arr, 1, SIZEOFFREE1+1);
permute(search_arr, SIZEOFFREE1+1, SIZEOFFREE2+1);
permute(search_arr, SIZEOFFREE2+1, SIZEOFFREE);
} | false | false | false | false | false | 0 |
e1000e_phy_hw_reset_generic(struct e1000_hw *hw)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val = E1000_SUCCESS;
u32 ctrl;
ret_val = e1000e_check_reset_block(hw);
if (ret_val) {
ret_val = E1000_SUCCESS;
goto out;
}
ret_val = phy->ops.acquire(hw);
if (ret_val)
goto out;
ctrl = er32(CTRL);
ew32(C... | false | false | false | false | false | 0 |
lcd2usb_HD44780_scankeypad(PrivateData *p)
{
unsigned char buffer[2];
int nBytes;
/* send control request and accept return value */
nBytes = usb_control_msg(p->usbHandle,
USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN,
LCD2USB_GET_KEYS, 0, 0, (char *) buffer, sizeof(buffer), 1000);
if (nBy... | false | false | false | false | false | 0 |
rx_ut_init(rxdrv_t *rx, const void *args)
{
const struct rx_ut_args *rargs = args;
struct attr *attr;
rx_check(rx);
tx_check(rargs->tx);
g_assert(rargs->cb != NULL);
WALLOC0(attr);
attr->magic = RX_UT_ATTR_MAGIC;
attr->tag = rargs->tag;
attr->mseq = hevset_create_any(
offsetof(struct ut_rmsg, id),
ut_mid... | false | false | false | false | false | 0 |
cgraph_varpool_node (tree decl)
{
struct cgraph_varpool_node *node;
struct cgraph_varpool_node **slot;
if (!DECL_P (decl) || TREE_CODE (decl) == FUNCTION_DECL)
abort ();
if (!cgraph_varpool_hash)
cgraph_varpool_hash = htab_create_ggc (10, cgraph_varpool_hash_node,
eq_cgraph_varpool_node... | false | false | false | false | false | 0 |
gpk_modal_dialog_button_close_cb (GtkWidget *widget_button, GpkModalDialog *dialog)
{
dialog->priv->response = GTK_RESPONSE_CLOSE;
g_main_loop_quit (dialog->priv->loop);
if (dialog->priv->pulse_timer_id != 0) {
g_source_remove (dialog->priv->pulse_timer_id);
dialog->priv->pulse_timer_id = 0;
}
gpk_animated_i... | false | false | false | false | false | 0 |
gst_util_array_binary_search (gpointer array, guint num_elements,
gsize element_size, GCompareDataFunc search_func, GstSearchMode mode,
gconstpointer search_data, gpointer user_data)
{
glong left = 0, right = num_elements - 1, m;
gint ret;
guint8 *data = (guint8 *) array;
g_return_val_if_fail (array !=... | false | false | false | false | false | 0 |
l_destroy(list_t * list)
{
void *data;
if (list == NULL)
return;
/* remove every element */
while (list->size) {
l_remove(list, NULL, &data);
free(data);
}
free(list);
} | false | false | false | false | false | 0 |
ResetAllLogs()
{
SocketSet::iterator it = socket_list.begin();
while (it != socket_list.end()) {
CECServerSocket *s = *(it++);
s->ResetLog();
}
} | false | false | false | false | false | 0 |
parse_str(const char* buf, const char* tag, string& dest) {
char tempbuf[1024];
if (!parse_str(buf, tag, tempbuf, 1024)) return false;
dest = tempbuf;
return true;
} | false | false | false | false | false | 0 |
test_update_secrets_wifi_bad_setting_name (void)
{
NMConnection *connection;
GHashTable *secrets;
GError *error = NULL;
gboolean success;
const char *wepkey = "11111111111111111111111111";
connection = wifi_connection_new ();
/* Build up the secrets hash */
secrets = g_hash_table_new_full (g_str_hash, g_str_e... | false | false | false | false | false | 0 |
set_min(struct RASTER_MAP_PTR *from, int col,
struct RASTER_MAP_PTR *to)
{
if (from == NULL) {
switch (to->type) {
case CELL_TYPE:
*to->data.c = INT_MAX;
break;
case FCELL_TYPE:
*to->data.f = FLT_MAX;
break;
case DCELL_TYPE:
*to->data.d = DBL_MAX;
break;
}
}
else {
... | false | false | false | false | false | 0 |
write_data_to_db(const char *data, const char *x_string) const {
if (!gb_struct) return 0;
if (!sec_root) return 0;
GB_transaction ta(gb_main);
GB_ERROR error = GB_write_string(gb_struct, data);
if (!error) {
error = GB_write_string(gb_struct_ref, x_string);
}
last_saved =... | false | false | false | false | false | 0 |
device_prepare(struct device *dev, pm_message_t state)
{
int (*callback)(struct device *) = NULL;
char *info = NULL;
int ret = 0;
if (dev->power.syscore)
return 0;
/*
* If a device's parent goes into runtime suspend at the wrong time,
* it won't be possible to resume the device. To prevent this we
* blo... | false | false | false | false | false | 0 |
gradient(const ColumnVector& x, const EvalFunction& func, float h,int errorord){
ColumnVector deriv(x.Nrows());
deriv = 0;
for(int i=1;i<=x.Nrows();i++){
deriv(i) = diff1(x,func,i,h,errorord);
}
deriv.Release();
return deriv;
} | false | false | false | false | false | 0 |
vp3054_i2c_probe(struct cx8802_dev *dev)
{
struct cx88_core *core = dev->core;
struct vp3054_i2c_state *vp3054_i2c;
int rc;
if (core->boardnr != CX88_BOARD_DNTV_LIVE_DVB_T_PRO)
return 0;
vp3054_i2c = kzalloc(sizeof(*vp3054_i2c), GFP_KERNEL);
if (vp3054_i2c == NULL)
return -ENOMEM;
dev->vp3054 = vp3054_i2c;... | false | false | false | false | false | 0 |
Equal(const BitArray *right) const
{
if (Count != right->Count) {
return false;
}
for(int index = 0; index < Count; index++) {
if (Get(index) != right->Get(index)) {
return false;
}
}
return true;
} | false | false | false | false | false | 0 |
bfa_fcs_rport_send_prlo_acc(struct bfa_fcs_rport_s *rport)
{
struct bfa_fcs_lport_s *port = rport->port;
struct fchs_s fchs;
struct bfa_fcxp_s *fcxp;
int len;
bfa_trc(rport->fcs, rport->pid);
fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE);
if (!fcxp)
return;
len = fc_prlo_acc_build(&fchs, bfa_fcxp_get_req... | false | false | false | false | false | 0 |
hostap_show_priid(u8 *data, int len)
{
struct hfa384x_comp_ident *comp;
if (len != sizeof(*comp)) {
printf("Invalid PRIID length %d\n", len);
return;
}
comp = (struct hfa384x_comp_ident *) data;
printf("PRIID: id=0x%04x v%d.%d.%d\n",
le_to_host16(comp->id),
le_to_host16(comp->major),
... | false | false | false | false | false | 0 |
atexit_remover()
{
if (remove_files)
for (int i = 0; i < remove_files->size(); i++) {
remover((*remove_files)[i]);
delete[] (*remove_files)[i];
}
} | false | false | false | false | false | 0 |
ahci_led_show(struct ata_port *ap, char *buf)
{
struct ahci_port_priv *pp = ap->private_data;
struct ata_link *link;
struct ahci_em_priv *emp;
int rc = 0;
ata_for_each_link(link, ap, EDGE) {
emp = &pp->em_priv[link->pmp];
rc += sprintf(buf, "%lx\n", emp->led_state);
}
return rc;
} | false | true | false | false | false | 1 |
genericbl_probe(struct platform_device *pdev)
{
struct backlight_properties props;
struct generic_bl_info *machinfo = dev_get_platdata(&pdev->dev);
const char *name = "generic-bl";
struct backlight_device *bd;
bl_machinfo = machinfo;
if (!machinfo->limit_mask)
machinfo->limit_mask = -1;
if (machinfo->name)
... | false | false | false | false | false | 0 |
syck_seq_add_m(VALUE self, VALUE val)
{
SyckNode *node;
VALUE emitter = rb_ivar_get( self, s_emitter );
Data_Get_Struct( self, SyckNode, node );
if ( rb_respond_to( emitter, s_node_export ) ) {
val = rb_funcall( emitter, s_node_export, 1, val );
}
syck_seq_add( node, val );
rb_ary_p... | false | false | false | false | false | 0 |
ar9002_hw_set11n_ratescenario(struct ath_hw *ah __unused, void *ds,
void *lastds,
u32 durUpdateEn, u32 rtsctsRate,
u32 rtsctsDuration __unused,
struct ath9k_11n_rate_series series[],
u32 nseries __unused, u32 flags)
{
struct ar5416_desc *ads = AR5416DESC(ds);
struct ar5416_desc *las... | false | false | false | false | false | 0 |
gt_dot_runner(int argc, const char **argv, int parsed_args,
void *tool_arguments, GtError *err)
{
GT_UNUSED GtDotArguments *arguments = tool_arguments;
GtNodeStream *vs = NULL, *ins = NULL;
GtNodeVisitor *dv = NULL;
int had_err = 0;
gt_error_check(err);
ins = gt_gff3_in_stream_new_... | false | false | false | false | false | 0 |
DoPrint(const tString &s){
bool print_to_stdout=false;
#ifdef DEBUG
print_to_stdout=true;
#endif
bool swap = false;
if (!sr_screen)
print_to_stdout=true;
if (print_to_stdout)
{
std::cout << tColoredString::RemoveColors(s);
std::cout.flush();
}
if (sr_screen){
... | false | false | false | false | false | 0 |
mei_txe_dev_init(struct pci_dev *pdev)
{
struct mei_device *dev;
struct mei_txe_hw *hw;
dev = kzalloc(sizeof(struct mei_device) +
sizeof(struct mei_txe_hw), GFP_KERNEL);
if (!dev)
return NULL;
mei_device_init(dev, &pdev->dev, &mei_txe_hw_ops);
hw = to_txe_hw(dev);
init_waitqueue_head(&hw->wait_alivenes... | false | false | false | false | false | 0 |
cmsLab2XYZ(const cmsCIEXYZ* WhitePoint, cmsCIEXYZ* xyz, const cmsCIELab* Lab)
{
cmsFloat64Number x, y, z;
if (WhitePoint == NULL)
WhitePoint = cmsD50_XYZ();
y = (Lab-> L + 16.0) / 116.0;
x = y + 0.002 * Lab -> a;
z = y - 0.005 * Lab -> b;
xyz -> X = f_1(x) * WhitePoint -> X;
xyz... | false | false | false | false | false | 0 |
boxaMergeEvenOdd(BOXA *boxae,
BOXA *boxao,
l_int32 fillflag)
{
l_int32 i, n, ne, no;
BOX *box;
BOXA *boxad;
PROCNAME("boxaMergeEvenOdd");
if (!boxae || !boxao)
return (BOXA *)ERROR_PTR("boxae and boxao not defined", procName, NULL);
ne = boxaGetCoun... | false | false | false | false | false | 0 |
gnac_profiles_utils_reset_values(BasicFormatInfo *bfi, ...)
{
va_list ap;
va_start(ap, bfi);
const gchar *name = va_arg(ap, const gchar *);
while (name) {
GtkWidget *widget = gnac_profiles_utils_get_widget(bfi, name);
if (GTK_IS_COMBO_BOX(widget)) {
gnac_profiles_utils_reset_value_combo(widget)... | false | false | false | true | false | 1 |
iClassOfDuplexPair(unsigned Ga, unsigned Gb) {
switch (Ga) {
case HexagonII::HSIG_None:
default:
break;
case HexagonII::HSIG_L1:
switch (Gb) {
default:
break;
case HexagonII::HSIG_L1:
return 0;
case HexagonII::HSIG_A:
return 0x4;
}
case HexagonII::HSIG_L2:
switch ... | false | false | false | false | false | 0 |
w_short(int x, WFILE *p)
{
w_byte((char)( x & 0xff), p);
w_byte((char)((x>> 8) & 0xff), p);
} | false | false | false | false | false | 0 |
transpose_mpi_get_local_size(int n, int my_pe, int n_pes,
int *local_n, int *local_start)
{
int block_size;
block_size = transpose_mpi_get_block_size(n,n_pes);
n_pes = (n + block_size - 1) / block_size;
if (my_pe >= n_pes) {
*local_n = 0;
*local_start = 0;
}
else {
*local_... | false | false | false | false | false | 0 |
flushscoderaw(void)
{
register int i;
if ( rawnumber )
{
if ( asmflags & F_CODE_HEX )
{
if ((rawextended ^ rawstart) & 0xffff0000)
{
fputs(":02000004",scode);
checksum = (unsigned char)(0xFF + 0x02 + 0x04);
scodebyte(rawstart>>24);
scodebyte(rawstart>>16);
scodebyte(~checksum)... | false | false | false | false | false | 0 |
PKCS7_set_type(PKCS7 *p7, int type)
{
ASN1_OBJECT *obj;
/*PKCS7_content_free(p7);*/
obj=OBJ_nid2obj(type); /* will not fail */
switch (type)
{
case NID_pkcs7_signed:
p7->type=obj;
if ((p7->d.sign=PKCS7_SIGNED_new()) == NULL)
goto err;
if (!ASN1_INTEGER_set(p7->d.sign->version,1))
{
PKCS7_SIGNED... | false | false | false | false | false | 0 |
wrap_DB_SEQUENCE(DB_SEQUENCE *seq)
{
DbSequence *wrapped_seq = get_DbSequence(seq);
return (wrapped_seq != NULL) ? wrapped_seq : new DbSequence(seq);
} | false | false | false | false | false | 0 |
pcap_fopen_offline(FILE *fp, char *errbuf)
{
register pcap_t *p;
bpf_u_int32 magic;
size_t amt_read;
u_int i;
p = pcap_create_common("(savefile)", errbuf);
if (p == NULL)
return (NULL);
/*
* Read the first 4 bytes of the file; the network analyzer dump
* file formats we support (pcap and pcap-ng), and se... | false | false | false | false | true | 1 |
subctract(Term* t1, Term* t2, int i, int j){
double a1, b1, c1, a2, b2, c2;
Term* t;
a1=b1=c1=a2=b2=c2=0;
getCoeffABC(t1, &a1, &b1, &c1, i, j);
getCoeffABC(t2, &a2, &b2, &c2, i, j);
t = new Term((a1-a2), 1, i+m, -1);
Term *last = t;
last->setNextTerm(new Term((b1-b2), 1, j+m, -1));
last = last->getNex... | false | false | false | false | false | 0 |
AddNotification(CNotification *pNotification)
{
m_lock.Enter();
m_NotificationList.push_back(pNotification);
if (m_maySendNotificationEvent && m_pEventHandler)
{
m_maySendNotificationEvent = false;
m_lock.Leave();
wxFzEvent evt(wxID_ANY);
evt.SetEventObject(this);
wxPostEvent(m_pEventHandler, evt);
}
e... | false | false | false | false | false | 0 |
get_size() {
struct pfs_stat s;
int result;
result = this->fstat(&s);
if(result<0) {
return 0;
} else {
return s.st_size;
}
} | false | false | false | false | false | 0 |
unpack_int_rgba_XBGR32323232_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
{
unsigned int i;
for (i = 0; i < n; i++) {
dst[i][0] = src[i * 4 + 0];
dst[i][1] = src[i * 4 + 1];
dst[i][2] = src[i * 4 + 2];
dst[i][3] = 1;
}
} | false | false | false | false | false | 0 |
writeSettings() const
{
const ConnectionSettings settings;
const PppSettings pppSettings = settings.pppSettings(m_strConnectionName);
bool fRet = pppSettings.setRemoteName(m_Widget.m_pRemoteNameEdit->text());
return(fRet);
} | false | false | false | false | false | 0 |
getDescription() const
{
ASCString res = "Consume " + ASCString::toString(count) + " pieces of ammo ";
if ( slot >= 0 )
res += "from slot " + ASCString::toString(slot);
if ( getContainer() )
res += " from unit " + getContainer()->getName();
return res;
} | false | false | false | false | false | 0 |
eval_hunter_want(struct player *pplayer, struct city *pcity,
struct adv_choice *choice,
struct unit_type *best_type,
int veteran)
{
struct unit *virtualunit;
int want = 0;
virtualunit = unit_virtual_create(pplayer, pcity, best_type, veteran);
wa... | false | false | false | false | false | 0 |
SetFlag(Flags flag, bool value)
{
ConfigManager *c = Manager::Get()->GetConfigManager(wxT("debugger_common"));
switch (flag)
{
case AutoBuild:
c->Write(wxT("/common/auto_build"), value);
break;
case AutoSwitchFrame:
c->Write(wxT("/common/auto_switch_frame"... | false | false | false | false | false | 0 |
numaMakeHistogramAuto(NUMA *na,
l_int32 maxbins)
{
l_int32 i, n, imin, imax, irange, ibin, ival, allints;
l_float32 minval, maxval, range, binsize, fval;
NUMA *nah;
PROCNAME("numaMakeHistogramAuto");
if (!na)
return (NUMA *)ERROR_PTR("na not defined", procName, NULL)... | false | false | false | false | false | 0 |
clear_asset_list()
{
asset *rec = NULL;
int akey;
for (akey = 0; akey < BUCKET_SIZE; akey++) {
rec = passet[akey];
while (rec != NULL) {
serv_asset *tmp_sa = NULL;
os_asset *tmp_oa = NULL;
tmp_sa = rec->services;
tmp_oa = rec->os;
... | false | false | false | false | false | 0 |
apply_modifiers_non_empty( LIST * result, string * buf, VAR_EDITS * edits, int n, LISTITER begin, LISTITER end )
{
int i;
LISTITER iter;
for ( i = 0; i < n; ++i )
{
if ( edits[i].join.ptr )
{
var_edit_file( object_str( list_item( begin ) ), buf, edits + i );
var_e... | false | false | false | false | false | 0 |
get_next_event_time(void)
{
Bit32u time0=get_clock_event_time(0);
Bit32u time1=get_clock_event_time(1);
Bit32u time2=get_clock_event_time(2);
Bit32u out=time0;
if (time1 && (time1<out))
out=time1;
if (time2 && (time2<out))
out=time2;
return out;
} | false | false | false | false | false | 0 |
qcafrm_create_header(u8 *buf, u16 length)
{
__le16 len;
if (!buf)
return 0;
len = cpu_to_le16(length);
buf[0] = 0xAA;
buf[1] = 0xAA;
buf[2] = 0xAA;
buf[3] = 0xAA;
buf[4] = len & 0xff;
buf[5] = (len >> 8) & 0xff;
buf[6] = 0;
buf[7] = 0;
return QCAFRM_HEADER_LEN;
} | false | false | false | false | false | 0 |
canonify_filename(const char* fname)
{
mystring dirname, basename;
split_filename(fname, dirname, basename);
mystring old_dir(get_current_directory());
chdir(dirname.c_str());
mystring canonical_dir(get_current_directory());
chdir(old_dir.c_str());
return mystring(canonical_dir + mystring("/") + basenam... | false | false | false | false | false | 0 |
rad_authlog(const char *msg, REQUEST *request, int goodpass)
{
int logit;
const char *extra_msg = NULL;
char clean_password[1024];
char clean_username[1024];
char buf[1024];
char extra[1024];
VALUE_PAIR *username = NULL;
if (!request->root->log_auth) {
return 0;
}
/*
* Get the correct username based on ... | false | false | false | false | false | 0 |
merge_features(Hash *features, Node *n) {
Iterator ki;
if (!features)
return;
for (ki = First(features); ki.key; ki = Next(ki)) {
String *ci = Copy(ki.item);
Setattr(n, ki.key, ci);
Delete(ci);
}
} | false | false | false | false | false | 0 |
appendCommand(redisClient *c) {
size_t totlen;
robj *o, *append;
o = lookupKeyWrite(c->db,c->argv[1]);
if (o == NULL) {
/* Create the key */
c->argv[2] = tryObjectEncoding(c->argv[2]);
dbAdd(c->db,c->argv[1],c->argv[2]);
incrRefCount(c->argv[2]);
totlen = stringO... | false | false | false | false | false | 0 |
gif_read_extension(GifState *s)
{
int ext_code, ext_len, i, gce_flags, gce_transparent_index;
/* extension */
ext_code = bytestream_get_byte(&s->bytestream);
ext_len = bytestream_get_byte(&s->bytestream);
#ifdef DEBUG
dprintf(s->avctx, "gif: ext_code=0x%x len=%d\n", ext_code, ext_len);
#endif
s... | false | false | false | false | false | 0 |
led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
struct led_pwm *led, struct device_node *child)
{
struct led_pwm_data *led_data = &priv->leds[priv->num_leds];
int ret;
led_data->active_low = led->active_low;
led_data->cdev.name = led->name;
led_data->cdev.default_trigger = led->default_trigger... | false | false | false | false | false | 0 |
enterprise_permit_user_login (UmAccountDialog *self)
{
UmRealmCommon *common;
gchar *login;
const gchar *add[2];
const gchar *remove[1];
GVariant *options;
common = um_realm_object_get_common (self->selected_realm);
login = um_realm_calculate_login (common, gtk_... | false | false | false | false | false | 0 |
setup()
{
mapID = editInt("ID of next map", mapID, 0, maxint);
} | false | false | false | false | false | 0 |
parse_time (const gchar *time_string)
{
guint hours, minutes;
gdouble seconds;
gchar *end_pointer;
g_return_val_if_fail (time_string != NULL, 0);
hours = strtoul (time_string, &end_pointer, 10);
if (end_pointer != time_string + 2)
return -1;
minutes = strtoul (time_string + 3, &end_pointer, 10);
if (end_po... | false | false | false | false | false | 0 |
setNonBlocking(int fd) {
int flags, ret;
do {
flags = fcntl(fd, F_GETFL);
} while (flags == -1 && errno == EINTR);
if (flags == -1) {
int e = errno;
throw SystemException("Cannot set socket to non-blocking mode: "
"cannot get socket flags",
e);
}
do {
ret = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
... | false | false | false | false | false | 0 |
SetReferenceType(const ReferenceType rtype)
{
m_reference_type = rtype;
if (rtype == REFERENCE_PICTURE )
m_psort.SetRef();
else
m_psort.SetNonRef();
} | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.