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 |
|---|---|---|---|---|---|---|
window_is_xembed(GdkDisplay *d, GdkWindow *w) {
Atom type_return;
gint format_return;
gulong nitems_return;
gulong bytes_after_return;
guchar *data = NULL;
gboolean ret = FALSE;
Atom xembed;
/* Gnome Panel applets are XEMBED windows. We need to make sure ... | false | false | false | false | false | 0 |
edge_of_accounting_period_containing(time_t now, int get_end)
{
int before;
struct tm tm;
tor_localtime_r(&now, &tm);
/* Set 'before' to true iff the current time is before the hh:mm
* changeover time for today. */
before = tm.tm_hour < cfg_start_hour ||
(tm.tm_hour == cfg_start_hour && tm.tm_min < cf... | false | false | false | false | false | 0 |
sap_send(int fd, short event, void *arg) {
struct sap_s *sap=arg;
char *sp;
/* Clear Packet */
memset(&sappkt, 0, SAP_MAX_SIZE);
sappkt[0]=SAP_VERSION<<SAP_VERSION_SHIFT; /* Version + Bitfield */
sappkt[1]=0x0; /* Auth len */
sappkt[2]=sap->sid>>8&0xff; /* Unique session ID */
sappkt[3]=sap->sid&0xff... | false | false | false | false | false | 0 |
make_padded_password (const char *password,
size_t *out_size)
{
size_t total;
size_t blksz;
size_t current;
char *padded;
blksz = get_block_size ();
current = strlen (password);
if (current % blksz) {
total = (current / ... | false | false | false | false | false | 0 |
filter_input_format_sexp (EFilterElement *element,
GString *out)
{
EFilterInput *input = E_FILTER_INPUT (element);
GList *link;
for (link = input->values; link != NULL; link = g_list_next (link))
camel_sexp_encode_string (out, link->data);
} | false | false | false | false | false | 0 |
isvalidusername(struct berval *bv)
{
int i;
char *name = bv->bv_val;
if ((name==NULL)||(name[0]=='\0'))
return 0;
/* check first character */
if ( ! ( (name[0]>='A' && name[0] <= 'Z') ||
(name[0]>='a' && name[0] <= 'z') ||
(name[0]>='0' && name[0] <= '9') ||
name[0]=='.' || name[0]=='_' ) )
r... | false | false | false | false | false | 0 |
updateGameState() {
int dT = SDL_GetTicks() - timeLastUpdate;
timeLastUpdate += dT;
if ( !minibossTime ) gameActRuntime += dT;
if ( nukeIsInPlace ) handleNuke();
enemys->generateEnemys( dT );
explosions->updateExplosions( dT );
smokePuffs->update( dT );
shots->moveAndCollide( dT );
wrecks->upda... | false | false | false | false | false | 0 |
getFileSize(DataFile f, uint8_t regSize) const
{
if (restrictedGPR16Range && f == FILE_GPR && regSize == 2)
return (last[f] + 1) / 2;
return last[f] + 1;
} | false | false | false | false | false | 0 |
_wait_for_children_slurmstepd(stepd_step_rec_t *job)
{
int left = 0;
int rc;
struct timespec ts = {0, 0};
pthread_mutex_lock(&step_complete.lock);
/* wait an extra 3 seconds for every level of tree below this level */
if (step_complete.children > 0) {
ts.tv_sec += 3 * (step_complete.max_depth-step_complete.de... | false | false | false | false | false | 0 |
bitsetbit(PG_FUNCTION_ARGS)
{
VarBit *arg1 = PG_GETARG_VARBIT_P(0);
int32 n = PG_GETARG_INT32(1);
int32 newBit = PG_GETARG_INT32(2);
VarBit *result;
int len,
bitlen;
bits8 *r,
*p;
int byteNo,
bitNo;
bitlen = VARBITLEN(arg1);
if (n < 0 || n >= bitlen)
ereport(ERROR,
(errcode(... | false | false | false | false | false | 0 |
bfa_fcs_rport_create(struct bfa_fcs_lport_s *port, u32 rpid)
{
struct bfa_fcs_rport_s *rport;
bfa_trc(port->fcs, rpid);
rport = bfa_fcs_rport_alloc(port, WWN_NULL, rpid);
if (!rport)
return NULL;
bfa_sm_send_event(rport, RPSM_EVENT_PLOGI_SEND);
return rport;
} | false | false | false | false | false | 0 |
luaK_infix (LexState *ls, BinOpr op, expdesc *v) {
FuncState *fs = ls->fs;
switch (op) {
case OPR_AND:
luaK_goiftrue(fs, v, 1);
break;
case OPR_OR:
luaK_goiffalse(fs, v, 1);
break;
default:
luaK_tostack(ls, v, 1); /* all other binary operators need a value */
}
} | false | false | false | false | false | 0 |
AbbrevExpand()
{
char wordbuf[100];
register char
*wp = wordbuf,
*cp;
int col;
register char c;
int UC_count = 0;
struct abbrev *ap;
col = curchar;
while (col != 0 && jisident(linebuf[col - 1]))
col -= 1;
if (curchar-col >= (int)sizeof(wordbuf))
return; /* too long for us -- ignore it */
while (col ... | true | true | false | false | false | 1 |
SetPegCnt(const int pegcnt)
{
ClearRow();
for (int i = 0; i < mPegCnt; ++i)
{
delete mColorPegs[i];
}
delete [] mColorPegs;
mColorPegs = NULL;
mPegCnt = pegcnt;
mColorPegs = new ColorPeg* [mPegCnt];
for (int i = 0; i < mPegCnt; ++i)
{
mColorPegs[i] = NULL;
}
... | false | false | false | false | false | 0 |
changePinLabels(bool singleRow, bool sip) {
Q_UNUSED(singleRow);
if (m_viewID != ViewLayer::SchematicView) return true;
bool hasLocal = false;
QStringList labels = getPinLabels(hasLocal);
if (labels.count() == 0) return true;
QTransform transform = untransform();
QString svg = MysteryPart::makeSchematicS... | false | false | false | false | false | 0 |
show_colornames(const struct gen_table *tbl)
{
int i=0;
while (tbl->key) {
/* Print color names and their rgb values, table with 1 column */
int r = ((tbl->value >> 16 ) & 255);
int g = ((tbl->value >> 8 ) & 255);
int b = (tbl->value & 255);
fprintf( stderr, "\n %-18s ", tbl->key );
fprintf(stderr, "#%0... | false | false | false | false | false | 0 |
hdrvc_recvpacket(char *pkt, int maxlen)
{
struct ifreq ifr_new;
struct sockaddr_ll from;
socklen_t from_len = sizeof(from);
#ifdef HDRVC_KERNEL
if (kernel_mode) {
if (!promisc) {
if (afpacket) {
struct sockaddr_ll sll;
struct packet_mreq mr;
memset(&sll, 0, sizeof(sll));
sll.sll_family = AF_P... | false | true | false | false | false | 1 |
tt_stopped()
{
ObjectSessionWatcher watch(&sess);
removeLocalCandidates(tt);
if(!watch.isValid())
return;
delete tt;
tt = 0;
tryStopped();
} | false | false | false | false | false | 0 |
lpss_ltr_mode_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
u32 ltr_mode = 0;
char *outstr;
int ret;
ret = lpss_reg_read(dev, LPSS_GENERAL, <r_mode);
if (ret)
return ret;
outstr = (ltr_mode & LPSS_GENERAL_LTR_MODE_SW) ? "sw" : "auto";
return sprintf(buf, "%s\n", outstr);
} | false | false | false | false | false | 0 |
init_driver(void)
{
char infofile[FILENAME_MAX];
char *e;
int rv;
list_t plist, *values;
DEBUG_INFO("Driver version: " VERSION);
/* Info.plist full patch filename */
(void)snprintf(infofile, sizeof(infofile), "%s/%s/Contents/Info.plist",
PCSCLITE_HP_DROPDIR, BUNDLE);
rv = bundleParse(infofile, &plist);
if... | false | false | false | false | false | 0 |
load_pop(Unpicklerobject *self)
{
Py_ssize_t len = self->stack->length;
/* Note that we split the (pickle.py) stack into two stacks,
an object stack and a mark stack. We have to be clever and
pop the right one. We do this by looking at the top of the
mark stack first, and only signalling a... | false | false | false | false | false | 0 |
fs_path_add_from_extent_buffer(struct fs_path *p,
struct extent_buffer *eb,
unsigned long off, int len)
{
int ret;
char *prepared;
ret = fs_path_prepare_for_add(p, len, &prepared);
if (ret < 0)
goto out;
read_extent_buffer(eb, prepared, off, len);
out:
return ret;
} | false | false | false | false | false | 0 |
scan_error(void *vctx, const char *fmt, ...)
{
struct ctx *ctx = (struct ctx *)vctx;
va_list ap;
if (ctx->progress) {
fprintf(stderr, "%-*s\r", ctx->progwidth, "");
fflush(stderr);
}
fprintf(stderr, "%s: ", PNAME);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
ctx->l... | false | false | false | false | true | 1 |
et_build_groups (ETable *et)
{
gboolean was_grouped = et->is_grouped;
et->is_grouped = e_table_sort_info_grouping_get_count (et->sort_info) > 0;
et->group = e_table_group_new (
GNOME_CANVAS_GROUP (et->canvas_vbox),
et->full_header,
et->header,
et->model,
et->sort_info,
0);
if (et->use_click_to_add_en... | false | false | false | false | false | 0 |
setSerialPortName(const std::string &COM_port)
{
// Dont allow changing the serial port if:
if (m_data_stream_is_external)
THROW_EXCEPTION("Cannot change serial port name: an external stream has been already bound manually.")
if (m_data_stream)
{
CCriticalSectionLocker lock(m_data_stream_cs);
CSerialPort *se... | false | false | false | false | false | 0 |
writePlaceMCEnd(unsigned long int flags)
{
/* write empty event */
flputShort(0);
if (swfVersion >= 6)
flputShort(0);
updateTmpLength(placeMCLengthPos, ftell(tempFile) - placeMCLengthPos - 4);
if (swfVersion <= 5) {
updateShort(MCAllEventsPos, (unsigned int) flags);
}
else if (swfVersion >= 6) ... | false | false | false | false | false | 0 |
unrrdu_dhistoMain(int argc, const char **argv, const char *me,
hestParm *hparm) {
hestOpt *opt = NULL;
char *out, *err;
Nrrd *nin, *nout;
int pret, nolog, notick;
unsigned int size;
airArray *mop;
double max;
hestOptAdd(&opt, "h,height", "height", airTypeUInt, 1, 1, &size, NULL,
... | false | false | false | false | false | 0 |
eel_error(const char *format, ...)
{
int count = 0;
va_list args;
int i, pos, line = 1;
/* Figure out which line we're at... */
pos = bio_tell(eel_current.bio);
bio_seek(eel_current.bio, 0, SEEK_SET);
for(i = 0; i < pos; ++i)
if('\n' == bio_getchar(eel_current.bio))
++line;
if((eel_current.script >= 0) &... | false | false | false | false | false | 0 |
addto(char *newrcpt, int newrcptlen, const char *sep,
char **out, int *outalloc)
{
int size = strlen(*out);
int newsize = size + strlen(sep)+1+strlen(deliver_to_header)+newrcptlen+1;
char c;
/* see if we need to grow the string */
if (newsize > *outalloc) {
(*outalloc) = newsize;
(*out) = xre... | false | false | false | false | true | 1 |
info_db_read(
/*@out@*/ char** line, /*!< Pointer to string containing information line to parse */
int read_mode /*!< Type of read being performed */
) { PROFILE(INFO_DB_READ);
int chars_read; /* Number of characters scanned in from this line */
unsigned int version; /* Contai... | false | false | false | false | false | 0 |
panel_simple_get_modes(struct drm_panel *panel)
{
struct panel_simple *p = to_panel_simple(panel);
int num = 0;
/* probe EDID if a DDC bus is available */
if (p->ddc) {
struct edid *edid = drm_get_edid(panel->connector, p->ddc);
drm_mode_connector_update_edid_property(panel->connector, edid);
if (edid) {
... | false | false | false | false | false | 0 |
globus_callback_adjust_oneshot_nothreads(
globus_callback_handle_t callback_handle,
const globus_reltime_t * new_delay)
{
globus_l_callback_info_t * callback_info;
callback_info = (globus_l_callback_info_t *)
globus_handle_table_lookup(
&globus_l_callb... | false | false | false | false | false | 0 |
gfarm_hash_key_equal_strptr(
const void *key1, int key1len,
const void *key2, int key2len)
{
const char *const *strptr1 = key1, *const *strptr2 = key2;
const char *str1 = *strptr1, *str2 = *strptr2;
int len1, len2;
/* compare first character of the strings, short-cut in most cases. */
if (*str1 != *str2)
retu... | false | false | false | false | false | 0 |
libssh2_userauth_publickey(LIBSSH2_SESSION *session,
const char *user,
const unsigned char *pubkeydata,
size_t pubkeydata_len,
LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC((*sign_callback)),
vo... | false | false | false | false | false | 0 |
get_ext (char const *n)
{
split (n);
if (*ext == '.')
return (xstrdup (ext + 1));
return ext;
} | false | false | false | false | false | 0 |
DtResolveLabel (
char *LabelString)
{
DT_FIELD *LabelField;
DbgPrint (ASL_DEBUG_OUTPUT, "Resolve Label: %s\n", LabelString);
/* Resolve a label reference to an integer (table offset) */
if (*LabelString != '$')
{
return (0);
}
LabelField = D... | false | false | false | false | false | 0 |
euc_jp_character_iterator (const char *s)
{
unsigned char c = *s;
if (c >= 0xa1 && c < 0xff)
{
unsigned char c2 = s[1];
if (c2 >= 0xa1 && c2 < 0xff)
return 2;
}
else if (c == 0x8e)
{
unsigned char c2 = s[1];
if (c2 >= 0xa1 && c2 < 0xe0)
return 2;
}
else if... | false | false | false | false | false | 0 |
gee_array_list_iterator_real_has_previous (GeeBidirIterator* base) {
GeeArrayListIterator * self;
gboolean result = FALSE;
gint _tmp0_ = 0;
GeeArrayList* _tmp1_ = NULL;
gint _tmp2_ = 0;
gint _tmp3_ = 0;
self = (GeeArrayListIterator*) base;
_tmp0_ = self->priv->_stamp;
_tmp1_ = self->priv->_list;
_tmp2_ = _tmp... | false | false | false | false | false | 0 |
list_store_binding_sync_pref_to_store (ListStoreBinding *binding,
GConfValue *value)
{
GSList *list, *l;
GtkTreeIter iter;
/* Make sure we don't enter an infinite synchronizing loop */
g_signal_handler_block (binding->list_store,
... | false | false | false | false | false | 0 |
mprGetAppPath()
{
if (MPR->appPath) {
return sclone(MPR->appPath);
}
#if MACOSX
{
char path[MPR_MAX_PATH], pbuf[MPR_MAX_PATH];
uint size;
ssize len;
size = sizeof(path) - 1;
if (_NSGetExecutablePath(path, &size) < 0) {
return mprGetAbsPath(".");
}
path[size... | false | false | false | false | false | 0 |
cm_copy_private_data(const void *private_data,
u8 private_data_len)
{
void *data;
if (!private_data || !private_data_len)
return NULL;
data = kmemdup(private_data, private_data_len, GFP_KERNEL);
if (!data)
return ERR_PTR(-ENOMEM);
return data;
} | false | false | false | false | false | 0 |
square_changed(GtkWidget *check,
CalibrateControls *controls)
{
CalibrateArgs *args = controls->args;
if (controls->in_update)
return;
controls->in_update = TRUE;
args->square
= gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check));
if (args->square) {
args... | false | false | false | false | false | 0 |
get_c_time(union DateData *x)
{
assert(complex_dat_p(x));
if (!have_time_p(x)) {
#ifndef USE_PACK
int r;
assert(have_df_p(x));
r = df_utc_to_local(x->c.df, x->c.of);
df_to_time(r, &x->c.hour, &x->c.min, &x->c.sec);
x->c.flags |= HAVE_TIME;
#else
int r, m, d, h, min, s;
assert(have_df_p(x));
m = EX_MON(... | false | false | false | false | false | 0 |
_sendto_channel_local_with_capability_butone(struct Client *one, int type, int caps, int negcaps, struct Channel *chptr,
const char *pattern, va_list * args)
{
buf_head_t linebuf;
struct membership *msptr;
struct Client *target_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_linebuf_newbuf(&linebuf);
rb_li... | false | false | false | false | false | 0 |
plain_target_init(FILE *fp)
{
char buf[BUFSIZE];
char *p, *q;
int idx;
u32 tid, val;
tid = 0;
while (fgets(buf, BUFSIZE, fp)) {
q = buf;
p = target_sep_string(&q);
if (!p || *p == '#')
continue;
if (!strcasecmp(p, "Target")) {
tid = 0;
if (!(p = target_sep_string(&q)))
continue;
__plain_t... | false | false | false | false | false | 0 |
build_text_table(ArtTextWidget w)
{
TSNode *stream = w->arttext.stream;
long n, y = 0;
alloc_text_table(w, 8);
w->arttext.lines = 0;
w->arttext.table[0].y = 0;
w->arttext.table[0].node = NULL;
while (stream) {
y = build_and_append(w, stream, y);
stream = stream->gen.next;
}
n = ... | false | false | false | false | false | 0 |
objc_v2_get_class_reference (tree ident)
{
tree decl;
ident_data_tuple e;
if (classrefs)
{
int count;
ident_data_tuple *ref;
FOR_EACH_VEC_ELT (ident_data_tuple, classrefs, count, ref)
{
if (ref->ident == ident)
{
if (!ref->data)
ref->data = build_v2_class_reference_decl (id... | false | false | false | false | false | 0 |
findStylesheetByName(const std::string & /*sheetType*/, const std::string &n) const
{
return findStylesheetByName( stylesheets(), n );
} | false | false | false | false | false | 0 |
marshal(TypeCode_base* tc,
cdrStream& s,
TypeCode_offsetTable* otbl)
{
CORBA::ULong tck = tc->NP_kind();
// Follow any TypeCode_indirect objects created by
// ORB::create_recursive_tc().
while (tck == 0xffffffff)
{
tc = ((TypeCode_indirect*)tc)->NP_resolved();
tck = tc->NP_kind(... | false | false | false | false | false | 0 |
pullPointNew(pullContext *pctx) {
static const char me[]="pullPointNew";
pullPoint *pnt;
unsigned int ii;
size_t pntSize;
pullPtrPtrUnion pppu;
if (!pctx) {
biffAddf(PULL, "%s: got NULL pointer", me);
return NULL;
}
if (!pctx->infoTotalLen) {
biffAddf(PULL, "%s: can't allocate points w/out ... | false | false | false | false | false | 0 |
me_su(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[])
{
struct Client *target_p;
if(!(source_p->flags & FLAGS_SERVICE))
return 0;
if((target_p = find_client(parv[1])) == NULL)
return 0;
if(!target_p->user)
return 0;
if(EmptyString(parv[2]))
target_p->user->suser[0] = '\... | false | false | false | false | false | 0 |
connection_obs_prepare(struct connection *conn, struct chunk *c) {
struct iovec iov;
obstcp_server_encrypt(&conn->ctx, c->data + c->done,
c->data + c->done, c->length - c->done);
obstcp_server_prefix(&conn->ctx, &iov);
if (iov.iov_len > CHUNK_PRE) abort();
c->done -= iov.iov_len;
c-... | false | false | false | false | false | 0 |
expandRow(Guchar *srcBuf, Guchar *dstBuf, int srcWidth, int scaledWidth, int nComps)
{
double xStep = (double)srcWidth/scaledWidth;
double xSrc = 0.0;
double xFrac, xInt;
int p;
// pad the source with an extra pixel equal to the last pixel
// so that when xStep is inside the last pixel we still have two
... | false | false | false | false | false | 0 |
operator<(const OrdSequence&s)const
{
double ta= average();
double sa= s.average();
return(ta<sa||((ta==sa)&&(operator[](0)> s[0])));
} | false | false | false | false | false | 0 |
is_completed()
{
gint j;
gboolean done = TRUE;
for(j=0; j<number_of_item_y; j++)
{
if(position[number_of_item_x-1][j]->width != number_of_item_y - j)
done = FALSE;
}
return done;
} | false | false | false | false | false | 0 |
__dtft_isInterval ( CMPIDateTime * dt, CMPIStatus * rc )
{
struct native_datetime * ndt = (struct native_datetime *) dt;
CMSetStatus ( rc, CMPI_RC_OK );
return ndt->cimDt[21] == ':' ? 1 : 0;
} | false | false | false | false | false | 0 |
e_cal_backend_create_objects_sync (ECalBackend *backend,
const gchar * const *calobjs,
GQueue *out_uids,
GCancellable *cancellable,
GError **error)
{
EAsyncClosure *closure;
GAsy... | false | false | false | false | false | 0 |
__mix_s16d(audio_voice_t *v, int *out, int *sout, unsigned frames)
{
#define __SEND
#define __STEREO
#define __16BIT
#include "a_mixers.h"
} | false | false | false | false | false | 0 |
fill_header (msgdomain_list_ty *mdlp)
{
/* Cache the strings filled in, for use when there are multiple domains
and a header entry for each domain. */
const char *field_value[NFIELDS];
size_t k, j, i;
for (i = 0; i < NFIELDS; i++)
field_value[i] = NULL;
for (k = 0; k < mdlp->nitems; k++)
{
... | false | false | false | false | false | 0 |
get_switched_clauses(List *clauses, Relids outerrelids)
{
List *t_list = NIL;
ListCell *l;
foreach(l, clauses)
{
RestrictInfo *restrictinfo = (RestrictInfo *) lfirst(l);
OpExpr *clause = (OpExpr *) restrictinfo->clause;
Assert(is_opclause(clause));
if (bms_is_subset(restrictinfo->right_relids, out... | false | false | false | false | false | 0 |
generate_reports (struct prog_ctx *ctx)
{
ListIterator i;
struct report *r;
if (!ctx->reports)
log_fatal (1, "No reports requested!");
i = list_iterator_create (ctx->reports);
while ((r = list_next (i))) {
if (r->report != NULL)
r->report (ctx);
}
list_ite... | false | false | false | false | false | 0 |
items( WhichItems which ) const
{
return itemsForDir( url(), which );
} | false | false | false | false | false | 0 |
gst_decklink_src_send_event (GstElement * element, GstEvent * event)
{
GstDecklinkSrc *src;
gboolean result = FALSE;
src = GST_DECKLINK_SRC (element);
GST_DEBUG_OBJECT (src, "handling event %p %" GST_PTR_FORMAT, event, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
g_atomic_int_set... | false | false | false | false | false | 0 |
dummy_queue(struct usb_ep *_ep, struct usb_request *_req,
gfp_t mem_flags)
{
struct dummy_ep *ep;
struct dummy_request *req;
struct dummy *dum;
struct dummy_hcd *dum_hcd;
unsigned long flags;
req = usb_request_to_dummy_request(_req);
if (!_req || !list_empty(&req->queue) || !_req->complete)
return -EINVA... | false | true | false | false | false | 1 |
gimmix_update_playlists_treeview (void)
{
GtkTreeModel *pls_treemodel;
GtkTreeIter pls_treeiter;
GtkListStore *pls_liststore;
GdkPixbuf *pls_pixbuf;
MpdData *data;
gchar *name;
gchar *path;
pls_treemodel = gtk_tree_view_get_model (GTK_TREE_VIEW(playlists_treeview));
pls_liststore = GTK_LIST_STORE (pl... | false | false | false | false | false | 0 |
string_array_get_strlen1_( double * string_array_header,
int * index,
int * true_strlen )
{
SA_Head * head;
if(*(SA_Head**)string_array_header){
head = *((SA_Head**) string_array_header);
*true_strlen = head->strlen_array[*index-1];
... | false | false | false | false | false | 0 |
chanview_set_impl (chanview *cv, int type)
{
/* cleanup the old one */
if (cv->func_cleanup)
cv->func_cleanup (cv);
switch (type)
{
case 0:
cv->func_init = cv_tabs_init;
cv->func_postinit = cv_tabs_postinit;
cv->func_add = cv_tabs_add;
cv->func_move_focus = cv_tabs_move_focus;
cv->func_change_orientat... | false | false | false | false | false | 0 |
imap_step_send (const char *data)
{
char *buf;
int rc;
int len;
if (args_info.server_flag)
len = asprintf (&buf, "+ %s", data);
else
len = asprintf (&buf, "%s", data);
if (len < 0)
return 0;
rc = writeln (buf);
free (buf);
if (!rc)
return 0;
return 1;
} | false | false | false | false | false | 0 |
ReadPHPCoverageDirectory(const char* d)
{
cmsys::Directory dir;
if(!dir.Load(d))
{
return false;
}
size_t numf;
unsigned int i;
numf = dir.GetNumberOfFiles();
for (i = 0; i < numf; i++)
{
std::string file = dir.GetFile(i);
if(file != "." && file != ".."
&& !cmSystemTools::File... | false | false | false | false | false | 0 |
getAmmoFilling()
{
if ( plant->baseType->hasFunction(ContainerBaseType::AmmoProduction))
return fillAmmo;
else
return false;
} | false | false | false | false | false | 0 |
capsuleCapsuleDistance(
btVector3& normalOnB,
btVector3& pointOnB,
btScalar capsuleLengthA,
btScalar capsuleRadiusA,
btScalar capsuleLengthB,
btScalar capsuleRadiusB,
int capsuleAxisA,
int capsuleAxisB,
const btTransform& transformA,
const btTransform& transformB,
btScalar distanceThreshold )
{
btVector3 di... | false | false | false | false | false | 0 |
bcm590xx_get_enable_register(int id)
{
int reg = 0;
if (BCM590XX_REG_IS_LDO(id))
reg = BCM590XX_RFLDOPMCTRL1 + id * 2;
else if (BCM590XX_REG_IS_GPLDO(id))
reg = BCM590XX_GPLDO1PMCTRL1 + id * 2;
else
switch (id) {
case BCM590XX_REG_CSR:
reg = BCM590XX_CSRPMCTRL1;
break;
case BCM590XX_REG_IOSR1:
r... | false | false | false | false | false | 0 |
get_adj_dim(StripMiningInnerLoop *smil, Array_def_use_table_semnode *aduts)
{
int dim, count;
Array_range_semnode *ars;
dim = lad_sm_get_dim_strip_mining_cmp(smil->sm->cmp_head,
aduts->entry);
count = 0;
ars = aduts->region_head->dim_head;
while (dim != count) {
ars = ars->next_dim;
... | false | false | false | false | false | 0 |
get_method(utf_string const& mth_name,
utf_string const& mth_desc)
{
for (method_desc* method = methods; method != NULL; method = method->next){
if (method->name == mth_name && method->desc == mth_desc) {
return method;
}
}
return methods = new method_desc(mth_n... | false | false | false | false | false | 0 |
init_mteTriggerExistenceTable(void)
{
static oid mteTExistTable_oid[] = { 1, 3, 6, 1, 2, 1, 88, 1, 2, 4 };
size_t mteTExistTable_oid_len = OID_LENGTH(mteTExistTable_oid);
netsnmp_handler_registration *reg;
int rc;
/*
* Ensure the (combined) table container is available...
... | false | false | false | false | false | 0 |
udisks_linux_block_object_uevent (UDisksLinuxBlockObject *object,
const gchar *action,
UDisksLinuxDevice *device)
{
g_return_if_fail (UDISKS_IS_LINUX_BLOCK_OBJECT (object));
g_return_if_fail (device == NULL || UDISKS_IS_LINUX_DEVICE... | false | false | false | false | false | 0 |
prune_peers(void)
{
struct iax2_peer *peer;
struct ao2_iterator i;
i = ao2_iterator_init(peers, 0);
while ((peer = ao2_iterator_next(&i))) {
if (ast_test_flag64(peer, IAX_DELME) || ast_test_flag64(peer, IAX_RTCACHEFRIENDS)) {
unlink_peer(peer);
}
peer_unref(peer);
}
ao2_iterator_destroy(&i);
} | false | false | false | false | false | 0 |
GetConnection(int connection) const {
int i = 0;
for (ConnectionMap::const_iterator it = connections_.begin();
it != connections_.end(); ++it) {
if (i == connection) {
return it->second->addr_pair();
}
++i;
}
return talk_base::SocketAddressPair();
} | false | false | false | false | false | 0 |
append_char(struct string_buf *buf, char c)
{
if (buf->buf == NULL)
return;
if (buf->pos == buf->allocated) {
char *p;
buf->allocated *= 2;
p = realloc(buf->buf, buf->allocated);
if (p == NULL) {
free(buf->buf);
buf->buf = NULL;
return;
}
buf->buf = p;
}
buf->buf[buf->pos] = c;
buf->pos++;
... | false | false | false | false | false | 0 |
set_memory_idx(PExpr*ldx, PExpr*rdx)
{
if (lidx_ != 0 || ridx_ != 0) {
cerr << get_fileline() << ": error: Array ``" << name_
<< "'' has already been declared." << endl;
error_cnt_ += 1;
} else {
lidx_ = ldx;
ridx_ = rdx;
}
} | false | false | false | false | false | 0 |
limit_rate() {
try { // for error handling
match(INT_CONST);
if ( inputState->guessing==0 ) {
#line 754 "iptables.g"
importer->limit_val = LT(0)->getText();
#line 3265 "IPTCfgParser.cpp"
}
match(SLASH);
match(WORD);
if ( inputState->guessing==0 ) {
#line 756 "iptables.g"
importer->limit_suffix... | false | false | false | false | false | 0 |
add_test (GType parent_type,
GType child_type,
AssertParentedFunc func)
{
gchar *test_path;
TestData *data = g_new (TestData, 1);
test_path = g_strdup_printf ("/AddChild/%s/%s",
g_type_name (parent_type),
g_type_name (child_type));
data->parent_type = parent_type;
data->child_type ... | false | false | false | false | false | 0 |
gpk_task_setup_dialog_eula (GpkTask *task)
{
GtkWidget *widget;
guint retval;
GError *error = NULL;
/* get UI */
task->priv->builder_eula = gtk_builder_new ();
retval = gtk_builder_add_from_file (task->priv->builder_eula, GPK_DATA "/gpk-eula.ui", &error);
if (retval == 0) {
g_warning ("failed to load ui: %s",... | false | false | false | false | false | 0 |
SetInformation(vtkInformation *args)
{
// Same as in vtkCxxSetObjectMacro, but no Modified() so that
// this doesn't cause extra pipeline updates.
vtkDebugMacro(<< this->GetClassName() << " (" << this
<< "): setting Information to " << args );
if (this->Information != args)
{
vtkInformation* tempS... | false | false | false | false | false | 0 |
cpl_propertylist_set_char(cpl_propertylist *self, const char *name,
char value)
{
cpl_property *property;
if (self == NULL || name == NULL) {
return cpl_error_set_(CPL_ERROR_NULL_INPUT);
}
property = _cpl_propertylist_get(self, name);
if (property == NULL) {
... | false | false | false | false | false | 0 |
crm_remote_tcp_connect_async(const char *host, int port, int timeout, /*ms */
void *userdata, void (*callback) (void *userdata, int sock))
{
struct addrinfo *res = NULL;
struct addrinfo *rp = NULL;
struct addrinfo hints;
const char *server = host;
int ret_ga;
int s... | false | false | false | false | false | 0 |
PL_InitArenaPool(
PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align)
{
/*
* Look-up table of PR_BITMASK(PR_CeilingLog2(align)) values for
* align = 1 to 32.
*/
static const PRUint8 pmasks[33] = {
0, /* not used */
... | false | false | false | false | false | 0 |
killclient(const Arg *arg) {
XEvent ev;
if(!selmon->sel)
return;
if(isprotodel(selmon->sel)) {
ev.type = ClientMessage;
ev.xclient.window = selmon->sel->win;
ev.xclient.message_type = wmatom[WMProtocols];
ev.xclient.format = 32;
ev.xclient.data.l[0] = wmatom[WMDelete];
ev.xclient.data.l[1] = CurrentTi... | false | false | false | false | false | 0 |
setData(const VCard &i)
{
ui_.le_fullname->setText( i.fullName() );
ui_.le_nickname->setText( i.nickName() );
ui_.le_bday->setText( i.bdayStr() );
QString email;
if ( !i.emailList().isEmpty() )
email = i.emailList()[0].userid;
ui_.le_email->setText( email );
ui_.le_homepage->setText( i.url() );
QString pho... | false | false | false | false | false | 0 |
node_has_high_bound (case_node_ptr node, tree index_type)
{
tree high_plus_one;
case_node_ptr pnode;
/* If there is no upper bound, obviously no test is needed. */
if (TYPE_MAX_VALUE (index_type) == NULL)
return 1;
/* If the upper bound of this node is the highest value in the type
of the index e... | false | false | false | false | false | 0 |
updateValueMap(const Value *I, unsigned Reg, unsigned NumRegs) {
if (!isa<Instruction>(I)) {
LocalValueMap[I] = Reg;
return;
}
unsigned &AssignedReg = FuncInfo.ValueMap[I];
if (AssignedReg == 0)
// Use the new register.
AssignedReg = Reg;
else if (Reg != AssignedReg) {
// Arrange for uses... | false | false | false | false | false | 0 |
os_canonify_dirname(string_ty *dirname)
{
if (dirname->str_text[dirname->str_length - 1] != '/')
return dirname;
return str_n_from_c(dirname->str_text, dirname->str_length - 1);
} | false | false | false | false | false | 0 |
bsl_sync(struct bsl_device *dev)
{
static const uint8_t c = DATA_HDR;
int tries = 2;
if (tcflush(dev->serial_fd, TCIFLUSH) < 0) {
pr_error("bsl: tcflush");
return -1;
}
while (tries--)
if (!(write_all(dev->serial_fd, &c, 1) || bsl_ack(dev)))
return 0;
printc_err("bsl: sync failed\n");
return -1;
} | false | false | false | false | false | 0 |
method_24(const int *account, int *weight) {
// copy to keep interface array const
int account_buf[10];
for(int i=0; i<=9; i++) {
account_buf[i] = account[i];
}
if (2 < account_buf[0] && 7 > account_buf[0])
account_buf[0] = 0;
if (9 == account_buf[0]) {
account_buf[0] = 0;
account_buf[1] = ... | false | false | false | false | false | 0 |
updateEngine() //SLOT
{
DEBUG_BLOCK
AmarokConfig::setEqualizerMode( activeCheckBox->isChecked() ?
eqPresets->currentIndex() + 1 : 0 ); // equalizer mode 0 is off
AmarokConfig::setEqualizerGains( gains() );
The::engineController()->eqUpdate();
} | false | false | false | false | false | 0 |
runModal(XAP_Frame * pFrame)
{
UT_ASSERT(pFrame);
// build the dialog
GtkWidget * cf = _constructWindow();
UT_return_if_fail(cf);
switch (abiRunModalDialog ( GTK_DIALOG(cf), pFrame, this, GTK_RESPONSE_CLOSE,false ))
{
case GTK_RESPONSE_CLOSE:
m_answer = a_CANCEL;
break;
case GTK_RESPONSE_OK:
m_answe... | false | false | false | false | false | 0 |
packed_archive_recv(MPI_Comm comm, int source, int tag, packed_iarchive& ar,
MPI_Status& status)
{
std::size_t count;
BOOST_MPI_CHECK_RESULT(MPI_Recv,
(&count, 1, get_mpi_datatype<std::size_t>(count),
source, tag, comm, &status));
// Prepare ... | false | false | false | false | true | 1 |
do_unmount (GMount *mount,
NemoPlacesSidebar *sidebar)
{
if (mount != NULL) {
nemo_file_operations_unmount_mount_full (NULL, mount, FALSE, TRUE,
unmount_done,
g_object_ref (sidebar->window));
}
} | false | false | false | false | false | 0 |
_dbus_loop_queue_dispatch (DBusLoop *loop,
DBusConnection *connection)
{
if (_dbus_list_append (&loop->need_dispatch, connection))
{
dbus_connection_ref (connection);
return TRUE;
}
else
return FALSE;
} | false | false | false | false | false | 0 |
yp_bind (const char *indomain)
{
int status;
__libc_lock_lock (ypbindlist_lock);
status = __yp_bind (indomain, &ypbindlist);
__libc_lock_unlock (ypbindlist_lock);
return status;
} | 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.