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 |
|---|---|---|---|---|---|---|
OnPaint( wxPaintEvent& WXUNUSED(event) )
{
wxPaintDC dc(this);
// Update everything inside the box
wxRect r = GetUpdateRegion().GetBox();
// Draw separator
if (GetExtraStyle() & wxPG_EX_TOOLBAR_SEPARATOR)
{
if (m_pToolbar && m_pPropGrid)
{
wxPen marginPen(m_pPropGri... | false | false | false | false | false | 0 |
stdin_input()
{
char buf[MAXLINE];
size_t size;
size_t i;
int masterfd = pty_pair_get_masterfd(pty_pair);
if (masterfd == -1) {
logger_write_pos(logger, __FILE__, __LINE__,
"pty_pair_get_masterfd error");
return -1;
}
size = read(STDIN_FILENO, buf, MAXLINE ... | true | true | false | false | true | 1 |
do_copy(line1, line2, n)
linenr_t line1;
linenr_t line2;
linenr_t n;
{
linenr_t lnum;
char_u *p;
mark_adjust(n + 1, MAXLNUM, line2 - line1 + 1);
/*
* there are three situations:
* 1. destination is above line1
* 2. destination is between line1 and line2
* 3. destination is below line2
*
* n = de... | false | false | false | false | false | 0 |
operator==(const QServiceInterfaceDescriptor& other) const
{
if (isValid() ^ other.isValid())
return false;
if (!d)
return true;
if ((*d) == *(other.d))
return true;
return false;
} | false | false | false | false | false | 0 |
add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp,
int uncond, enum reg_note dep_type)
{
rtx list, next;
/* We don't want to short-circuit dependencies involving debug
insns, because they may cause actual dependencies to be
disregarded. */
if (dep... | false | false | false | false | false | 0 |
stid127_fix_retime_src(void *priv, u32 spd)
{
struct sti_dwmac *dwmac = priv;
u32 reg = dwmac->ctrl_reg;
u32 freq = 0;
u32 val = 0;
if (dwmac->interface == PHY_INTERFACE_MODE_MII) {
val = STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK;
} else if (dwmac->interface == PHY_INTERFACE_MODE_RMII) {
if (!dwmac->ext_phyclk) ... | false | false | false | false | false | 0 |
ndnfcopy(F *from,F *to,I nfs)
{
unsigned char *cfrom=(unsigned char *)from, *cto=(unsigned char *)to;
for(;nfs--;cfrom+=8,cto+=8)
{
cto[7]=cfrom[0];cto[6]=cfrom[1];cto[5]=cfrom[2];cto[4]=cfrom[3];
cto[3]=cfrom[4];cto[2]=cfrom[5];cto[1]=cfrom[6];cto[0]=cfrom[7];
}
} | false | false | false | false | true | 1 |
tracker_turtle_reader_expect (TrackerTurtleReader* self, TrackerSparqlTokenType type, GError** error) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
TrackerSparqlTokenType _tmp1_ = 0;
gboolean _tmp2_ = FALSE;
TrackerSparqlTokenType _tmp3_ = 0;
const gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
gchar* _tmp6_... | false | false | false | false | false | 0 |
AllocateImage()
{
delete [] this->Image;
this->Image = NULL;
if ( this->ImageMemorySize[0] > 0 &&
this->ImageMemorySize[1] > 0 )
{
this->Image = new unsigned short [ ( 4 *
this->ImageMemorySize[0] *
this->ImageMem... | false | false | false | false | false | 0 |
ItclHandleStubCmd(clientData, interp, objc, objv)
ClientData clientData; /* command token for this stub */
Tcl_Interp *interp; /* current interpreter */
int objc; /* number of arguments */
Tcl_Obj *CONST objv[]; /* argument objects */
{
Tcl_Command cmd = (Tcl_Command) clientD... | false | false | false | false | false | 0 |
ticket_checkin(
time_t date, /* date/time of the change */
int cn, /* change number */
const char *zBranch, /* branch of the change, may be NULL */
const char *zUser, /* user name that made the change */
const char *zMessage /* log message for the change */
){
struct tm *pTm;
c... | true | true | false | false | false | 1 |
op_from_string (const char *p,
int *len)
{
*len = 0;
switch (*p)
{
case '+':
*len = 1;
return POS_OP_ADD;
case '-':
*len = 1;
return POS_OP_SUBTRACT;
case '*':
*len = 1;
return POS_OP_MULTIPLY;
case '/':
*len = 1;
return P... | false | false | false | false | false | 0 |
get_attribute_options(Oid attrelid, int attnum)
{
AttoptCacheKey key;
AttoptCacheEntry *attopt;
AttributeOpts *result;
HeapTuple tp;
/* Find existing cache entry, if any. */
if (!AttoptCacheHash)
InitializeAttoptCache();
memset(&key, 0, sizeof(key)); /* make sure any padding bits are
* unset */
k... | false | false | false | false | false | 0 |
operator<< (std::ostream&os, const EdgeList& el)
{
os << "EdgeList: " << std::endl;
for(std::size_t j=0, s=el.edges.size(); j<s; ++j)
{
Edge *e=el.edges[j];
os << " " << *e << std::endl;
}
return os;
} | false | false | false | false | false | 0 |
parse_llc(unsigned char ** buf, int len, struct packet_info* p)
{
DEBUG("* parse LLC\n");
if (len < 6)
return -1;
/* check type in LLC header */
*buf = *buf + 6;
if (**buf != 0x08)
return -1;
(*buf)++;
if (**buf == 0x06) { /* ARP */
p->pkt_types |= PKT_TYPE_ARP;
return 0;
}
if (**buf != 0x00) /* not... | false | false | false | false | false | 0 |
gf_quat_get_inv(GF_Vec4 *quat)
{
GF_Vec4 ret = *quat;
gf_quat_conjugate(&ret);
gf_quat_norm(ret);
return ret;
} | false | false | false | false | false | 0 |
setPitchOption(Options options)
{
if (!m_realtime) {
cerr << "RubberBandStretcher::Impl::setPitchOption: Pitch option is not used in non-RT mode" << endl;
return;
}
Options prior = m_options;
int mask = (OptionPitchHighQuality |
OptionPitchHighSpeed |
Op... | false | false | false | false | false | 0 |
tty_tiocmget(struct tty_struct *tty, int __user *p)
{
int retval = -EINVAL;
if (tty->ops->tiocmget) {
retval = tty->ops->tiocmget(tty);
if (retval >= 0)
retval = put_user(retval, p);
}
return retval;
} | false | false | false | false | false | 0 |
formrdesc(const char *relationName, Oid relationReltype,
bool hasoids, int natts, FormData_pg_attribute *att)
{
Relation relation;
int i;
bool has_not_null;
/*
* allocate new relation desc, clear all fields of reldesc
*/
relation = (Relation) palloc0(sizeof(RelationData));
relation->rd_targblock = Inv... | false | false | false | false | false | 0 |
i915_gem_idle_work_handler(struct work_struct *work)
{
struct drm_i915_private *dev_priv =
container_of(work, typeof(*dev_priv), mm.idle_work.work);
struct drm_device *dev = dev_priv->dev;
struct intel_engine_cs *ring;
int i;
for_each_ring(ring, dev_priv, i)
if (!list_empty(&ring->request_list))
return;
... | false | false | false | false | false | 0 |
b_qsort_matrix_rows_descending_real(PRECISION *x, int m, int n, int br, int er, int idx)
{
PRECISION y, c;
int i, j, k;
if (er-br+1 > 10)
{
// quick sort
if (x[idx+br] == x[idx+er])
c=x[idx+br];
else
{
if (x[idx+br] < x[idx+er])
for (i=(n-1)*m; i >= 0; i-=m)
{ y... | false | false | false | false | false | 0 |
set_default_cb(struct mcap_mcl *mcl)
{
if (!mcl->cb)
mcl->cb = g_new0(struct mcap_mdl_cb, 1);
mcl->cb->mdl_connected = default_mdl_connected_cb;
mcl->cb->mdl_closed = default_mdl_closed_cb;
mcl->cb->mdl_deleted = default_mdl_deleted_cb;
mcl->cb->mdl_aborted = default_mdl_aborted_cb;
mcl->cb->mdl_conn_req = def... | false | false | false | false | false | 0 |
cv_get_pixbuf ( void )
{
GdkPixbuf * pixbuf = NULL;
if ( cv.pixmap != NULL )
{
gint w,h;
gdk_drawable_get_size ( cv.pixmap, &w, &h );
pixbuf = gdk_pixbuf_get_from_drawable ( NULL,
cv.pixmap,
gdk_drawable_get_colormap (cv.pixmap)... | false | false | false | false | false | 0 |
krb5_free_checksum_contents(krb5_context context, register krb5_checksum *val)
{
if (val == NULL)
return;
free(val->contents);
val->contents = NULL;
} | false | false | false | false | false | 0 |
emitGPDisp(MachineFunction &F, const MipsInstrInfo *TII) {
MachineBasicBlock &MBB = F.front();
MachineBasicBlock::iterator I = MBB.begin();
DebugLoc DL = MBB.findDebugLoc(MBB.begin());
BuildMI(MBB, I, DL, TII->get(Mips::LUi), Mips::V0)
.addExternalSymbol("_gp_disp", MipsII::MO_ABS_HI);
BuildMI(MBB, I, DL,... | false | false | false | false | false | 0 |
proc_cap_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table t;
unsigned long cap_array[_KERNEL_CAPABILITY_U32S];
kernel_cap_t new_cap;
int err, i;
if (write && (!capable(CAP_SETPCAP) ||
!capable(CAP_SYS_MODULE)))
return -EPERM;
/*
* co... | false | false | false | false | false | 0 |
ip_address_filter_cb (GtkEntry * entry,
const gchar *text,
gint length,
gint * position,
gpointer user_data)
{
GtkWidget *ok_button = user_data;
GtkEditable *editable = GTK_EDITABLE (entry);
int i, count = 0;
... | false | false | false | false | false | 0 |
color_map_loaded (struct color_map_load_state *state, char const *uri, gboolean delete_invalid)
{
GSList *ptr;
if (!state->map || state->map->name)
return;
state->map->name = state->name;
/* populates the colors */
/* first sort the color list according to bins */
ptr = state->color_stops = g_slist_sort (state-... | false | false | false | false | false | 0 |
mdb_sql_free_tables(GPtrArray *tables)
{
unsigned int i;
if (!tables) return;
for (i=0; i<tables->len; i++) {
MdbSQLTable *t = (MdbSQLTable *)g_ptr_array_index(tables, i);
g_free(t->name);
g_free(t);
}
g_ptr_array_free(tables, TRUE);
} | false | false | false | false | false | 0 |
terminal_app_get_profile_by_visible_name (TerminalApp *app,
const char *name)
{
LookupInfo info;
g_return_val_if_fail (TERMINAL_IS_APP (app), NULL);
g_return_val_if_fail (name != NULL, NULL);
info.result = NULL;
info.target = name;
g_hash_table_foreach (app->prof... | false | false | false | false | false | 0 |
abraca_collections_model_on_collection_add (AbracaCollectionsModel* self, AbracaClient* c, const gchar* name, const gchar* ns) {
GtkTreeIter iter = {0};
GtkTreeIter parent = {0};
GdkPixbuf* pixbuf = NULL;
AbracaCollectionsModelCollectionType type = 0;
const gchar* _tmp0_;
gchar _tmp1_ = '\0';
const gchar* _tmp2_... | false | false | false | false | false | 0 |
dup_citekeys( bibl *b, list *citekeys )
{
int i, j, *dup, ndup=0;
dup = ( int * ) malloc( sizeof( int ) * citekeys->n );
if ( !dup ) return 0;
for ( i=0; i<citekeys->n; ++i ) dup[i] = -1;
for ( i=0; i<citekeys->n-1; ++i ) {
if ( dup[i]!=-1 ) continue;
for ( j=i+1; j<citekeys->n; ++j ) {
if ( !strcmp( citeke... | false | false | false | false | false | 0 |
Ns_OpenSSLSockAccept(SOCKET sock, NsOpenSSLContext *sslcontext)
{
NsOpenSSLConn *sslconn = NULL;
if (sock == INVALID_SOCKET) {
Ns_Log(Error, "%s (%s): attempted accept on invalid socket",
MODULE, sslcontext->server);
return NULL;
}
/*
* Wrap SSL around socket.
... | false | false | false | false | false | 0 |
findRowCover(unsigned int &startrow, unsigned int &endrow,
const QVector<int> &rowPos,
int min_y, int max_y)
{
assert(max_y >= min_y);
unsigned int totalRows = endrow;
unsigned int index = 0;
// Initial binary search boost:
if (totalRows >= 8) {
... | false | false | false | false | false | 0 |
AcpiRsDumpIrqList (
UINT8 *RouteTable)
{
ACPI_PCI_ROUTING_TABLE *PrtElement;
UINT8 Count;
ACPI_FUNCTION_ENTRY ();
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
{
return;
}
PrtElement ... | false | false | false | false | false | 0 |
SP_info_player_start(edict_t * self)
{
if (!coop->value)
return;
if (Q_stricmp(level.mapname, "security") == 0) {
// invoke one of our gross, ugly, disgusting hacks
self->think = SP_CreateCoopSpots;
self->nextthink = level.time + FRAMETIME;
}
} | false | false | false | false | false | 0 |
WaypointReached(uint32 uiPointId) override
{
switch (uiPointId)
{
case 0:
if (GameObject* pCage = m_creature->GetMap()->GetGameObject(m_galensCageGuid))
{
pCage->ResetDoorOrButton();
}
break;
... | false | false | false | false | false | 0 |
gatherLockStats(
STAT_GATHER * pStatGather,
FFILE * pFile)
{
LOCK_USER_HEADER_p pTmp;
RCODE rc;
flmAssert( pStatGather);
flmAssert( pFile);
// Allocate a new LOCK_USER_HEADER and link it into the list.
if( RC_BAD( rc = f_alloc( sizeof( LOCK_USER_HEADER), &pTmp)))
{
goto Exit;
}
pTmp->pNext =... | false | false | false | false | false | 0 |
nvc0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem)
{
struct nvkm_mem *node = old_mem->mm_node;
u64 src_offset = node->vma[0].offset;
u64 dst_offset = node->vma[1].offset;
u32 page_count = new_mem->num_pages;
int ret;
page_co... | false | false | false | false | false | 0 |
add_budget_to_model(QofInstance* data, gpointer user_data )
{
GtkTreeIter iter;
GncBudget* budget = GNC_BUDGET(data);
GtkTreeModel* treeModel = user_data;
g_return_if_fail(GNC_IS_BUDGET(budget));
g_return_if_fail(budget && treeModel);
gtk_list_store_append (GTK_LIST_STORE(treeModel), &iter);
... | false | false | false | false | false | 0 |
switch_sign(void)
{
if ((token_type == SEP_TT)&&(token_value == COLON_SEP)) return 1;
if ((token_type == SEP_TT)&&(token_value == COMMA_SEP)) return 2;
if ((token_type==MISC_KEYWORD_TT)&&(token_value==TO_MK)) return 3;
return 0;
} | false | false | false | false | false | 0 |
radeon_bo_move_notify(struct ttm_buffer_object *bo,
struct ttm_mem_reg *new_mem)
{
struct radeon_bo *rbo;
if (!radeon_ttm_bo_is_radeon_bo(bo))
return;
rbo = container_of(bo, struct radeon_bo, tbo);
radeon_bo_check_tiling(rbo, 0, 1);
radeon_vm_bo_invalidate(rbo->rdev, rbo);
/* update statistics */
if (... | false | false | false | false | false | 0 |
mng_delta_replacement(adv_mng* mng, unsigned pos_x, unsigned pos_y, unsigned width, unsigned height)
{
unsigned i;
unsigned bytes_per_run = width * mng->pixel;
unsigned delta_bytes_per_scanline = bytes_per_run + 1;
unsigned char* p0 = mng->dat_ptr + pos_y * mng->dat_line + pos_x * mng->pixel + 1;
unsigned char* p1... | false | true | false | false | false | 1 |
CascadeExponentiate(const Element &element1, const Integer &exponent1, const Element &element2, const Integer &exponent2) const
{
ModularArithmetic ma(GetModulus());
return ma.CascadeExponentiate(element1, exponent1, element2, exponent2);
} | false | false | false | false | false | 0 |
delsym(symptr)
register struct symstruct *symptr;
{
if ((*(symptr->prev) = symptr->next) != NULL)
symptr->next->prev = symptr->prev;
} | false | false | false | false | false | 0 |
e_fm2_op_registry_entry_files_set(E_Fm2_Op_Registry_Entry *entry, const char *src, const char *dst)
{
if (!entry) return;
eina_stringshare_replace(&entry->src, src);
eina_stringshare_replace(&entry->dst, dst);
} | false | false | false | false | false | 0 |
cache_file_write(request_rec *r, const mu_ent *const p, const char *const filename)
{
const mu_config *const conf = (mu_config *)ap_get_module_config(r->per_dir_config, &musicindex_module);
int fdesc;
FILE *cache_file = NULL;
/* we don't deal with directories themselves */
if (p->filetype < 0)
return;
if (ch... | false | false | false | false | false | 0 |
egd_status(void)
{
int fd;
fd = connect_egd(egd_path);
if (fd < 0)
return 0;
close(fd);
return 1;
} | false | false | false | false | false | 0 |
nv_adma_port_start(struct ata_port *ap)
{
struct device *dev = ap->host->dev;
struct nv_adma_port_priv *pp;
int rc;
void *mem;
dma_addr_t mem_dma;
void __iomem *mmio;
struct pci_dev *pdev = to_pci_dev(dev);
u16 tmp;
VPRINTK("ENTER\n");
/* Ensure DMA mask is set to 32-bit before allocating legacy PRD and
... | false | false | false | false | false | 0 |
load_cube_gauss_orbitals_file(GabeditFileChooser *SelecFile, gint response_id)
{
gchar *FileName;
if(response_id != GTK_RESPONSE_OK) return;
FileName = gabedit_file_chooser_get_current_file(SelecFile);
gtk_widget_hide(GTK_WIDGET(SelecFile));
while( gtk_events_pending() )
gtk_main_iteration();
TypeGrid = GAB... | false | false | false | false | false | 0 |
remove(FileWatch *watch) {
Node *l, *prev;
l = first;
prev = NULL;
while (l) {
if (l->watch == watch) {
if (prev)
prev->next = l->next;
else
first = l->next;
delete l;
break;
}
prev = l;
l = prev->next;
}
} | false | false | false | false | false | 0 |
prepare_child(sigset_t *nset, int infd, int outfd)
{
int i;
sigset_t fset;
/*
* All file descriptors other than 0, 1, and 2 are supposed to be
* close-on-exec.
*/
if (infd >= 0)
dup2(infd, 0);
if (outfd >= 0)
dup2(outfd, 1);
if (nset) {
for (i = 1; i < NSIG; i++)
if (sigismember(nset, i))
safe... | false | false | false | false | false | 0 |
docImpl() const
{
if ( d && d->m_doc && d->m_doc->isHTMLDocument() )
return static_cast<HTMLDocumentImpl*>(d->m_doc);
return 0;
} | false | false | false | false | false | 0 |
addSupportedFormat(GnashWebcam *cam, WebcamVidFormat *video_format,
GstStructure *format_structure)
{
gint i;
gchar *resolution;
getSupportedFramerates(video_format, format_structure);
findHighestFramerate(video_format);
resolution = g_strdup_printf ("%ix%i", video_format->width,
... | false | false | false | false | false | 0 |
rounds(ulong32 *P, ulong32 *K)
{
ulong32 T, T2;
int i;
for (i = 0; i < 16; i += 2) {
F(P[0], P[1], P[2], P[3], K[0], K[1]);
F(P[2], P[3], P[0], P[1], K[2], K[3]);
K += 4;
}
} | false | false | false | false | false | 0 |
xm_note_off(DUMB_IT_SIGDATA *sigdata, IT_CHANNEL *channel)
{
if (channel->playing) {
if (!(sigdata->instrument[channel->instrument-1].volume_envelope.flags & IT_ENVELOPE_ON))
//if (!(entry->mask & IT_ENTRY_INSTRUMENT))
// dunno what that was there for ...
channel->volume = 0;
channel->playing->flags |= I... | false | false | false | false | false | 0 |
fetch_remote(const char *name)
{
const char *argv[] = { "fetch", name, NULL, NULL };
if (verbose) {
argv[1] = "-v";
argv[2] = name;
}
printf("Updating %s\n", name);
if (run_command_v_opt(argv, RUN_GIT_CMD))
return error("Could not fetch %s", name);
return 0;
} | false | false | false | false | false | 0 |
_nrrdDDG1_f(float x, const double *parm) {
float sig, cut;
sig = AIR_CAST(float, parm[0]);
cut = AIR_CAST(float, parm[1]);
x = AIR_ABS(x);
return AIR_CAST(float, _DDGAUSS(x, sig, cut));
} | false | false | false | false | false | 0 |
giraffe_wlresiduals_get_element(const GiWlResiduals *self, cxsize idx)
{
const GiWlResidualData *data = NULL;
cx_assert(self != NULL);
data = _giraffe_wlresiduals_get(self, idx);
if (data == NULL) {
return NULL;
}
return data->fit;
} | false | false | false | false | false | 0 |
json_find(json *j, const char *name)
{
while (j && name)
{
if (j->name)
{
if (!strcmp(name, j->name))
return j;
}
j = j->next;
}
return NULL;
} | false | false | false | false | false | 0 |
opal_net_isaddr(const char *name)
{
struct addrinfo hint, *res = NULL;
/* initialize the hint */
memset(&hint, '\0', sizeof hint);
/* indicate that we don't know the family */
hint.ai_family = PF_UNSPEC;
hint.ai_flags = AI_NUMERICHOST;
if (0 != getaddrinfo(name, NULL, &hint, &res)) {
... | false | false | false | false | false | 0 |
fullpath(char *path, char *name) {
static char *fullpath=NULL;
int need_delim;
if (fullpath!=NULL) free(fullpath),fullpath=NULL;
if (path==NULL || *path==0) return name;
if ((unsigned char)path[strlen(path)-1]!=0xff) need_delim=1;
else need_delim=0;
if ((fullpath=malloc(strlen(path)+st... | false | false | false | false | false | 0 |
brasero_app_set_toplevel (BraseroApp *app, GtkWindow *window)
{
BraseroAppPrivate *priv;
priv = BRASERO_APP_PRIVATE (app);
if (!priv->mainwin_running) {
if (priv->parent) {
gtk_widget_realize (GTK_WIDGET (window));
gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (window)), priv->parent);
... | false | false | false | false | false | 0 |
evalCondition (string cond, Scope *scope, int level, StackFrame *stack, StaticLink *staticLink) {
#if defined(_CC_GCC) && __GNUC__ == 2
std::strstream stream ;
#else
std::stringstream stream ;
#endif
stream << cond ;
Context ctx (stream, aikido->currentContext) ;
aikido->currentContext = &ctx ;
... | false | false | false | false | false | 0 |
executeFCMP_OEQ(GenericValue Src1, GenericValue Src2,
Type *Ty) {
GenericValue Dest;
switch (Ty->getTypeID()) {
IMPLEMENT_FCMP(==, Float);
IMPLEMENT_FCMP(==, Double);
default:
dbgs() << "Unhandled type for FCmp EQ instruction: " << *Ty << "\n";
llvm_unreachable(0... | false | false | false | false | false | 0 |
build_xkb_options_string (gchar **options)
{
gchar *string;
if (*options) {
gint i;
gsize len;
gchar *ptr;
/* First part, getting length */
len = 1 + strlen (options[0]);
for (i = 1; options[i] != NULL; i++... | false | false | false | false | false | 0 |
kbd_led_triggers_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct kbd_state new_state;
struct kbd_state state;
bool triggers_enabled = false;
int trigger_bit = -1;
char trigger[21];
int i, ret;
ret = sscanf(buf, "%20s", trigger);
if (ret != 1)... | true | true | false | false | false | 1 |
gst_raw_parse_chain (GstPad * pad, GstBuffer * buffer)
{
GstRawParse *rp = GST_RAW_PARSE (gst_pad_get_parent (pad));
GstFlowReturn ret = GST_FLOW_OK;
GstRawParseClass *rp_class = GST_RAW_PARSE_GET_CLASS (rp);
guint buffersize;
if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT))) {
G... | false | false | false | false | false | 0 |
charsets_present_in_msg(MAILSTREAM *stream, long unsigned int rawmsgno, STRLIST_S *charsets)
{
BODY *body = NULL;
ENVELOPE *env = NULL;
STRLIST_S *msg_charsets = NULL;
int ret = 0;
if(charsets && stream && rawmsgno > 0L && rawmsgno <= stream->nmsgs){
env = pine_mail_fetchstructure... | false | false | false | false | false | 0 |
saveFile()
{
bool retVal;
char configFilename[256];
FILE *file;
const char *homeDir = getenv("HOME");
if(!homeDir)
homeDir = "./";
sprintf(configFilename, "%s/%s", homeDir, CONFIG_FILE);
alterPathForPlatform(configFilename);
file = fopen(configFilename, "w");
if(file)
{
#ifdef HAVE_LOCALE_H
char* loca... | false | false | false | false | false | 0 |
addressmap_register(const char *address, char *new_address, time_t expires,
addressmap_entry_source_t source,
const int wildcard_addr,
const int wildcard_new_addr)
{
addressmap_entry_t *ent;
if (wildcard_new_addr)
tor_assert(wildcard_addr);
ent = s... | false | false | false | false | false | 0 |
crypto_cipher_encrypt(Cipher_handle *cipher, unsigned char *input,
int input_len, unsigned char *output,
int *output_len)
{
if (output_len != NULL)
*output_len = 0;
return(internal_crypto_cipher(cipher, input, input_len, output, output_len));
} | false | false | false | false | false | 0 |
TryCompile(const char *srcdir, const char *bindir,
const char *projectName,
const char *target,
std::string *output, cmMakefile *mf)
{
// if this is not set, then this is a first time configure
// and there is a go... | false | false | false | false | false | 0 |
free_node(NODE *node)
{
if (node == NULL) return;
if (node->region->graphout) {
if (node->prevgraph != NULL && node->prevgraph->saved == FALSE) {
wordgraph_free(node->prevgraph);
}
}
/* save to stocker */
node->next = node->region->pass2.stocker_root;
node->region->pass2.stocker_root = node;... | false | false | false | false | false | 0 |
_comedi_command_test(comedi_t *it,comedi_cmd *t)
{
int ret;
if(!valid_dev(it)) return -1;
ret = comedi_ioctl(it->fd, COMEDI_CMDTEST, t);
__comedi_errno = errno;
switch(__comedi_errno){
case EIO:
__comedi_errno = ECMDNOTSUPP;
break;
}
return ret;
} | false | false | false | false | false | 0 |
tda18271_set_config(struct dvb_frontend *fe, void *priv_cfg)
{
struct tda18271_config *cfg = (struct tda18271_config *) priv_cfg;
tda18271_setup_configuration(fe, cfg);
if (tda18271_need_cal_on_startup(cfg))
tda18271_init(fe);
/* override default std map with values in config struct */
if ((cfg) && (cfg->std_... | false | false | false | false | false | 0 |
get_one_int (GtkTreeModel *model,
GtkTreeIter *iter,
int column,
guint32 max_value,
gboolean fail_if_missing,
guint32 *out)
{
char *item = NULL;
gboolean success = FALSE;
long int tmp_int;
gtk_tree_model_get (model, iter, column, &item, -1);
if (!it... | false | false | false | false | false | 0 |
selectUid()
{
QStringList blacklist;
blacklist << QString( "cn=manager,cn=internal,%1" ).arg( Connection::self()->baseDn() );
blacklist << QString( "cn=calendar,cn=internal,%1" ).arg( Connection::self()->baseDn() );
blacklist << QString( "cn=nobody,cn=internal,%1" ).arg( Connection::self()->baseDn() );
LdapS... | false | false | false | false | false | 0 |
kdb_exec_defcmd(int argc, const char **argv)
{
int i, ret;
struct defcmd_set *s;
if (argc != 0)
return KDB_ARGCOUNT;
for (s = defcmd_set, i = 0; i < defcmd_set_count; ++i, ++s) {
if (strcmp(s->name, argv[0]) == 0)
break;
}
if (i == defcmd_set_count) {
kdb_printf("kdb_exec_defcmd: could not find commands ... | true | true | false | false | false | 1 |
munge_tree(const char *intree, const char *outtree, const char *cribtree)
{
char *in_path, *out_path, *crib_path;
char *in_file, *out_file, *crib_file;
DIR *thisdir;
struct dirent *dirent;
struct stat dirst;
int err = 0;
/* Construct buffers with the common filename prefix, and point to the end */
i... | false | true | true | false | false | 1 |
on_heap_updated (HeapPtr heap,
ClusterPtr cluster)
{
heap_updated (cluster, heap);
} | false | false | false | false | false | 0 |
gcov_seq_show(struct seq_file *seq, void *data)
{
struct gcov_iterator *iter = data;
if (gcov_iter_write(iter, seq))
return -EINVAL;
return 0;
} | false | false | false | false | false | 0 |
aeDeleteFileEvent(aeEventLoop *eventLoop, int fd, int mask)
{
aeFileEvent *fe, *prev = NULL;
fe = eventLoop->fileEventHead;
while(fe) {
if (fe->fd == fd && fe->mask == mask) {
if (prev == NULL)
eventLoop->fileEventHead = fe->next;
else
prev->n... | false | false | false | false | false | 0 |
Lsharp_C_reader()
{
object x, c;
check_arg(3);
if (vs_base[2] != Cnil && !READsuppress)
extra_argument('C');
vs_popp;
vs_popp;
c = read_char(vs_base[0]);
if (char_code(c) != '(')
FEerror("A left parenthesis is expected.", 0);
delimiting_char = code_char(')');
x = read_object(vs_base[0]);
if (x == OBJNULL... | false | false | false | false | false | 0 |
get_map(struct kmem_cache *s, struct page *page, unsigned long *map)
{
void *p;
void *addr = page_address(page);
for (p = page->freelist; p; p = get_freepointer(s, p))
set_bit(slab_index(p, s, addr), map);
} | false | false | false | false | false | 0 |
lgl_xml_get_prop_double (xmlNodePtr node,
const gchar *property,
gdouble default_val)
{
gdouble val;
xmlChar *string;
string = xmlGetProp (node, (xmlChar *)property);
if ( string != NULL )
{
val = g_strtod... | false | false | false | false | false | 0 |
v4l2_pix_fmt_compat(struct v4l2_format *a, struct v4l2_format *b)
{
if (a->fmt.pix.width == b->fmt.pix.width &&
a->fmt.pix.height == b->fmt.pix.height &&
a->fmt.pix.pixelformat == b->fmt.pix.pixelformat &&
a->fmt.pix.field == b->fmt.pix.field)
return 1;
return 0;
} | false | false | false | false | false | 0 |
randombits(int bits)
{
int result;
if (random_stream < (1U << bits)) {
random_value *= 1082527;
random_stream = random_value;
}
result = random_stream & ((1<<bits)-1);
random_stream >>= bits;
return result;
} | false | false | false | false | false | 0 |
qla24xx_read_nvram_data(scsi_qla_host_t *vha, uint8_t *buf, uint32_t naddr,
uint32_t bytes)
{
uint32_t i;
uint32_t *dwptr;
struct qla_hw_data *ha = vha->hw;
if (IS_P3P_TYPE(ha))
return buf;
/* Dword reads to flash. */
dwptr = (uint32_t *)buf;
for (i = 0; i < bytes >> 2; i++, naddr++)
dwptr[i] = cpu_to... | false | false | false | false | false | 0 |
PutString( const TIXML_STRING& str, TIXML_OSTREAM* stream )
{
TIXML_STRING buffer;
PutString( str, &buffer );
(*stream) << buffer;
} | false | false | false | false | false | 0 |
test_format_item_type (void)
{
const gchar *type;
type = gkm_secret_compat_format_item_type (0);
g_assert_cmpstr (type, ==, "org.freedesktop.Secret.Generic");
type = gkm_secret_compat_format_item_type (1);
g_assert_cmpstr (type, ==, "org.gnome.keyring.NetworkPassword");
type = gkm_secret_compat_format_item_type ... | false | false | false | false | false | 0 |
r2cf_4(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
{
{
INT i;
for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(rs), MAKE_VOLATILE_STRIDE(csr), MAKE_VOLATILE_STRIDE(csi)) {
E T1, T2, T4, T5, T3, T... | false | false | false | false | false | 0 |
zx_DEC_ELEM_hrxml_OriginalDate(struct zx_ctx* c, struct zx_hrxml_OriginalDate_s* x)
{
struct zx_elem_s* el = x->gg.kids;
switch (el->g.tok) {
case zx_hrxml_AnyDate_ELEM:
if (!x->AnyDate)
x->AnyDate = el;
return 1;
case zx_hrxml_YearMonth_ELEM:
if (!x->YearMonth)
x->YearMonth = el;
re... | false | false | false | false | false | 0 |
irc_ns_name_unpack(const unsigned char *msg, const unsigned char *eom,
const unsigned char *src, unsigned char *dst,
size_t dstsiz)
{
const unsigned char *srcp, *dstlim;
unsigned char *dstp;
int n, len, checked, l;
len = -1;
checked = 0;
dstp = dst;
srcp = src;
dstlim = ds... | false | true | false | false | false | 1 |
copy_KDC_REP(const KDC_REP *from, KDC_REP *to)
{
memset(to, 0, sizeof(*to));
if(copy_krb5int32(&(from)->pvno, &(to)->pvno)) goto fail;
if(copy_MESSAGE_TYPE(&(from)->msg_type, &(to)->msg_type)) goto fail;
if((from)->padata) {
(to)->padata = malloc(sizeof(*(to)->padata));
if((to)->padata == NULL) goto fail;
if(copy_METHO... | false | false | false | false | false | 0 |
pt1_thread(void *data)
{
struct pt1 *pt1;
struct pt1_buffer_page *page;
pt1 = data;
set_freezable();
while (!kthread_should_stop()) {
try_to_freeze();
page = pt1->tables[pt1->table_index].bufs[pt1->buf_index].page;
if (!pt1_filter(pt1, page)) {
schedule_timeout_interruptible((HZ + 999) / 1000);
cont... | false | false | false | false | false | 0 |
visit(ir_dereference_variable *ir)
{
/* If we're not somewhere inside a loop, there's nothing to do.
*/
if (this->state.is_empty())
return visit_continue;
loop_variable_state *const ls =
(loop_variable_state *) this->state.get_head();
ir_variable *var = ir->variable_referenced();
loop_v... | false | false | false | false | false | 0 |
duramar2150_c2port_init(void)
{
struct resource *res;
int ret = 0;
res = request_region(0x325, 2, "c2port");
if (!res)
return -EBUSY;
duramar2150_c2port_dev = c2port_device_register("uc",
&duramar2150_c2port_ops, NULL);
if (IS_ERR(duramar2150_c2port_dev)) {
ret = PTR_ERR(duramar2150_c2port_dev);
goto... | false | false | false | false | false | 0 |
dmar_insert_one_dev_info(struct intel_iommu *iommu,
int bus, int devfn,
struct device *dev,
struct dmar_domain *domain)
{
struct dmar_domain *found = NULL;
struct device_domain_info *info;
unsigned long flags;
int ret;
info = alloc_devinfo_mem();
if (!info)
return NULL;
info->bu... | false | false | false | false | false | 0 |
onion_skin_create(crypto_pk_t *dest_router_key,
crypto_dh_t **handshake_state_out,
char *onion_skin_out) /* ONIONSKIN_CHALLENGE_LEN bytes */
{
char challenge[DH_KEY_LEN];
crypto_dh_t *dh = NULL;
int dhbytes, pkbytes;
tor_assert(dest_router_key);
tor_assert(handshake_state_... | 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.