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 |
|---|---|---|---|---|---|---|
hostap_free_data(struct ap_data *ap)
{
struct sta_info *n, *sta;
if (ap == NULL || !ap->initialized) {
printk(KERN_DEBUG "hostap_free_data: ap has not yet been "
"initialized - skip resource freeing\n");
return;
}
flush_work(&ap->add_sta_proc_queue);
#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
flush_wo... | false | false | false | false | false | 0 |
LoadImage(GifFileType *GifFile, GifRowType **ImageBufferPtr)
{
int Size, i;
GifRowType *ImageBuffer;
/* Allocate the image as vector of column of rows. We cannt allocate */
/* the all screen at once, as this broken minded CPU can allocate up to */
/* 64k at a time and our image can be bigger t... | false | false | false | false | true | 1 |
faultPtr(wsdl__fault *fault)
{ faultRef = fault;
if (!faultRef && vflag)
cerr << "Warning: wsdl__ext_fault fault ref set to NULL" << endl;
} | false | false | false | false | false | 0 |
NativeInteger_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
asn_TYPE_descriptor_t *td,
void **nint_ptr, const void *buf_ptr, size_t size, int tag_mode) {
asn_INTEGER_specifics_t *specs=(asn_INTEGER_specifics_t *)td->specifics;
long *native = (long *)*nint_ptr;
asn_dec_rval_t rval;
ber_tlv_len_t length;
/*
* If t... | false | false | false | false | false | 0 |
frame(){
//setAnimation("default");
SDL_Surface* tmp = current->getFrame(currentframe);
delay--;
if(delay==0){
currentframe++;
delay = delay_set;
}
if(currentframe>=current->numframes && current->loop){
currentframe = 0;
}
return tmp;
} | false | false | false | false | false | 0 |
whash_resize( void )
{
int new_size;
int old_size = whash_size;
Wentry **new_whash;
Wentry **dptr;
Wentry **h = whash;
Wentry *wentry;
Wentry *next;
new_size = whash_size * 2;
new_size |= 1;
new_whash = ( Wentry ** ) calloc( new_size, sizeof(Wentry *) );
if( new_whash == NULL )
return;
while( old_si... | false | false | false | false | false | 0 |
ixgbevf_poll_for_ack(struct ixgbe_hw *hw)
{
struct ixgbe_mbx_info *mbx = &hw->mbx;
int countdown = mbx->timeout;
while (countdown && mbx->ops.check_for_ack(hw)) {
countdown--;
udelay(mbx->udelay);
}
/* if we failed, all future posted messages fail until reset */
if (!countdown)
mbx->timeout = 0;
return ... | false | false | false | false | false | 0 |
Identify( GDALOpenInfo * poOpenInfo )
{
if( poOpenInfo->nHeaderBytes < 4 )
return FALSE;
if( png_sig_cmp(poOpenInfo->pabyHeader, (png_size_t)0,
poOpenInfo->nHeaderBytes) != 0 )
return FALSE;
return TRUE;
} | false | false | false | false | false | 0 |
AddRadioButtonToGroup(const wxString &Prompt)
{
UseUpId();
if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxRadioButton);
wxRadioButton * pRad;
mpWind = pRad = new wxRadioButton( mpParent, miId, Prompt,
wxDefaultPosition, wxDefaultSize, Style( 0 ) ... | false | false | false | false | false | 0 |
GetHelpBrowserAncestor(Widget w)
#else
static XmtHelpBrowserWidget GetHelpBrowserAncestor(w)
Widget w;
#endif
{
while(w && !XtIsSubclass(w, xmtHelpBrowserWidgetClass)) w = XtParent(w);
return (XmtHelpBrowserWidget)w;
} | false | false | false | false | false | 0 |
splash_peer ( http_request *h ) {
GHashTable *data;
gchar *path = NULL, *file, *form, *action, *host;
ssize_t n;
GIOError r;
host = local_host( h );
action = g_strdup_printf("http://%s/", host);
data = g_hash_dup( nocat_conf );
g_hash_merge( data, h->query );
g_hash_set( data, "a... | false | false | false | false | false | 0 |
scale_channel(unsigned short *data, unsigned width, unsigned depth,
unsigned short density)
{
int i;
int retval = 0;
unsigned short previous_data = 0;
unsigned short previous_value = 0;
width *= depth;
for (i = 0; i < width; i += depth)
{
if (data[i] == previous_data)
data[i] = previous_va... | false | false | false | false | false | 0 |
tan_add_to_header(qfits_header* hdr, const tan_t* tan) {
wcs_hdr_common(hdr, tan);
if (tan->sin) {
qfits_header_add_after(hdr, "WCSAXES", "CTYPE2", "DEC--SIN", "SIN projection", NULL);
qfits_header_add_after(hdr, "WCSAXES", "CTYPE1", "RA---SIN", "SIN projection", NULL);
} else {
qfits_header_add_after(hdr, "WC... | false | false | false | false | false | 0 |
autohelperowl_defendpat177(int trans, int move, int color, int action)
{
int a, b, B;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(683, trans, move);
b = AFFINE_TRANSFORM(721, trans, move);
B = AFFINE_TRANSFORM(682, trans, move);
return owl_topological_eye(a, board[B])==3 && safe_move(b, OTHER_C... | false | false | false | false | false | 0 |
TransferDataFromWindow()
{
wxString str;
// percent change controls
if (m_pTextCtrl_PercentChange) {
str = m_pTextCtrl_PercentChange->GetValue();
double newValue = 0;
str.ToDouble(&newValue);
m_PercentChange = newValue;
}
// Ignore Slider_PercentChange because TextCtrl_PercentCh... | false | false | false | false | false | 0 |
PyZlib_crc32(PyObject *self, PyObject *args)
{
unsigned int crc32val = 0; /* crc32(0L, Z_NULL, 0) */
Py_buffer pbuf;
int signed_val;
if (!PyArg_ParseTuple(args, "y*|I:crc32", &pbuf, &crc32val))
return NULL;
/* Releasing the GIL for very small buffers is inefficient
and may lower per... | false | false | false | false | false | 0 |
mlog_mask_show(u64 mask, char *buf)
{
char *state;
if (__mlog_test_u64(mask, mlog_and_bits))
state = "allow";
else if (__mlog_test_u64(mask, mlog_not_bits))
state = "deny";
else
state = "off";
return snprintf(buf, PAGE_SIZE, "%s\n", state);
} | false | false | false | false | false | 0 |
spl_fixedarray_it_move_forward(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
{
spl_fixedarray_it *iterator = (spl_fixedarray_it *)iter;
spl_fixedarray_object *intern = iterator->object;
if (intern->flags & SPL_FIXEDARRAY_OVERLOADED_NEXT) {
zend_user_it_move_forward(iter TSRMLS_CC);
} else {
zend_user_i... | false | false | false | false | false | 0 |
GetValue() const
{
ParametersType parameters = this->GetCurrentPosition();
const unsigned int numberOfParameters = parameters.Size();
SingleValuedNonLinearVnlOptimizer::CostFunctionAdaptorType *costFunction =
this->GetNonConstCostFunctionAdaptor();
if( costFunction != NULL )
{
if( static_cast<unsig... | false | false | false | false | false | 0 |
ll2string(char *s, size_t len, long long value) {
char buf[32], *p;
unsigned long long v;
size_t l;
if (len == 0) return 0;
v = (value < 0) ? -value : value;
p = buf+31; /* point to the last character */
do {
*p-- = '0'+(v%10);
v /= 10;
} while(v);
if (value < 0) *p-... | false | false | false | false | false | 0 |
newFixedRightShiftExpr(const Expr& t1, int shiftLength)
{
DebugAssert(shiftLength >=0,
" TheoryBitvector::newFixedRightShift:"
"fixed_shift index must be a non-negative integer"+
int2string(shiftLength));
DebugAssert(BITVECTOR == t1.getType().getExpr().getOpKind(),
"TheoryBitvector::newB... | false | false | false | false | false | 0 |
release_table_share(TABLE_SHARE *share)
{
DBUG_ENTER("release_table_share");
DBUG_PRINT("enter",
("share: 0x%lx table: %s.%s ref_count: %u version: %lu",
(ulong) share, share->db.str, share->table_name.str,
share->ref_count, share->version));
mysql_mutex_assert_owner(&... | false | false | false | false | false | 0 |
krb5_verify(const struct passwd *login_info,
const struct passwd *su_info,
const char *instance)
{
krb5_error_code ret;
krb5_principal p;
krb5_realm *realms, *r;
char *login_name = NULL;
int user_ok = 0;
#if defined(HAVE_GETLOGIN) && !defined(POSIX_GETLOGIN)
login_name = getlogin();
#... | false | false | false | false | false | 0 |
countOnes(uint32_t* mask, int32_t len) {
int32_t i, totalOnes = 0;
for (i = 0 ; i < len ; ++i) {
uint32_t ent = mask[i];
for (; ent; totalOnes++)
{
ent &= ent - 1; // clear the least significant bit set
}
}
return totalOnes;
} | false | false | false | false | false | 0 |
rs_exist(real_server_t * old_rs, list l)
{
element e;
real_server_t *rs;
if (LIST_ISEMPTY(l))
return 0;
for (e = LIST_HEAD(l); e; ELEMENT_NEXT(e)) {
rs = ELEMENT_DATA(e);
if (RS_ISEQ(rs, old_rs)) {
/*
* We reflect the previous alive
* flag value to not try to set
* already set IPVS rule.
... | false | false | false | false | false | 0 |
gee_tree_multi_map_construct (GType object_type, GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, GCompareFunc key_compare_func, GCompareFunc value_compare_func) {
GeeTreeMultiMap * self = NULL;
GCompareFunc _tmp0_ = NULL;
... | false | false | false | false | false | 0 |
bootstrap_get_default_domain(void)
{
sge_bootstrap_state_class_t* bootstrap = NULL;
GET_SPECIFIC(sge_bootstrap_thread_local_t, handle, bootstrap_thread_local_init, sge_bootstrap_thread_local_key,
"bootstrap_get_default_domain");
bootstrap = handle->current;
return bootstrap-... | false | false | false | false | false | 0 |
psb_intel_opregion_fini(struct drm_device *dev)
{
struct drm_psb_private *dev_priv = dev->dev_private;
struct psb_intel_opregion *opregion = &dev_priv->opregion;
if (!opregion->header)
return;
if (opregion->acpi) {
opregion->acpi->drdy = 0;
system_opregion = NULL;
unregister_acpi_notifier(&psb_intel_opre... | false | false | false | false | false | 0 |
sort_kv(int flag)
{
int nkey = kv->nkey;
int *keys = kv->keys;
int *values = kv->values;
char *keydata = kv->keydata;
char *valuedata = kv->valuedata;
// order = ordering of keys or values in KV, initially 0 to N-1
// will be reordered by qsort
// use reordered order array to build a new KV, one key/va... | false | false | false | false | false | 0 |
ReadNodeContentDirect(xmlNode* node)
{
if (node == NULL || node->children == NULL
|| node->children->type != XML_TEXT_NODE || node->children->content == NULL) return emptyCharString;
return (const char*) node->children->content;
} | false | false | false | false | false | 0 |
cxgbi_conn_xmit_pdu(struct iscsi_task *task)
{
struct iscsi_tcp_conn *tcp_conn = task->conn->dd_data;
struct cxgbi_conn *cconn = tcp_conn->dd_data;
struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task);
struct sk_buff *skb = tdata->skb;
unsigned int datalen;
int err;
if (!skb) {
log_debug(1 << CXGBI_DBG... | false | false | false | false | false | 0 |
apply_changes_boot(pin_configs_t* pins, int entries, int card, int device,
const char* model, GError** err)
{
gchar *s;
if (!ensure_tempdir(err))
return FALSE;
if (!create_firmware_file(pins, entries, card, device, model, err))
return FALSE;
/* Create hda-jack-retask.conf */
... | false | false | false | false | false | 0 |
usart_set_sync_master_baudrate(Usart *p_usart,
uint32_t baudrate, uint32_t ul_mck)
{
uint32_t cd;
/* Calculate clock divider according to the formula in synchronous mode. */
cd = (ul_mck + baudrate / 2) / baudrate;
if (cd < MIN_CD_VALUE || cd > MAX_CD_VALUE) {
return 1;
}
/* Configure the baudrate generate... | false | false | false | false | false | 0 |
load_image_async_simple (async_load_state *state,
Screen *screen,
Window window,
Drawable drawable,
char **filename_ret,
XRectangle *geometry_ret)
{
if (state && state->done_p) /* done! */
... | false | false | false | false | false | 0 |
command_players(object *op, const char *params) {
char buf[MAX_BUF];
char *t;
DIR *dir;
snprintf(buf, sizeof(buf), "%s/%s/", settings.localdir, settings.playerdir);
t = buf+strlen(buf);
if ((dir = opendir(buf)) != NULL) {
const struct dirent *entry;
while ((entry = readdir(dir)... | true | true | false | false | false | 1 |
cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
{
/*
* Range check input...
*/
if (!fp || (fp->mode != 'r' && fp->mode != 's'))
{
DEBUG_puts("5cupsFileGetChar: Bad arguments!");
return (-1);
}
/*
* If the input buffer is empty, try to read more data...
*/
if (fp->ptr >= fp->end)
if... | false | false | false | false | false | 0 |
EndOGRLayer(GDALPDFLayerDesc& osVectorDesc)
{
if (osVectorDesc.bWriteOGRAttributes)
{
StartObj(osVectorDesc.nFeatureLayerId);
GDALPDFDictionaryRW oDict;
oDict.Add("A", &(new GDALPDFDictionaryRW())->Add("O",
GDALPDFObjectRW::CreateName("UserProperties")));
GDALPD... | false | false | false | false | false | 0 |
add_user_info(struct webauth_context *ctx,
struct wai_webkdc_login_state *state,
struct webauth_user_info **info)
{
struct webauth_factors *iwkfactors, *swkfactors, *extra;
struct webauth_token_webkdc_proxy *wkp;
time_t valid_threshold;
int s;
/* Call the user informatio... | false | false | false | false | true | 1 |
AcpiDsExecuteArguments (
ACPI_NAMESPACE_NODE *Node,
ACPI_NAMESPACE_NODE *ScopeNode,
UINT32 AmlLength,
UINT8 *AmlStart)
{
ACPI_STATUS Status;
ACPI_PARSE_OBJECT *Op;
ACPI_WALK_STATE *WalkState;
ACPI_FUNCTION_TRACE (DsEx... | false | false | false | false | false | 0 |
tiny_spi_of_probe(struct platform_device *pdev)
{
struct tiny_spi *hw = platform_get_drvdata(pdev);
struct device_node *np = pdev->dev.of_node;
unsigned int i;
u32 val;
if (!np)
return 0;
hw->gpio_cs_count = of_gpio_count(np);
if (hw->gpio_cs_count > 0) {
hw->gpio_cs = devm_kzalloc(&pdev->dev,
hw->gpio_... | false | false | false | false | false | 0 |
gnumeric_weekday (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GDate date;
int res;
gnm_float method = argv[1] ? value_get_as_float (argv[1]) : 1;
if (method < 1 || method >= 4)
return value_new_error_NUM (ei->pos);
if (!datetime_value_to_g (&date, argv[0], DATE_CONV (ei->pos)))
return value_new_erro... | false | false | false | false | false | 0 |
commentparse()
{
char *p = str;
CLAUSE *root = NULL;
while( *str!='\n' && *str!='\0' ) str++;
scan();
return root;
} | false | false | false | false | false | 0 |
CheckTimeWindow(uint32_t t_start, uint32_t t_end, stat_record_t *stat_record) {
/*
printf("t start %u %s", t_start, ctime(&t_start));
printf("t end %u %s", t_end, ctime(&t_end));
printf("f start %u %s", NetflowStat.first_seen, ctime(&NetflowStat.first_seen));
printf("f end %u %s", NetflowStat.last_seen, ctime(... | false | false | false | false | false | 0 |
gyrus_admin_initialize_mailbox_tree_view (GyrusAdmin *admin,
gboolean is_orphaned)
{
GtkTreeView *treeview;
GtkTreeModel *model;
GtkTreeViewColumn* column;
GtkCellRenderer *renderer;
GtkTreeSelection *selection;
g_return_if_fail (GYRUS_IS_ADMIN (admin));
if (is_orphaned) {
treeview = admin->priv->tr... | false | false | false | false | false | 0 |
same_cycle(cycle *s_cyc1, cycle *s_cyc2 /* cycles to be compared */)
{
int e, eb;
short int same;
if ( s_cyc1->length != s_cyc2->length ) return(FALSE);
/* check the cycles in the same direction ... */
same = TRUE;
for ( e = 0; e < s_cyc1->length; e++ ) {
if ( s_cyc1->edge_list[e] != s_cyc2->edge_list[... | false | false | false | false | false | 0 |
_regenerateImage(GR_Graphics * pG)
{
UT_return_if_fail(m_pGraphic);
UT_return_if_fail(m_pDocLayout);
DELETEP(m_pImage);
m_pImage = m_pGraphic->regenerateImage(pG);
setWidthHeight(pG,m_iWidth,m_iHeight);
UT_Rect rec(0,0,m_iWidth,m_iHeight);
m_pImage->scaleImageTo(pG,rec);
m_iGraphicTick = m_pDocLayout->getGraphi... | false | false | false | false | false | 0 |
slotOK()
{
kDebug() << "slotOk" << endl;
// toport
// m_password = QString(crypt(passwordEdit->password(),"T6"));
m_result = waitedPlayersCombo->currentIndex();
close();
} | false | false | false | false | false | 0 |
paintEvent(QPaintEvent * event) {
// this is a hack to left-align the tab text by adding spaces to the text
// center-alignment is hard-coded deep into the way the tab is drawn in qcommonstyle.cpp
static int offset = 15; // derived this empirically, no idea where it comes from
if (m_firstTime) {
... | false | false | false | false | false | 0 |
assign_log_destination(const char *value, bool doit, GucSource source)
{
char *rawstring;
List *elemlist;
ListCell *l;
int newlogdest = 0;
/* Need a modifiable copy of string */
rawstring = pstrdup(value);
/* Parse string into list of identifiers */
if (!SplitIdentifierString(rawstring, ',', &elemli... | false | false | false | false | false | 0 |
use_hufnode(HUFENCODE tbl_enc[256], HUFNODE *node,unsigned int bits_len, unsigned long bits)
{
if(node->left!=NULL)
{ /* it is a node, right is always != NULL */
use_hufnode(tbl_enc,node->left,bits_len+1,(bits<<1)|0);
use_hufnode(tbl_enc,node->right,bits_len+1,(bits<<1)|1);
}
else
{ /* it is a leaf, right is a... | false | false | false | false | false | 0 |
hilight_remove_config(HILIGHT_REC *rec)
{
CONFIG_NODE *node;
g_return_if_fail(rec != NULL);
node = iconfig_node_traverse("hilights", FALSE);
if (node != NULL) iconfig_node_list_remove(node, g_slist_index(hilights, rec));
} | false | false | false | false | false | 0 |
gretl_system_residual_mplot (void *p, int ci, const DATASET *dset)
{
const gretl_matrix *E = NULL;
GRETL_VAR *var = NULL;
equation_system *sys = NULL;
FILE *fp = NULL;
const double *obs;
double startdate;
double xmin, xmax, xrange;
int nvars, nobs, jump;
int i, v, t, t1;
int err... | false | false | false | false | false | 0 |
queue_put(jitterbuf *jb, void *data, const enum jb_frame_type type, long ms, long ts)
{
jb_frame *frame;
jb_frame *p;
int head = 0;
long resync_ts = ts - jb->info.resync_offset;
if ((frame = jb->free)) {
jb->free = frame->next;
} else if (!(frame = ast_malloc(sizeof(*frame)))) {
jb_err("cannot allocate frame... | false | false | false | false | false | 0 |
WriteKeyring(hsStream* S, const plLocation& loc) {
std::vector<short> types = keys.getTypes(loc, true);
S->writeInt(types.size());
for (unsigned int i=0; i<types.size(); i++) {
std::vector<plKey> kList = keys.getKeys(loc, types[i], true);
S->writeShort(pdUnifiedTypeMap::MappedToPlasma(kList[... | false | false | false | false | false | 0 |
id3v1_get_string(AVFormatContext *s, const char *key,
const uint8_t *buf, int buf_size)
{
int i, c;
char *q, str[512];
q = str;
for(i = 0; i < buf_size; i++) {
c = buf[i];
if (c == '\0')
break;
if ((q - str) >= sizeof(str) - 1)
... | true | true | false | false | false | 1 |
acer_rfkill_init(struct device *dev)
{
int err;
if (has_cap(ACER_CAP_WIRELESS)) {
wireless_rfkill = acer_rfkill_register(dev, RFKILL_TYPE_WLAN,
"acer-wireless", ACER_CAP_WIRELESS);
if (IS_ERR(wireless_rfkill)) {
err = PTR_ERR(wireless_rfkill);
goto error_wireless;
}
}
if (has_cap(ACER_CAP_BLUETOOTH... | false | false | false | false | false | 0 |
GetHeaderFromFile(LargeRAWFile_ptr stream,
uint64_t offset, bool big_endian)
{
uint64_t start = offset + DataBlock::GetHeaderFromFile(stream, offset,
big_endian);
stream->SeekPos(start);
stream->ReadData(m_n_vertic... | false | false | false | false | false | 0 |
testUniqueNames(vector<Sequence>* seqVector, string *offendingSeq)
{
vector<string>::iterator oldName;
vector<Sequence>::iterator newName;
bool unique = true;
//iterate over new candidate names
for (newName = seqVector->begin(); unique && newName != seqVector->end(); newName++) {
//it... | false | false | false | false | false | 0 |
gf_rtp_streamer_append_sdp_decoding_dependency(GF_ISOFile *isofile, u32 isotrack, u8 *payload_type, char **out_sdp_buffer)
{
u32 size, i, ref_track;
s32 count;
char sdp[20000], sdpLine[10000];
sprintf(sdp, "a=mid:L%d\n", isotrack);
count = gf_isom_get_reference_count(isofile, isotrack, GF_ISOM_REF_SCAL);
if (c... | true | true | false | false | false | 1 |
LLVMParseBitcodeInContext(LLVMContextRef ContextRef,
LLVMMemoryBufferRef MemBuf,
LLVMModuleRef *OutModule,
char **OutMessage) {
MemoryBufferRef Buf = unwrap(MemBuf)->getMemBufferRef();
LLVMContext &Ctx = *unwrap... | false | false | false | false | false | 0 |
mca_memheap_base_find_offset(int pe,
int tr_id,
void* va,
void* rva)
{
map_segment_t *s;
s = __find_va(va);
return ((s && s->is_active) ? (rva - s->mkeys_cache[pe][tr_id].va_base) : 0);
} | false | false | false | false | false | 0 |
clutter_text_dirty_cache (ClutterText *text)
{
ClutterTextPrivate *priv = text->priv;
int i;
/* Delete the cached layouts so they will be recreated the next time
they are needed */
for (i = 0; i < N_CACHED_LAYOUTS; i++)
if (priv->cached_layouts[i].layout)
{
g_object_unref (priv->cached_layouts[... | false | false | false | false | false | 0 |
do_grxfhindir(struct cmd_context *ctx)
{
struct ethtool_rxnfc ring_count;
struct ethtool_rxfh_indir indir_head;
struct ethtool_rxfh_indir *indir;
u32 i;
int err;
ring_count.cmd = ETHTOOL_GRXRINGS;
err = send_ioctl(ctx, &ring_count);
if (err < 0) {
perror("Cannot get RX ring count");
return 102;
}
indir_... | false | false | false | false | false | 0 |
_e2_pwdlg_key_press_cb (GtkWidget *entry, GdkEventKey *event,
E2_PWDataRuntime *rt)
{
if ((event->state & GDK_CONTROL_MASK) != 0)
{
if (event->keyval == GDK_p || event->keyval == GDK_P)
{
rt->plain = !rt->plain;
gtk_entry_set_visibility (GTK_ENTRY (rt->pwentry1), rt->plain);
gtk_entry_set_visibility (GT... | false | false | false | false | false | 0 |
success(gearman_connection_st* con)
{
if (con->_packet.command != GEARMAN_COMMAND_ECHO_RES)
{
return gearman_error(_universal, GEARMAN_INVALID_COMMAND, "Wrong command sent in response to ECHO request");
}
if (con->_packet.data_size != _workload_size or
memcmp(_workload, con->_packet.data, _workload_s... | false | false | false | false | false | 0 |
emitFile( const KUrl& url )
{
infoMessage(i18n("Looking up section"));
QString filename = url.path().mid(url.path().lastIndexOf('/') + 1);
int index = mParsed.indexOf(QString("<FILENAME filename=\"%1\"").arg(filename));
if (index == -1) {
if ( filename == "index.html" ) {
data( fro... | false | false | false | false | false | 0 |
transaction_invariant_address_p (const_tree mem, basic_block region_entry_block)
{
if ((TREE_CODE (mem) == INDIRECT_REF || TREE_CODE (mem) == MEM_REF)
&& TREE_CODE (TREE_OPERAND (mem, 0)) == SSA_NAME)
{
basic_block def_bb;
def_bb = gimple_bb (SSA_NAME_DEF_STMT (TREE_OPERAND (mem, 0)));
re... | false | false | false | false | false | 0 |
http_cgi_variable(List *list, char *name)
{
int i;
HTTPCGIVar *v;
gwlib_assert_init();
gw_assert(list != NULL);
gw_assert(name != NULL);
for (i = 0; i < gwlist_len(list); ++i) {
v = gwlist_get(list, i);
if (octstr_str_compare(v->name, name) == 0)
return v->value;
... | false | false | false | false | false | 0 |
_mpt3sas_init(void)
{
int error;
pr_info("%s version %s loaded\n", MPT3SAS_DRIVER_NAME,
MPT3SAS_DRIVER_VERSION);
mpt3sas_transport_template =
sas_attach_transport(&mpt3sas_transport_functions);
if (!mpt3sas_transport_template)
return -ENODEV;
/* No need attach mpt3sas raid functions template
* if ... | false | false | false | false | false | 0 |
memberof_make_member_filter( memberof_t *mo )
{
char *ptr;
if ( !BER_BVISNULL( &mo->mo_memberFilterstr ) ) {
ch_free( mo->mo_memberFilterstr.bv_val );
}
mo->mo_memberFilter.f_choice = LDAP_FILTER_PRESENT;
mo->mo_memberFilter.f_desc = mo->mo_ad_memberof;
mo->mo_memberFilterstr.bv_len = STRLENOF( "(=*)" )
+... | false | false | false | false | false | 0 |
vbh_frevbfig (listvbfig)
struct vbfig *listvbfig; /* list of vbfig to be deleted */
{
struct vbfig *ptvbfig;
/* ###------------------------------------------------------### */
/* for each object of the list, first delete pointed objects */
/* then, delete the object itself */
/* ###---------------------... | false | false | false | false | false | 0 |
SetChecked(wxArrayString items)
{
size_t item = 0;
while(item < items.GetCount())
{
m_checkList->Check(m_checkList->FindString(items.Item(item), true));
item++;
}
} | false | false | false | false | false | 0 |
cik_hdp_flush_cp_ring_emit(struct radeon_device *rdev,
int ridx)
{
struct radeon_ring *ring = &rdev->ring[ridx];
u32 ref_and_mask;
switch (ring->idx) {
case CAYMAN_RING_TYPE_CP1_INDEX:
case CAYMAN_RING_TYPE_CP2_INDEX:
default:
switch (ring->me) {
case 0:
ref_and_mask = CP2 << ring->pipe;
bre... | false | false | false | false | false | 0 |
static__L(Class *class, MethodBlock *mb, uintptr_t *ostack) {
if(!initJNILrefs())
return NULL;
*ostack = (uintptr_t)REF_TO_OBJ((*(uintptr_t (*)(void*, void*))mb->code) (
&jni_env,
class));
return ostack + 1;
} | false | false | false | false | false | 0 |
BigDecimal_ceil(int argc, VALUE *argv, VALUE self)
{
ENTER(5);
Real *c, *a;
int iLoc;
VALUE vLoc;
size_t mx, pl = VpSetPrecLimit(0);
if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
iLoc = 0;
} else {
Check_Type(vLoc, T_FIXNUM);
iLoc = FIX2INT(vLoc);
}
GUARD_OBJ(... | false | false | false | false | false | 0 |
embryo_data_heap_pop(Embryo_Program *ep, Embryo_Cell down_to)
{
if (!ep) return;
if (down_to < 0) down_to = 0;
if (ep->hea > down_to) ep->hea = down_to;
} | false | false | false | false | false | 0 |
hwdep_lock(struct snd_tscm *tscm)
{
int err;
spin_lock_irq(&tscm->lock);
if (tscm->dev_lock_count == 0) {
tscm->dev_lock_count = -1;
err = 0;
} else {
err = -EBUSY;
}
spin_unlock_irq(&tscm->lock);
return err;
} | false | false | false | false | false | 0 |
_PyTraceback_Add(char *funcname, char *filename, int lineno)
{
PyObject *globals = NULL;
PyCodeObject *code = NULL;
PyFrameObject *frame = NULL;
PyObject *exception, *value, *tb;
/* Save and clear the current exception. Python functions must not be
called with an exception set. Calling Pytho... | false | true | false | false | false | 1 |
test_s(obj, fname)
VALUE obj, fname;
{
struct stat st;
if (rb_stat(fname, &st) < 0) return Qnil;
if (st.st_size == 0) return Qnil;
return OFFT2NUM(st.st_size);
} | false | false | false | false | false | 0 |
fli_internal_init( void )
{
static FLI_TARGET *default_flx;
if ( ! default_flx )
default_flx = fl_calloc( 1, sizeof *default_flx );
return flx = default_flx;
} | false | false | false | false | false | 0 |
domainScopdesDel(AjPScopdes *Pscopdes)
{
if((Pscopdes == NULL) || (*Pscopdes == NULL))
return;
if((*Pscopdes)->Type)
ajStrDel(&((*Pscopdes)->Type));
if((*Pscopdes)->Sccs)
ajStrDel(&((*Pscopdes)->Sccs));
if((*Pscopdes)->Entry)
ajStrDel(&((*Pscopdes)->Entry));
if((*... | false | false | false | false | false | 0 |
LearnIR(uint32_t *freq, uint32_t **ir_signal,
uint32_t *ir_signal_length, lc_callback cb, void *cb_arg,
uint32_t cb_stage)
{
int err = 0;
uint32_t cb_count = 0;
const uint8_t msg_one[MH_MAX_PACKET_SIZE] =
{ 0xFF, 0x01, 0x00, 0x02, 0x80, '/', 'i', 'r', '/', 'i', 'r',
'_', 'c', 'a', 'p', 0x00, 0x80, 'R', 0x... | false | false | false | false | false | 0 |
__mlx4_zone_remove_one_entry(struct mlx4_zone_entry *entry)
{
struct mlx4_zone_allocator *zone_alloc = entry->allocator;
if (!list_empty(&entry->prio_list)) {
/* Check if we need to add an alternative node to the prio list */
if (!list_is_last(&entry->list, &zone_alloc->entries)) {
struct mlx4_zone_entry *nex... | false | false | false | false | false | 0 |
AddCacheEntry(const char* key,
const char* value,
const char* helpString,
CacheEntryType type)
{
CacheEntry& e = this->Cache[key];
e.Properties.SetCMakeInstance(this->CMakeInstance);
if ( value )
{
e.V... | false | false | false | false | false | 0 |
_find_source (GstElement *src)
{
GstElement *source = NULL;
if (GST_IS_BIN (src)) {
GstIterator *it = gst_bin_iterate_sources (GST_BIN(src));
gboolean done = FALSE;
GstElement *item = NULL;
while (!done) {
switch (gst_iterator_next (it, &item)) {
case GST_ITERATOR_OK:
sour... | false | false | false | false | false | 0 |
compiler_assert(struct compiler *c, stmt_ty s)
{
static PyObject *assertion_error = NULL;
basicblock *end;
if (Py_OptimizeFlag)
return 1;
if (assertion_error == NULL) {
assertion_error = PyString_InternFromString("AssertionError");
if (assertion_error == NULL)
return... | false | false | false | false | false | 0 |
rescale(ppm_data_t *ppm_data, struct ppm_context *context)
{
int old_ns, i, adder, esc_freq, n0, n1;
struct state_tag *p1, *p;
rar_dbgmsg("in rescale\n");
old_ns = context->num_stats;
i = context->num_stats-1;
for (p=ppm_data->found_state ; p != context->con_ut.u.stats ; p--) {
ppmd_swap(&p[0], &p[-1]);
}
... | false | false | false | false | false | 0 |
_e_wid_fsel_favorites_files_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
E_Widget_Data *wd;
Eina_List *icons, *l;
E_Fm2_Icon_Info *ici;
const char *rp;
char *p1, *p2;
wd = data;
if (!wd->o_favorites_fm) return;
if (!wd->o_files_fm) return;
icons = e_fm2_all... | false | false | false | false | false | 0 |
establish_preds (struct loop *loop, struct loop *father)
{
loop_p ploop;
unsigned depth = loop_depth (father) + 1;
unsigned i;
loop->superloops = 0;
vec_alloc (loop->superloops, depth);
FOR_EACH_VEC_SAFE_ELT (father->superloops, i, ploop)
loop->superloops->quick_push (ploop);
loop->superloops->quick_... | false | false | false | false | false | 0 |
iwlagn_tx_cmd_build_hwcrypto(struct iwl_priv *priv,
struct ieee80211_tx_info *info,
struct iwl_tx_cmd *tx_cmd,
struct sk_buff *skb_frag)
{
struct ieee80211_key_conf *keyconf = info->control.hw_key;
switch (keyconf->cipher) {
case WLAN_CIPHER_SUITE_CCMP:
tx_cmd->sec_ctl = TX_CMD_SEC_CCM;
memcpy... | false | false | false | false | false | 0 |
e_cell_toggle_new (const gchar **icon_names,
guint n_icon_names)
{
ECellToggle *cell_toggle;
g_return_val_if_fail (icon_names != NULL, NULL);
g_return_val_if_fail (n_icon_names > 0, NULL);
cell_toggle = g_object_new (E_TYPE_CELL_TOGGLE, NULL);
e_cell_toggle_construct (cell_toggle, icon_names, ... | false | false | false | false | false | 0 |
mxf_metadata_rgba_picture_essence_descriptor_handle_tag (MXFMetadataBase *
metadata, MXFPrimerPack * primer, guint16 tag, const guint8 * tag_data,
guint tag_size)
{
MXFMetadataRGBAPictureEssenceDescriptor *self =
MXF_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR (metadata);
gboolean ret = TRUE;
switch (... | false | false | false | false | false | 0 |
read_beacon(struct east_state *es, struct ieee80211_frame *wh, int len)
{
ieee80211_mgt_beacon_t b = (ieee80211_mgt_beacon_t) (wh+1);
u_int16_t capa;
int bhlen = 12;
int got_ssid = 0, got_channel = 0;
struct owned *own = es->es_owned;
len -= sizeof(*wh) + bhlen;
if (len < 0) {
printf("Short beacon %d\n", len)... | true | true | false | false | false | 1 |
dewarpMinimize(L_DEWARP *dew)
{
L_DEWARP *dewt;
PROCNAME("dewarpMinimize");
if (!dew)
return ERROR_INT("dew not defined", procName, 1);
/* If dew is a ref, minimize the actual dewarp */
if (dew->hasref)
dewt = dewarpaGetDewarp(dew->dewa, dew->refpage);
else
dewt = de... | false | false | false | false | false | 0 |
cmd_cmdinfo_long()
{
cmdrec_t *c, *c_next;
int num_cols = 2;
int col, row, num_rows, tot, have_flags = 0;
u_long flags = 0L;
char line[160], levels[FLAGSHORTLEN];
/* First token is '-l'. If 2nd token exists, check for levels */
if(isequal(cmdinfo.tok1,"-l"))
{
if(cmdinfo.istok2)
{
User_str2flags(cmdinf... | true | true | false | false | false | 1 |
ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr)
{
u32 vector;
u32 vector_bit;
u32 vector_reg;
hw->addr_ctrl.mta_in_use++;
vector = ixgbe_mta_vector(hw, mc_addr);
hw_dbg(hw, " bit-vector = 0x%03X\n", vector);
/*
* The MTA is a register array of 128 32-bit registers. It is treated
* like an array of 4096 bi... | false | false | false | false | false | 0 |
test_revert_workdir__rename(void)
{
git_commit *head, *commit;
git_oid head_oid, revert_oid;
git_revert_options opts = GIT_REVERT_OPTIONS_INIT;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "55acf326a69f0aab7a974ec53ffa55a50bcac14e", 1, "file4.txt" },
{ 0100644, "55acf326a69f0aab7a974ec53ffa55a... | false | false | false | false | false | 0 |
EncoderSession_finish_ok(EncoderSession *e, int info_align_carry, int info_align_zero, foreign_metadata_t *foreign_metadata)
{
FLAC__StreamEncoderState fse_state = FLAC__STREAM_ENCODER_OK;
int ret = 0;
FLAC__bool verify_error = false;
if(e->encoder) {
fse_state = FLAC__stream_encoder_get_state(e->encoder);
ret... | false | false | false | false | false | 0 |
GetWaitObjects(WaitObjectContainer &container, CallStack const& callStack)
{
if (BlockedBySpeedLimit())
LimitedBandwidth::GetWaitObjects(container, CallStack("NetworkSink::GetWaitObjects() - speed limit", &callStack));
else if (m_wasBlocked)
AccessSender().GetWaitObjects(container, CallStack("NetworkSink::GetWait... | false | false | false | false | false | 0 |
vectorLoop (const string& tname, const string& vecname, const string& cexp)
{
// -- declare the vector
fClass->addSharedDecl(vecname);
// -- variables moved as class fields...
fClass->addDeclCode(subst("$0 \t$1[$2];", tname, vecname, T(gVecSize)));
// -- compute the new samples
fCla... | 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.