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 |
|---|---|---|---|---|---|---|
elm_slideshow_cache_after_set(Evas_Object *obj,
int count)
{
ELM_SLIDESHOW_CHECK(obj);
ELM_SLIDESHOW_DATA_GET(obj, sd);
if (count < 0) count = 0;
sd->count_item_pre_after = count;
} | false | false | false | false | false | 0 |
ParseNextKey() {
current_ = NextEntryOffset();
const char* p = data_ + current_;
const char* limit = data_ + restarts_; // Restarts come right after data
if (p >= limit) {
// No more entries to return. Mark as invalid.
current_ = restarts_;
restart_index_ = num_restarts_;
retur... | false | false | false | false | false | 0 |
NFSline(time_t deltasec, time_t deltatic, time_t hz,
int ncpu, struct osrel *osr, char *tstamp)
{
struct nfsstat *cur, *pre;
double sf, sa, sc, cr, ca;
if ( !getcset("nfsstat", (void **)&cur, (void **)&pre) )
return(0);
sf = subtract(cur->sv_rpcbadfmt, pre->sv_rpcbadfmt);
sa = subtract(cur->sv_rpcb... | false | false | false | false | false | 0 |
iPCXDecodeScanLine(imBinFile* handle, unsigned char* DecodedBuffer, int BufferSize)
{
int index = 0; /* Index into compressed scan line buffer */
unsigned char data; /* Data byte read from PCX file */
unsigned char runcount = 0; /* Length of decoded pixel run */
unsigned char... | false | false | false | false | false | 0 |
print_flags(char **args, char *pattern)
{
int i;
bool found = false;
for (i = 0 ; args[i] != NULL ; ++i) {
if (0 == strncmp(args[i], pattern, strlen(pattern))) {
if (found) printf(" ");
printf("%s", args[i] + strlen(pattern));
found = true;
}
}
... | false | false | false | false | false | 0 |
map_interclust_node(node_t * n)
{
node_t *rv;
if ((ND_clust(n) == NULL) || ( GD_expanded(ND_clust(n))) )
rv = n;
else
rv = GD_rankleader(ND_clust(n))[ND_rank(n)];
return rv;
} | false | false | false | false | false | 0 |
draw_preview (void)
{
guint i;
cairo_pattern_t *pattern;
for (i = 0; i < MAXNPIECES; i++) {
if (i < npieces)
pattern = cairo_pattern_create_for_surface (preview_surfaces[preview[i] - 1]);
else
pattern = cairo_pattern_create_for_surface (blank_preview_surface);
gdk_window_set_background_... | false | false | false | false | false | 0 |
Verify(string* pstrProblem) const {
uint64_t ulDomainDimension = ulDomainSemantics.size();
uint64_t ulLODIndexCount = RecompLODIndexCount();
if ( dDomainTransformation.size() != (ulDomainDimension+1)*(ulDomainDimension+1) ||
ulDomainSize.size() != ulDomainDimension ||
ulBrickSize.size() != ulDomainDim... | false | false | false | false | false | 0 |
gridfile_get_numchunks( const gridfile *gfile ) {
bson_iterator it[1];
gridfs_offset length;
gridfs_offset chunkSize;
double numchunks;
bson_find(it, gfile->meta, "length");
if (bson_iterator_type(it) == BSON_INT)
length = (gridfs_offset)bson_iterator_int(it);
else
length =... | false | false | false | false | false | 0 |
speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_index, spx_word16_t **out, spx_uint32_t out_len) {
spx_uint32_t tmp_in_len = st->magic_samples[channel_index];
spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size;
const int N = st->filt_len;
speex_resampler_process_native(... | false | false | false | false | false | 0 |
contoursplot_cairo_line(GabeditContoursPlot *contoursplot, cairo_t* cr, GtkWidget* widget, GdkGC* gc, gdouble x1,gdouble y1,gdouble x2,gdouble y2)
{
gabedit_contoursplot_cairo_line(cr, widget, gc, x1, y1, x2, y2);
if(contoursplot->cairo_export)
gabedit_contoursplot_cairo_line(contoursplot->cairo_export, widget, g... | false | false | false | false | false | 0 |
camScale(CamImage *source, CamImage *dest)
{
CamWarpingParams params;
CamInternalROIPolicyStruct iROI;
CamImage src2;
CamROI roi;
// ROI (Region Of Interest) management
CAM_CHECK(camWarping,camInternalROIPolicy(source, NULL, &iROI, 0));
// Copy the original roi if it exists in orde... | false | false | false | false | false | 0 |
drawVerticalGrill (Window win, int x, int height)
{
int y = 0;
while (y < height - 5)
{
y += 3;
draw_dot (win, x + 3, y);
draw_dot (win, x + 6, y);
}
} | false | false | false | false | false | 0 |
gt_pch_nx_function (void *x_p)
{
struct function * const x = (struct function *)x_p;
if (gt_pch_note_object (x, x, gt_pch_p_8function, gt_ggc_e_8function))
{
gt_pch_n_9eh_status ((*x).eh);
gt_pch_n_18control_flow_graph ((*x).cfg);
gt_pch_n_12gimple_seq_d ((*x).gimple_body);
gt_pch_n_9gim... | false | false | false | false | false | 0 |
assignment_exp()
{
struct nodestruct *lhs;
op_pt op;
lhs = exp2();
if (sym >= ASSIGNOP && sym <= SUBABOP) /* assign-op syms in order! */
{
op = sym;
nextsym();
lhs = node(op, lhs, assignment_exp());
}
return lhs;
} | false | false | false | false | false | 0 |
stac92hd73xx_fixup_dell_eq(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
struct sigmatel_spec *spec = codec->spec;
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
stac92hd73xx_fixup_dell(codec);
snd_hda_add_verbs(codec, dell_eq_core_init);
spec->volknob_init = 1;
} | false | false | false | false | false | 0 |
protgroup_reset(struct protgroup *group)
{
if(group) {
memset(group->group, 0,
group->nalloced * sizeof(struct protstream *));
group->next_element = 0;
}
} | false | false | false | false | false | 0 |
LiteralString(Rune* runes, int nrunes, ParseFlags flags) {
if (nrunes <= 0)
return new Regexp(kRegexpEmptyMatch, flags);
if (nrunes == 1)
return NewLiteral(runes[0], flags);
Regexp* re = new Regexp(kRegexpLiteralString, flags);
for (int i = 0; i < nrunes; i++)
re->AddRuneToString(runes[i]);
return... | false | false | false | false | false | 0 |
report_join_res23a(struct rtw_adapter *padapter, int res)
{
struct cmd_obj *pcmd_obj;
u8 *pevtcmd;
u32 cmdsz;
struct joinbss_event *pjoinbss_evt;
struct C2HEvent_Header *pc2h_evt_hdr;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct cmd_... | false | true | false | false | false | 1 |
pl3_win_state_event(GtkWidget * window, GdkEventWindowState * event, gpointer data)
{
GtkWidget *vbox1 = GTK_WIDGET(gtk_builder_get_object(pl3_xml, "vbox1"));
GtkWidget *p = GTK_WIDGET(gtk_builder_get_object(pl3_xml, "alignment1"));
GtkWidget *h = GTK_WIDGET(gtk_builder_get_object(pl3_xml, "hbox1"));
GtkW... | false | false | false | false | false | 0 |
clutter_scroll_actor_find_property (ClutterAnimatable *animatable,
const char *property_name)
{
if (strcmp (property_name, "scroll-to") == 0)
return animatable_props[ANIM_PROP_SCROLL_TO];
return parent_animatable_iface->find_property (animatable, property_name);
} | false | false | false | false | false | 0 |
create_profile_include_files(void *data, void *dummy)
{
profile_include_file_t *ifp;
ifp = (profile_include_file_t *)data;
if (verbose)
printf("mkencap: creating file \"%s\"\n", ifp->pi_filename);
return mkencap_create_file(ifp->pi_filename, ifp->pi_text,
ifp->pi_mode, ifp->pi_uid, ifp->pi_gid);
} | false | false | false | false | false | 0 |
box_sat_interval(ap_manager_t* man,
box_t* a,
ap_dim_t dim, ap_interval_t* interval)
{
box_internal_t* intern = box_init_from_manager(man,AP_FUNID_SAT_INTERVAL);
man->result.flag_best = true;
man->result.flag_exact = true;
if (a->p==NULL)
return true;
ap_interval_set_itv(intern->itv, intern->sat... | false | false | false | false | false | 0 |
remove()
{
FileImpl::remove( path().c_str() );
} | false | false | false | false | false | 0 |
natpmp_rpc_free(struct natpmp_rpc *rd)
{
natpmp_rpc_check(rd);
g_assert(uint_is_positive(natpmp_rpc_pending));
natpmp_rpc_pending--;
pmsg_free_null(&rd->mb);
rd->magic = 0;
WFREE(rd);
} | false | false | false | false | false | 0 |
e_mixer_app_dialog_select(E_Dialog *dialog, const char *card_name, const char *channel_name)
{
E_Mixer_App_Dialog_Data *app;
int n;
if (!dialog)
return 0;
if ((!card_name) || (!channel_name))
return 0;
app = dialog->data;
if (!app)
return 0;
n = _find_card_by_name(app, card_na... | false | false | false | false | false | 0 |
oaktrail_hdmi_reset(struct drm_device *dev)
{
void __iomem *base;
unsigned long scu_ipc_mmio = 0xff11c000UL;
int scu_len = 1024;
base = ioremap((resource_size_t)scu_ipc_mmio, scu_len);
if (base == NULL) {
DRM_ERROR("failed to map scu mmio\n");
return;
}
/* scu ipc: assert hdmi controller reset */
writel(0... | false | false | false | false | false | 0 |
svc_stop_deps(RC_SERVICE state)
{
int depoptions = RC_DEP_TRACE;
RC_STRING *svc;
pid_t pid;
if (state & RC_SERVICE_WASINACTIVE)
return;
errno = 0;
if (rc_conf_yesno("rc_depend_strict") || errno == ENOENT)
depoptions |= RC_DEP_STRICT;
if (!deptree && ((deptree = _rc_deptree_load(0, NULL)) == NULL))
eerro... | false | false | false | false | false | 0 |
egg_asn1x_set_bits_as_raw (GNode *node,
GBytes *value,
guint n_bits)
{
g_return_if_fail (node != NULL);
g_return_if_fail (value != NULL);
egg_asn1x_take_bits_as_raw (node, g_bytes_ref (value), n_bits);
} | false | false | false | false | false | 0 |
VisitBitNot(UnaryOperation* expr) {
CHECK_ALIVE(VisitForValue(expr->expression()));
HValue* value = Pop();
TypeInfo info = oracle()->UnaryType(expr);
if (info.IsUninitialized()) {
AddInstruction(new(zone()) HSoftDeoptimize);
current_block()->MarkAsDeoptimizing();
}
HInstruction* instr = new(zone()) ... | false | false | false | false | false | 0 |
tolua_px_ecl_Drawable_blit01(lua_State* tolua_S)
{
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"Drawable",0,&tolua_err) ||
!tolua_isusertype(tolua_S,2,"const GS",0,&tolua_err) ||
!tolua_isnumber(tolua_S,3,0,&tolua_err) ||
!tolua_isnumber(tolua_S,4,0,&tolua_err) ||
!tolua_isusertyp... | false | false | false | false | false | 0 |
atom(register char *p)
{
register char *p1 = p;
auto struct tm tm;
#ifdef DEBUG_1
if (strlen(p) < 20) {
_print_msg(PRT_DEBUG_GENERAL, " DEBUG> Huch? atom(``%s'')\n", p);
return((time_t)0);
} /* if */
#endif
tm.tm_mon = 0;
while ((tm.tm_mon < 12) && memcmp(p1, Months[tm.tm_mon], 3)) tm.tm... | true | true | false | false | true | 1 |
blindtrie_twobitencoding_getlcp(
GtBlindtriesymbol *mm_oldsuffix,
bool *mm_oldsuffixisseparator,
GtBlindtriesymbol *mm_newsuffix,
const GtBlindtrie *blindtrie,
... | false | false | false | false | false | 0 |
enter_4op_mode(void)
{
int i;
static int v4op[MAX_VOICE] = {
0, 1, 2, 9, 10, 11, 6, 7, 8, 15, 16, 17
};
devc->cmask = 0x3f; /* Connect all possible 4 OP voice operators */
opl3_command(devc->right_io, CONNECTION_SELECT_REGISTER, 0x3f);
for (i = 0; i < 3; i++)
pv_map[i].voice_mode = 4;
for (i = 3; i < 6; i+... | false | false | false | false | false | 0 |
H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
H5G_bt_rm_t udata; /*data to pass through B-tree */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(stab)... | false | false | false | false | false | 0 |
releaseInstance()
{
if ( m_refCount > 0 )
{
if ( --m_refCount == 0 )
{
delete m_instance;
m_instance = NULL;
}
}
} | false | false | false | false | false | 0 |
aliasesUnknownInst(const Instruction *Inst,
AliasAnalysis &AA) const {
if (!Inst->mayReadOrWriteMemory())
return false;
for (unsigned i = 0, e = UnknownInsts.size(); i != e; ++i) {
ImmutableCallSite C1(getUnknownInst(i)), C2(Inst);
if (!C1 || !C2 || AA.getModRefInfo(C1... | false | false | false | false | false | 0 |
SetNumberOfSegments(const unsigned int size)
{
Segments.resize(size);
} | false | false | false | false | false | 0 |
RegisterIPC(IPCRemote *in_ipc, int in_as_ipc) {
// Ignore params if we're called with NULL
if (in_ipc != NULL) {
rootipc = in_ipc;
running_as_ipc = in_as_ipc;
sync_ipc_id =
rootipc->RegisterIPCCmd(*pst_ipc_sync_complete, NULL, this, "SYNCCOMPLETE");
}
// Register on both sides of the IPC so the negotiati... | false | false | false | false | false | 0 |
PyvtkDataObject_SetUpdateExtent_s3(PyObject *self, PyObject *args)
{
vtkPythonArgs ap(self, args, "SetUpdateExtent");
vtkObjectBase *vp = ap.GetSelfPointer(self, args);
vtkDataObject *op = static_cast<vtkDataObject *>(vp);
int temp0;
int temp1;
int temp2;
int temp3;
int temp4;
int temp5;
PyObject *... | false | false | false | false | false | 0 |
tcp_dev_open (struct device *dev)
{
SANE_Status status;
char* strhost;
char* strport;
int port;
struct servent *sp;
struct timeval tv;
SANE_String_Const devname;
devname = dev->sane.name;
DBG (3, "%s: open %s\n", __FUNCTION__, devname);
if (strncmp (devname, "tcp", 3) !... | false | false | false | false | false | 0 |
set_lines(struct SYMBOL *first, /* first symbol */
struct SYMBOL *last, /* last symbol / 0 */
float lwidth, float indent)
{
struct SYMBOL *s, *s2;
float x, xline, wwidth, x2, shrink, space;
int nlines;
/* calculate the whole size of the tune */
wwidth = indent;
for (s = first; s != last; s = s->ts_next) ... | false | false | false | false | false | 0 |
regmap_mmio_count_check(size_t count, u32 offset)
{
BUG_ON(count <= offset);
} | false | false | false | false | false | 0 |
change_window_name(char *str)
{
XTextProperty name;
XClassHint myclasshints;
if (XStringListToTextProperty(&str,1,&name) == 0)
{
fprintf(stderr,"%s: cannot allocate window name",module->name);
return;
}
XSetWMName(dpy,main_win,&name);
XSetWMIconName(dpy,main_win,&name);
XFree(name.value);
myclasshints.res... | false | false | false | false | false | 0 |
instance()
{
QMutexLocker locker(nman_mutex());
if(!g_nman)
{
g_nman = new NameManager;
irisNetAddPostRoutine(NetNames::cleanup);
}
return g_nman;
} | false | false | false | false | false | 0 |
getStringFromAttribute(const DSRXMLCursor &cursor,
OFString &stringValue,
const char *name,
const OFBool encoding,
const OFB... | false | false | false | false | false | 0 |
urf_session_checker_finalize (GObject *object)
{
UrfSessionChecker *logind = URF_SESSION_CHECKER (object);
GList *item;
if (logind->priv->seats) {
for (item = logind->priv->seats; item; item = item->next)
g_object_unref (item->data);
g_list_free (logind->priv->seats);
logind->priv->seats = NULL;
}
if (lo... | false | false | false | false | false | 0 |
tracker_db_journal_reader_init (const gchar *filename,
GError **error)
{
gboolean ret;
GError *n_error = NULL;
ret = db_journal_reader_init (&reader, TRUE, filename, &n_error);
if (n_error) {
g_propagate_error (error, n_error);
}
return ret;
} | false | false | false | false | false | 0 |
GetInitialObjectArrayStatus( int otyp, ArrayInfoType *objType )
{
for(unsigned int oidx=0; oidx<this->InitialArrayInfo[otyp].size(); oidx++)
{
if(objType->Name == this->InitialArrayInfo[otyp][oidx].Name)
{
objType->Status = this->InitialArrayInfo[otyp][oidx].Status;
break;
}
}
} | false | false | false | false | false | 0 |
output(char *p)
{
int i,n;
char *pp, *pe, *pt;
pp=strchr(p,'\n');
for(pp++; *pp; pp=pe) {
pe=strchr(pp,'\n'); if(pe) *pe++=0; else pe=pp+strlen(pp);
if(memcmp(pp,ans_str,strlen(ans_str))==0) pp+=strlen(ans_str);
n=strlen(pp); if(n==0) {
puts(""); continue;
}
/* make every output one-line */
... | false | false | false | false | false | 0 |
brasero_async_task_manager_thread (BraseroAsyncTaskManager *self)
{
gboolean result;
GCancellable *cancel;
BraseroAsyncTaskCtx *ctx;
cancel = g_cancellable_new ();
g_mutex_lock (self->priv->lock);
while (1) {
BraseroAsyncTaskResult res;
/* say we are unused */
self->priv->unused_threads ++;
/* see i... | false | false | false | false | false | 0 |
dtcs033_pkt_scan(struct gspca_dev *gspca_dev,
u8 *data, /* packet data */
int len) /* packet data length */
{
/* drop incomplete frames */
if (len != DT_COLS*512) {
gspca_dev->last_packet_type = DISCARD_PACKET;
/* gspca.c: discard invalidates the whole frame. */
return;
}
/* forward complete frames ... | false | false | false | false | false | 0 |
mir_server_connect_session (DisplayServer *display_server, Session *session)
{
MirServer *server;
server = MIR_SERVER (display_server);
if (server->priv->parent_socket)
session_set_env (session, "MIR_SOCKET", server->priv->parent_socket);
if (server->priv->vt > 0)
{
gchar *value = g... | false | false | false | false | false | 0 |
do_app_dir_real(GHashTable *ht, const gchar *dir)
{
GDir *d = NULL;
gchar *cwd;
const gchar *name;
ENTER;
DBG("%s\n", dir);
cwd = g_get_current_dir();
if (g_chdir(dir))
{
DBG("can't chdir to %s\n", dir);
goto out;
}
if (!(d = g_dir_open(".", 0, NULL)))
{
... | false | false | false | false | false | 0 |
fan2_get_speed(unsigned int *speed)
{
u8 hi, lo;
bool rc;
switch (fan_status_access_mode) {
case TPACPI_FAN_RD_TPEC:
/* all except 570, 600e/x, 770e, 770x */
if (unlikely(!fan_select_fan2()))
return -EIO;
rc = !acpi_ec_read(fan_rpm_offset, &lo) ||
!acpi_ec_read(fan_rpm_offset + 1, &hi);
fan_sele... | false | false | false | false | false | 0 |
addsym(char *name)
{
Symbol key, *s;
key.name = name;
s = (Symbol *) hashtabsearch(htab, (void *) &key);
if (s == NULL) {
s = (Symbol *) ecalloc(1, sizeof(*s));
s->name = name;
s->gen_name = estrdup(name);
output_name(s->gen_name);
s->stype = SUndefined;
hashtabadd(htab, s);
}
return s;
} | false | false | false | false | false | 0 |
processModule(const Module &M) {
InitializeTypeMap(M);
if (NamedMDNode *CU_Nodes = M.getNamedMetadata("llvm.dbg.cu")) {
for (unsigned i = 0, e = CU_Nodes->getNumOperands(); i != e; ++i) {
auto *CU = cast<DICompileUnit>(CU_Nodes->getOperand(i));
addCompileUnit(CU);
for (auto *DIG : CU->getGloba... | false | false | false | false | false | 0 |
create_conference(void)
{
DBG("");
return send_method_call(OFONO_BUS_NAME, modem_obj_path,
OFONO_VCMANAGER_INTERFACE,
"CreateMultiparty",
NULL, NULL, DBUS_TYPE_INVALID);
} | false | false | false | false | false | 0 |
subtitle_close(subtitles_t* st)
{
if (st->subtitle)
{
int i;
for (i = 0; i < st->count; i++)
{
int j;
for (j = 0; j < SUBTITLE_MAX_LINES; j++)
{
if (st->subtitle[i].line[j])
free(st->subtitle[i].line[j]);
}
}
free(st->subtitle);
}
if (st->encoding)
free(st->encoding);
... | false | false | false | false | false | 0 |
closeMostFDs(const set<int> & exceptions)
{
int maxFD = 0;
maxFD = sysconf(_SC_OPEN_MAX);
for (int fd = 0; fd < maxFD; ++fd)
if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO
&& exceptions.find(fd) == exceptions.end())
close(fd); /* ignore result */
} | false | false | false | false | false | 0 |
pluginset_done(struct uct_pluginset *ps)
{
for (int i = 0; i < ps->n_plugins; i++) {
struct plugin *p = &ps->plugins[i];
p->done(p->data);
dlclose(p->dlh);
free(p->path);
free(p->args);
}
free(ps);
} | false | false | false | false | false | 0 |
get_id_from_freelist(struct blkfront_info *info)
{
unsigned long free = info->shadow_free;
BUG_ON(free >= BLK_RING_SIZE(info));
info->shadow_free = info->shadow[free].req.u.rw.id;
info->shadow[free].req.u.rw.id = 0x0fffffee; /* debug */
return free;
} | false | false | false | false | false | 0 |
collect_gen_cards(CELL gen)
{
F_CARD *ptr = ADDR_TO_CARD(data_heap->generations[gen].start);
CELL here = data_heap->generations[gen].here;
F_CARD *last_card = ADDR_TO_CARD(here - 1);
CELL mask, unmask;
/* if we are collecting the nursery, we care about old->nursery pointers
but not old->aging pointers */
if(co... | false | false | false | false | false | 0 |
tx_load(struct slgt_info *info, const char *buf, unsigned int size)
{
unsigned short count;
unsigned int i;
struct slgt_desc *d;
/* check required buffer space */
if (DIV_ROUND_UP(size, DMABUFSIZE) > free_tbuf_count(info))
return false;
DBGDATA(info, buf, size, "tx");
/*
* copy data to one or more DMA buf... | false | false | false | false | false | 0 |
hm_sort(struct cli_sz_hash *szh, size_t l, size_t r, unsigned int keylen) {
uint8_t piv[CLI_HASHLEN_MAX], tmph[CLI_HASHLEN_MAX];
size_t l1, r1;
const char *tmpv;
if(l + 1 >= r)
return;
l1 = l+1, r1 = r;
memcpy(piv, &szh->hash_array[keylen * l], keylen);
while(l1 < r1) {
if(hm_cmp(&szh-... | false | true | false | false | false | 1 |
g_mime_data_wrapper_get_decoded_stream (GMimeDataWrapper *wrapper)
{
GMimeStream *decoded_stream;
GMimeFilter *decoder;
g_mime_stream_reset (wrapper->stream);
switch (wrapper->encoding) {
case GMIME_CONTENT_ENCODING_BASE64:
case GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE:
case GMIME_CONTENT_ENCODING_UUENCODE:
... | false | false | false | false | false | 0 |
hasNextPart()
{
return (!_pMPI || !_pMPI->lastPart()) && _istr.good();
} | false | false | false | false | false | 0 |
device_property_fill_and_register(DevicePropertyBase *base,
GType type, const char * name, const char * desc) {
/* create the hash table and array if necessary */
if (!device_property_bases) {
device_property_bases = g_ptr_array_new();
device_property_bases_by_name = g_hash_table_new(device_property_ha... | false | false | false | false | false | 0 |
PutUnicodeChar(unsigned int c)
{
unsigned int i;
if (c < 128)
{
TXT_PutChar(c);
return;
}
// We can only display this character if it is in the CP437 codepage.
for (i = 0; i < 128; ++i)
{
if (cp437_unicode[i] == c)
{
TXT_PutChar(128 + i);
... | false | false | false | false | false | 0 |
ath10k_bss_assoc(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf)
{
struct ath10k *ar = hw->priv;
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
struct ieee80211_sta_ht_cap ht_cap;
struct ieee80211_sta_vht_cap vht_cap;
struct wmi_peer_assoc_complete_arg... | false | false | false | false | false | 0 |
usage(char *prog)
{
char *h;
if (NULL != (h = strrchr(prog,'/')))
prog = h+1;
fprintf(stderr,
"\n"
"%s shows contents of RIFF files (AVI,WAVE...).\n"
"(c) 1994 UP-Vision Computergrafik for c't\n"
"unix port and some extensions (for avi) by Gerd Knorr\n"
"\n"
"usage: %s [ -j ... | false | false | false | false | false | 0 |
multi_standalone_wait_close()
{
std_debug_set_standalone_state_string("Wait Close / Game Play");
// all players should reset sequencing
int idx;
for(idx=0;idx<MAX_PLAYERS;idx++){
if(Net_player->flags & NETINFO_FLAG_CONNECTED){
Net_players[idx].client_cinfo_seq = 0;
Net_players[idx].client_server_seq = 0; ... | false | false | false | false | false | 0 |
write_one (GstPluginLoader * l)
{
guint8 *out;
guint32 to_write, magic;
int res;
if (l->tx_buf_read + HEADER_SIZE > l->tx_buf_write)
return FALSE;
out = l->tx_buf + l->tx_buf_read;
magic = GST_READ_UINT32_BE (out + 8);
if (magic != HEADER_MAGIC) {
GST_ERROR ("Packet magic number is missing. Mem... | false | false | false | false | false | 0 |
parse_number( cJSON *item, const char *num )
{
int64_t i = 0;
double f = 0;
int isint = 1;
int sign = 1, scale = 0, subscale = 0, signsubscale = 1;
/* Could use sscanf for this? */
if ( *num == '-' ) {
/* Has sign. */
sign = -1;
++num;
}
if ( *num == '0' )
/* Is zero. */
++num;
if ( *num >= '1' && *... | false | false | false | false | false | 0 |
dispatch(const Socket& socket, SocketNotification* pNotification)
{
NotifierPtr pNotifier;
{
FastMutex::ScopedLock lock(_mutex);
EventHandlerMap::iterator it = _handlers.find(socket);
if (it != _handlers.end())
pNotifier = it->second;
else
return;
}
dispatch(pNotifier, pNotification);
} | false | false | false | false | false | 0 |
newsize (stringtable *tb)
{
int size = tb->size;
int realuse = 0;
int i;
/* count how many entries are really in use */
for (i=0; i<size; i++)
if (tb->hash[i] != NULL && tb->hash[i] != &EMPTY)
realuse++;
if (2*(realuse+1) <= size) /* +1 is the new element */
return size; /* don't need to gro... | false | false | false | false | false | 0 |
_ecore_getopt_find_help(const Ecore_Getopt *parser)
{
const Ecore_Getopt_Desc *desc = parser->descs;
for (; !_ecore_getopt_desc_is_sentinel(desc); desc++)
if (desc->action == ECORE_GETOPT_ACTION_HELP)
return desc;
return NULL;
} | false | false | false | false | false | 0 |
opal_dss_unpack_int64(opal_buffer_t *buffer, void *dest,
int32_t *num_vals, opal_data_type_t type)
{
int32_t i;
uint64_t tmp, *desttmp = (uint64_t*) dest;
OPAL_OUTPUT( ( opal_dss_verbose, "opal_dss_unpack_int64 * %d\n", (int)*num_vals ) );
/* check to see if there's enough data... | false | true | false | false | false | 1 |
ExtractChains_ (SelectS *selectSP, char *stringP)
{
char *P, *tokenP;
int chainI;
/* Check the string length: */
if (strlen (stringP) == 0) return -1;
/* Initialize all_chainsF (1 = select all chains): */
selectSP->all_chainsF = 0;
/* Initialize the number of chain identifiers: */
selectSP->chainsN = 0;
/* If wi... | false | false | false | false | false | 0 |
MGD77_Select_Header_Item (struct MGD77_CONTROL *F, char *item)
{
int i, id, match, length, pick[MGD77_N_HEADER_ITEMS];
memset ((void *)F->Want_Header_Item, 0, MGD77_N_HEADER_ITEMS * sizeof (GMT_LONG));
if (item && item[0] == '-') return 1; /* Just wants a listing */
if (!item || item[0] == '\0' || !strcmp (item,... | false | false | true | false | true | 1 |
show_bits(int v,int n/*=16*/)
{
int i;
if(n>0)
{
for(i=0;i<n;i++)
{
printf("%c",( v&(1<<(n-i-1)) ? '1':'0' ) );
}
}
else
{
n=-n;
for(i=0;i<n;i++)
{
printf("%c",( v&(1<<(i)) ? '1':'0' ) );
}
}
} | false | false | false | false | false | 0 |
find_remote_module_objfile(struct load_module *lm, char *module, char *retbuf)
{
int absolute;
char sendbuf[BUFSIZE];
char recvbuf[BUFSIZE];
char local[BUFSIZE];
char found[BUFSIZE];
char *p1;
long csum;
struct remote_file remote_file, *rfp;
rfp = &remote_file;
BZERO(rfp, sizeof(struct remote_file));
absol... | true | true | false | false | false | 1 |
string_list_add(String_List *list, const char *string)
{
String_List_Node *new_node;
if (string_list_find_node(list, string) != NULL)
return 0;
new_node = (String_List_Node *)malloc(sizeof(String_List_Node));
if (new_node == NULL)
return -1;
new_node->string = (char *)malloc(strlen(string) + 1)... | false | false | false | false | false | 0 |
create_fetch(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type,
isc_taskaction_t callback, const char *caller)
{
if (dns_rdataset_isassociated(&val->frdataset))
dns_rdataset_disassociate(&val->frdataset);
if (dns_rdataset_isassociated(&val->fsigrdataset))
dns_rdataset_disassociate(&val->fsigrdata... | false | false | false | false | false | 0 |
SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long long value)
{
SV *sv;
if (value <= UV_MAX)
sv = newSVuv((UV)(value));
else {
//sv = newSVpvf("%llu", value); doesn't work in non 64bit Perl
char temp[256];
sprintf(temp, "%llu", value);
sv = newSVpv(temp, 0);
}
return ... | false | false | false | false | false | 0 |
pcidev_to_chipid(struct pci_dev *pci_dev)
{
u16 chipid_fallback = 0;
switch (pci_dev->device) {
case 0x4301:
chipid_fallback = 0x4301;
break;
case 0x4305 ... 0x4307:
chipid_fallback = 0x4307;
break;
case 0x4403:
chipid_fallback = 0x4402;
break;
case 0x4610 ... 0x4615:
chipid_fallback = 0x4610;
br... | false | false | false | false | false | 0 |
WaitReady( unsigned long ulWaitms )
{
bool bRetVal;
if( (bRetVal = m_pSemReadyState->WaitAndLock( ulWaitms ) == 0) )
m_pSemReadyState->ReleaseLock();
return bRetVal;
}
} | false | false | false | false | false | 0 |
free_pad_probe_for_element (GstDecodeBin * decode_bin, GstElement * element)
{
GList *l;
for (l = decode_bin->probes; l != NULL; l = g_list_next (l)) {
PadProbeData *data = (PadProbeData *) l->data;
if (GST_ELEMENT_CAST (GST_PAD_PARENT (data->pad)) == element) {
gst_pad_remove_data_probe (data->pad,... | false | false | false | false | false | 0 |
_hash_getnewbuf(Relation rel, BlockNumber blkno)
{
BlockNumber nblocks = RelationGetNumberOfBlocks(rel);
Buffer buf;
if (blkno == P_NEW)
elog(ERROR, "hash AM does not use P_NEW");
if (blkno > nblocks)
elog(ERROR, "access to noncontiguous page in hash index \"%s\"",
RelationGetRelationName(rel));
/* smgr... | false | false | false | false | false | 0 |
gkm_manager_find_one_by_attributes (GkmManager *self, GkmSession *session,
CK_ATTRIBUTE_PTR attrs, CK_ULONG n_attrs)
{
Finder finder = { 0, };
g_return_val_if_fail (GKM_IS_MANAGER (self), NULL);
g_return_val_if_fail (attrs || !n_attrs, NULL);
finder.accumulator = accumulate_one... | false | false | false | false | false | 0 |
luaQ_m__isa(lua_State *L)
{
// LUA: "_val_:isa(_str_)"
// Returns true is _val_ is an instance of class _str_.
// In the case of objects, the classname may or may not
// have a final star.
bool b = false;
QObject *obj;
const QVariant *vp = luaQ_toqvariantp(L, 1);
const char *t = luaL_checkstring(L, 2);
... | false | false | false | false | false | 0 |
mg_add_generic_tab (char *name, char *title, void *family, GtkWidget *box)
{
chan *ch;
gtk_notebook_append_page (GTK_NOTEBOOK (mg_gui->note_book), box, NULL);
gtk_widget_show (box);
ch = chanview_add (mg_gui->chanview, name, NULL, box, TRUE, TAG_UTIL, pix_tree_util);
chan_set_color (ch, plain_list);
/* FIXME: m... | false | false | false | false | false | 0 |
ssd_cap_learn(struct ssd_device *dev, uint32_t *cap)
{
int ret = 0;
if (!dev || !cap) {
return -EINVAL;
}
mutex_lock(&dev->bm_mutex);
ssd_stop_workq(dev);
ret = ssd_do_cap_learn(dev, cap);
if (ret) {
ssd_gen_swlog(dev, SSD_LOG_CAP_LEARN_FAULT, 0);
goto out;
}
ssd_gen_swlog(dev, SSD_LOG_CAP_STATUS, *... | false | false | false | false | false | 0 |
disp_image_file(const char* fileName, int x1, int y1)
{
//---- load the interface into the back buffer ----//
File pictFile;
String str;
str = DIR_IMAGE;
str += fileName;
str += ".ICN";
if( pictFile.file_open(str,0) )
{
vga_back.put_large_bitmap(x1, y1, &pictFile);
pictFile.file_close();
}
//--------... | false | false | false | false | false | 0 |
printf_encode(uint8_t c, uint8_t UNUSED(peek), char *out, unsigned flags)
{
if (c == '\n' && flags & SKIP_NL)
goto raw;
if (c > 0x1f && c < 0x7f) { /* ASCII printable characters */
switch(c) {
case '"':
case '\\':
goto escape2;
default:
raw:
if (out) { out[0] = c; }
return 1;
}
} else if (c >= ... | false | false | false | false | false | 0 |
c4_reset_ctr(struct capi_ctr *ctrl)
{
avmcard *card = ((avmctrl_info *)(ctrl->driverdata))->card;
avmctrl_info *cinfo;
u_int i;
unsigned long flags;
spin_lock_irqsave(&card->lock, flags);
c4_reset(card);
spin_unlock_irqrestore(&card->lock, flags);
for (i = 0; i < card->nr_controllers; i++) {
cinfo = &card... | false | false | false | false | false | 0 |
palmas_pwron_probe(struct platform_device *pdev)
{
struct palmas *palmas = dev_get_drvdata(pdev->dev.parent);
struct device *dev = &pdev->dev;
struct input_dev *input_dev;
struct palmas_pwron *pwron;
struct palmas_pwron_config config;
int val;
int error;
palmas_pwron_params_ofinit(dev, &config);
pwron = kzal... | false | false | false | false | false | 0 |
update_lop_for_pdf14(gs_imager_state *pis, const gx_drawing_color *pdcolor)
{
bool hastrans = false;
/* We'd really rather not have to set the pdf14 bit in the lop, as this
* makes other operations much slower. We have no option however, if the
* current colour involves transparency, or if it's anyth... | false | false | false | false | false | 0 |
prog_set_err(Msg *err)
{
prog_set_msg(g.err, err);
} | false | false | false | false | false | 0 |
moreData()
{
if (decodingCompleted() || reachedCustomEnd()) {
if (loopCount) {
// negative count is documented to mean loop forever.
if (loopCount > 0) --loopCount;
restart();
return true;
}
// Nothing more to do.
return false;
}
... | 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.