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 |
|---|---|---|---|---|---|---|
copy(struct String *str, int i, int n){
if(str == NULL){
E("Internal error - string from parameter is null");
exit(intern);
}
if(str->Value == NULL){
E("Internal error - string value is null");
exit(intern);
}
// start index
if(i <= 0){
E("Semantic error - start index cannot be negative");
exit(sem_e... | false | false | false | false | false | 0 |
read_pty_proc(fd)
register int fd;
{
register Process p;
int n;
char ibuf[1024+1]; /* NOTE: room for added NUL */
for (p = procs; ; p = p->p_next) {
if (p == NULL) {
writef("\riproc: unknown fd %d", fd);
return;
}
if (p->p_fd == fd)
break;
}
n = read(fd, (UnivPtr) ibuf, sizeof(ibuf) - 1);
if (n ... | false | false | false | false | false | 0 |
vdp_getvscroll(int plane, int column)
{
UINT32 vsramoffset;
switch (vdp_vscrollmode)
{
case 0x00: /* Overall Scroll */
return VDP_VSRAM_WORD(plane) & 0x7ff;
case 0x01: /* Column Scroll */
if (column == 40) column = 39; /* Fix Minor Innacuracy Only affects PotoPoto */
vsramoffset = (4 * (col... | false | false | false | false | false | 0 |
startclient(int argn, int argc, char **argv, int fd,
int *stdin_fd, int *stdout_fd)
{
pid_t p;
int streampipe[2];
if (localfd)
{
*stdin_fd= *stdout_fd= atoi(localfd);
return;
}
if (argn >= argc) return; /* Interactive */
if (libmail_streampipe(streampipe))
{
nonsslerror("libmail_streampipe");
exit(1)... | false | false | false | false | false | 0 |
findPointCoords(UT_uint32 iOffset, UT_sint32& x, UT_sint32& y, UT_sint32& x2, UT_sint32& y2, UT_sint32& height, bool& bDirection)
{
//UT_DEBUGMSG(("fintPointCoords: TabRun\n"));
UT_sint32 xoff;
UT_sint32 yoff;
UT_sint32 xoff2;
UT_sint32 yoff2;
UT_ASSERT(getLine());
if(getLine()->getY() == -2000000)
{
// UT_... | false | false | false | false | false | 0 |
setPoolSize( size_t size )
{
// If we're driving this from our own data, allocate billboards
if (!mExternalData)
{
// Never shrink below size()
size_t currSize = mBillboardPool.size();
if (currSize >= size)
return;
this->increa... | false | false | false | false | false | 0 |
network_init(void)
{
struct bootp_t *bp = (struct bootp_t *)trackbuf;
int pkt_len;
*LocalDomain = 0; /* No LocalDomain received */
/*
* Get the DHCP client identifiers (query info 1)
*/
printf("Getting cached packet ");
pkt_len = pxe_get_cached_info(1);
parse_dhcp(pkt_len);
... | false | false | false | false | false | 0 |
intel_815_configure(void)
{
u32 addr;
u8 temp2;
struct aper_size_info_8 *current_size;
/* attbase - aperture base */
/* the Intel 815 chipset spec. says that bits 29-31 in the
* ATTBASE register are reserved -> try not to write them */
if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK) {
dev_emerg(&agp_b... | false | false | false | false | false | 0 |
split_locale_id(const Glib::ustring& locale_id, Glib::ustring& language_id, Glib::ustring& country_id)
{
//Split the locale ID into language and country parts:
language_id = Utils::locale_language_id(locale_id);
country_id.clear();
if(!language_id.empty() && ((language_id.size() +1) < locale_id.size()))
co... | false | false | false | false | false | 0 |
H5O_msg_count(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
{
H5O_t *oh = NULL; /* Object header to operate on */
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
unsigned msg_count; /* Message count */
int ret_value; /* Return value */
... | false | false | false | false | false | 0 |
gdk_pixbuf_core_gdk_pixbuf_new(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj colorspace_scm;
int colorspace;
ScmObj has_alpha_scm;
int has_alpha;
ScmObj bits_per_sample_scm;
int bits_per_sample;
ScmObj width_scm;
int width;
ScmObj height_scm;
int height;
ScmObj SCM_SUBRARGS[5];
int SCM_i... | false | false | false | false | false | 0 |
fuse_create_resume (fuse_state_t *state)
{
fd_t *fd = NULL;
fuse_private_t *priv = NULL;
fuse_fd_ctx_t *fdctx = NULL;
if (!state->loc.parent) {
gf_log ("glusterfs-fuse", GF_LOG_WARNING,
"%"PRIu64" CREATE %s/%s resolution failed",
... | false | false | false | false | false | 0 |
ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb)
{
struct wmi_scan_ev_arg arg = {};
enum wmi_scan_event_type event_type;
enum wmi_scan_completion_reason reason;
u32 freq;
u32 req_id;
u32 scan_id;
u32 vdev_id;
int ret;
ret = ath10k_wmi_pull_scan(ar, skb, &arg);
if (ret) {
ath10k_warn(ar, "faile... | false | false | false | false | false | 0 |
init_vp(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &(tnl->vb);
struct vp_stage_data *store;
const GLuint size = VB->Size;
stage->privatePtr = calloc(1, sizeof(*store));
store = VP_STAGE_DATA(stage);
if (!store)
r... | false | false | false | false | false | 0 |
restart(bool force) const
{
#ifdef Q_WS_X11
if(mCapabilities & GnomeSessionManager)
{
QDBusInterface dbusInterface("org.gnome.SessionManager", "/org/gnome/SessionManager", "org.gnome.SessionManager", QDBusConnection::sessionBus());
QDBusMessage reply = dbusInterface.call("RequestReboot");
if(reply.type() != QD... | false | false | false | false | false | 0 |
ldapsvr_execute_query( LdapServer *server, LdapQuery *qry ) {
LdapControl *ctlCopy;
cm_return_if_fail( server != NULL );
cm_return_if_fail( qry != NULL );
/* Copy server's control data to the query */
ctlCopy = ldapctl_create();
ldapctl_copy( server->control, ctlCopy );
ldapqry_set_control( qry, ctlCopy );
ld... | false | false | false | false | false | 0 |
WriteTextureParamEntry( const Surface& pSurface, const std::string& pTypeName, const std::string& pMatName)
{
// if surface is a texture, write out the sampler and the surface parameters necessary to reference the texture
if( !pSurface.texture.empty() )
{
mOutput << startstr << "<newparam sid=\"" << pMatName ... | false | false | false | false | false | 0 |
CorrectArea()
{
REAL area = edge->next->Vec() * edge->Vec();
if (area >= 0)
return false;
eHalfEdge *run = edge;
// find the longest edge ( preferably with wall )
eHalfEdge *longest = NULL;
REAL length = -1;
bool wall = false;
for (int i=2; i>=0; i--)
{
... | false | false | false | false | false | 0 |
fillBuf() {
int c, c1, c2;
int n;
// already hit EOF?
if (eof)
return gFalse;
// grab two bytes
if (nextEnd < bufEnd + 1) {
if ((c1 = str->getChar()) == EOF) {
eof = gTrue;
return gFalse;
}
} else {
c1 = bufEnd[0] & 0xff;
}
if (nextEnd < bufEnd + 2) {
if ((c2 = str->g... | false | false | false | false | false | 0 |
stp_set_file_parameter(stp_vars_t *v, const char *parameter,
const char *value)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_FILE];
size_t byte_count = 0;
if (value)
byte_count = strlen(value);
stp_deprintf(STP_DBG_VARS, "stp_set_file_parameter(0x%p, %s, %s)\n",
(const void *) v, param... | false | false | false | false | false | 0 |
hash_find_entry (Hash_table *table, const void *entry,
struct hash_entry **bucket_head, bool delete)
{
struct hash_entry *bucket = safe_hasher (table, entry);
struct hash_entry *cursor;
*bucket_head = bucket;
/* Test for empty bucket. */
if (bucket->data == NULL)
return NULL;
/* See... | false | false | false | false | false | 0 |
doLoadTape(QString& tapeFileName)
{
VisualizedDeviceEntry * entry = getDeviceEntry();
if (entry != NULL)
{
std::stringstream command;
command << "devinit " << std::hex << entry->getDeviceNumber() << " " <<tapeFileName.toStdString() ;
mMainWindow->issueCommand(command.str());
}
mClickRow=-1;
return;
} | false | false | false | false | false | 0 |
iot_schedule (call_frame_t *frame, xlator_t *this, call_stub_t *stub)
{
int ret = -1;
iot_pri_t pri = IOT_PRI_MAX - 1;
if (frame->root->pid < GF_CLIENT_PID_MAX) {
pri = IOT_PRI_LEAST;
goto out;
}
switch (stub->fop) {
cas... | false | false | false | false | false | 0 |
gfire_sq_gamespy_query(gfire_game_server *p_server, gboolean p_full, int p_socket)
{
static const gchar info_query[] = "\\info\\";
static const gchar rules_query[] = "\\rules\\";
static const gchar players_query[] = "\\players\\";
const gchar *query = NULL;
if(!p_server->data)
query = info_query;
else
{
gfi... | false | false | false | false | false | 0 |
ajStrToHex(const AjPStr str, ajint* Pval)
{
AjBool ret = ajFalse;
const char* cp;
ajlong l;
char* ptr;
*Pval = 0;
if(!str)
return ret;
if(!str->Len)
return ret;
cp = str->Ptr;
errno = 0;
l = strtol(cp, &ptr, 16);
if(!*ptr && errno != ERANGE)
{
l = AJMAX(INT_MIN, l... | false | false | false | false | false | 0 |
sff8079_show_ascii(const __u8 *id, unsigned int first_reg,
unsigned int last_reg, const char *name)
{
unsigned int reg, val;
printf("\t%-41s : ", name);
for (reg = first_reg; reg <= last_reg; reg++) {
val = id[reg];
putchar(((val >= 32) && (val <= 126)) ? val : '_');
}
printf("\n");
} | false | false | false | false | false | 0 |
do_update_control_entry(GtkWidget *widget,
GdkEventFocus *ev G_GNUC_UNUSED,
gpointer data)
{
g_return_if_fail(ENTANGLE_IS_CONTROL_PANEL(data));
EntangleControlText *control = g_object_get_data(G_OBJECT(widget), "control");
EntangleCont... | false | false | false | false | false | 0 |
ssl_hook_Fixup(request_rec *r)
{
SSLConnRec *sslconn = myConnConfig(r->connection);
SSLSrvConfigRec *sc = mySrvConfig(r->server);
SSLDirConfigRec *dc = myDirConfig(r);
apr_table_t *env = r->subprocess_env;
char *var, *val = "";
#ifdef HAVE_TLSEXT
const char *servername;
#endif
STACK_OF(X509)... | false | false | false | false | false | 0 |
readApplyPaste() {
FILE * outfile = readOutputFilename();
bool strict = true;
int count;
char * token = needNextToken();
statisticCreator * statistics = readStatisticList(&token, &count);
if (strcmp(token, "fillIn") == 0) {
strict = false;
token = needNextToken();
}
char * infilename = token;
FILE * infi... | false | false | true | false | true | 1 |
amd_alloc_nb(int cpu)
{
struct amd_nb *nb;
int i;
nb = kzalloc_node(sizeof(struct amd_nb), GFP_KERNEL, cpu_to_node(cpu));
if (!nb)
return NULL;
nb->nb_id = -1;
/*
* initialize all possible NB constraints
*/
for (i = 0; i < x86_pmu.num_counters; i++) {
__set_bit(i, nb->event_constraints[i].idxmsk);
n... | false | false | false | false | false | 0 |
OnBnClickedED2KDisconnect(wxCommandEvent& WXUNUSED(evt))
{
if (theApp->serverconnect->IsConnecting()) {
theApp->serverconnect->StopConnectionTry();
} else {
theApp->serverconnect->Disconnect();
}
} | false | false | false | false | false | 0 |
is_tree_node(struct buffer_head *bh, int level)
{
if (B_LEVEL(bh) != level) {
reiserfs_warning(NULL, "reiserfs-5090", "node level %d does "
"not match to the expected one %d",
B_LEVEL(bh), level);
return 0;
}
if (level == DISK_LEAF_NODE_LEVEL)
return is_leaf(bh->b_data, bh->b_size, bh);
return is_i... | false | false | false | false | false | 0 |
quit(int status)
{
if (fileOpen())
{
if (closeFile(0) < 0)
return HE_FAIL;
}
exit(status);
return(status); /* never excuted. Just to shut up some comilers */
} | false | false | false | false | false | 0 |
listdir(const char *dirname, const regex_t *regex)
{
DIR *dd;
struct dirent *dent;
char *dbfile;
if((dd = opendir(dirname)) == NULL) {
mprintf("!listdir: Can't open directory %s\n", dirname);
return -1;
}
while((dent = readdir(dd))) {
if(dent->d_ino)
{
if(strcmp(dent->d_name, "."... | false | true | false | false | false | 1 |
blt_sig_handler (int sig) {
switch (sig) {
case SIGTERM:
log_os << "ERROR: " << _progname << " received termination signal. cmdline: " << _cmdline << std::endl;
exit(EXIT_FAILURE);
#ifndef _WIN32
case SIGINT:
log_os << "ERROR: " << _progname << " received interrupt signal. cmdline: ... | false | false | false | false | false | 0 |
HPDF_Catalog_SetOpenAction (HPDF_Catalog catalog,
HPDF_Destination open_action)
{
if (!open_action) {
HPDF_Dict_RemoveElement (catalog, "OpenAction");
return HPDF_OK;
}
return HPDF_Dict_Add (catalog, "OpenAction", open_action);
} | false | false | false | false | false | 0 |
gnumeric_nominal (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
gnm_float rate = value_get_as_float (argv[0]);
gnm_float nper = gnm_floor (value_get_as_float (argv[1]));
/* I don't know why Excel disallows 0% for rate. */
if (rate <= 0 || nper < 1)
return value_new_error_NUM (ei->pos);
... | false | false | false | false | false | 0 |
esl_hmx_Create(int allocL, int allocM)
{
ESL_HMX *mx = NULL;
int i;
int status;
ESL_ALLOC(mx, sizeof(ESL_HMX));
mx->dp_mem = NULL;
mx->dp = NULL;
mx->sc = NULL;
ESL_ALLOC(mx->dp_mem, sizeof(float) * (allocL+1) * allocM);
mx->ncells = (allocL+1) * allocM;
ESL_ALLOC(mx->dp, si... | false | true | false | false | false | 1 |
formatByteSize(double size)
{
// Per IEC 60027-2
// Binary prefixes
//Tebi-byte TiB 2^40 1,099,511,627,776 bytes
//Gibi-byte GiB 2^30 1,073,741,824 bytes
//Mebi-byte MiB 2^20 1,048,576 bytes
//Kibi-byte ... | false | false | false | false | false | 0 |
putObject_builtin (tree method_return_type ATTRIBUTE_UNUSED,
tree orig_call)
{
tree addr, stmt;
UNMARSHAL4 (orig_call);
addr = build_addr_sum (value_type, obj_arg, offset_arg);
stmt = fold_build2 (MODIFY_EXPR, value_type,
build_java_indirect_ref (value_type, addr,
flag_check_reference... | false | false | false | false | true | 1 |
gnac_trash_file(GFile *file)
{
GError *error = NULL;
g_file_trash(file, NULL, &error);
if (!error ||
!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
{
g_clear_error(&error);
return;
}
g_clear_error(&error);
gchar *filename = gnac_utils_get_display_name_from_file(file, &error... | false | false | false | false | false | 0 |
CmdTable(int code)
/******************************************************************************
purpose: handles the \begin{table} ... \end{table} codes. The primary use is
to properly handle the spacing before and after the table. It is
slightly more complicated because the endfloat package... | false | false | false | false | false | 0 |
WriteAnimatedValue(const FCDAnimated* _animated, xmlNode* valueNode, const char* wantedSid)
{
FCDAnimated* animated = const_cast<FCDAnimated*>(_animated);
int32 arrayElement = animated->GetArrayElement();
FCDAnimatedData& animatedData = FArchiveXML::documentLinkDataMap[animated->GetDocument()].animatedData[ani... | false | false | false | false | false | 0 |
mcam_cam_init(struct mcam_camera *cam)
{
int ret;
if (cam->state != S_NOTREADY)
cam_warn(cam, "Cam init with device in funky state %d",
cam->state);
ret = __mcam_cam_reset(cam);
/* Get/set parameters? */
cam->state = S_IDLE;
mcam_ctlr_power_down(cam);
return ret;
} | false | false | false | false | false | 0 |
cb_cell_comment_timer (SheetControlGUI *scg)
{
g_return_val_if_fail (IS_SHEET_CONTROL_GUI (scg), FALSE);
g_return_val_if_fail (scg->comment.timer != 0, FALSE);
scg->comment.timer = 0;
scg_comment_display (scg, scg->comment.selected,
scg->comment.x, scg->comment.y);
return FALSE;
} | false | false | false | false | false | 0 |
start_pipe(void)
{
int ret;
ret = pipe(pipefd);
if (ret)
fatal_with_errno(EXIT_FAILURE, "pipe creation failed");
ret = fork();
if (ret < 0)
fatal_with_errno(EXIT_FAILURE, "fork failed");
/* start the privileged parent */
if (ret != 0) {
close(pipefd[1]);
runparent(pipefd[0]);
exit(EXIT_FAILURE); ... | false | false | false | false | false | 0 |
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__MenuItem_NotifySelect__00000018(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * selection, unsigned int mods)
{
struct IDEWorkSpace * __ecerePointer_IDEWorkSpace = (struct IDEWorkSpace *)(this ? (((char *)this)... | false | false | false | false | false | 0 |
_sqrt_mod_tonelli_shanks(mpz_class &rop, const mpz_class &a, const mpz_class &p)
{
gmp_randstate_t state;
gmp_randinit_default(state);
gmp_randseed(state, p.get_mpz_t());
mpz_class n, y, b, q, pm1, t = 1;
pm1 = p - 1;
unsigned e, m;
e = mpz_scan1 (pm1.get_mpz_t(), 0);
mpz_tdiv_q_2exp (q... | false | false | false | false | false | 0 |
ftpDataMode(char cMode)
{
if(cMode == '?') cMode = m_bTextMode ? 'A' : 'I';
else if(cMode == 'a') cMode = 'A';
else if(cMode != 'A') cMode = 'I';
kDebug(7102) << "want" << cMode << "has" << m_cDataMode;
if(m_cDataMode == cMode)
return true;
QByteArray buf = "TYPE ";
buf += cMode;
if( !ftpSendCmd(b... | false | false | false | false | false | 0 |
dbus_connection_open (const char *address,
DBusError *error)
{
DBusConnection *connection;
_dbus_return_val_if_fail (address != NULL, NULL);
_dbus_return_val_if_error_is_set (error, NULL);
connection = _dbus_connection_open_internal (address,
... | false | false | false | false | false | 0 |
getLowestPossibleValue(IRBuilder<> &IRB, Value *A, Value *Sa,
bool isSigned) {
if (isSigned) {
// Split shadow into sign bit and other bits.
Value *SaOtherBits = IRB.CreateLShr(IRB.CreateShl(Sa, 1), 1);
Value *SaSignBit = IRB.CreateXor(Sa, SaOtherBits);
// Max... | false | false | false | false | false | 0 |
int_log(unsigned int n, unsigned int base)
{
int result = 0;
while (n > 1) {
n = dm_div_up(n, base);
result++;
}
return result;
} | false | false | false | false | false | 0 |
parseLSig(struct cli_bc *bc, char *buffer)
{
const char *prefix;
char *vnames, *vend = strchr(buffer, ';');
if (vend) {
bc->lsig = cli_strdup(buffer);
*vend++ = '\0';
prefix = buffer;
vnames = strchr(vend, '{');
} else {
/* Not a logical signature, but we still have a virusname */
bc->hook_name = ... | false | false | false | false | false | 0 |
max1027_set_trigger_state(struct iio_trigger *trig, bool state)
{
struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);
struct max1027_state *st = iio_priv(indio_dev);
int ret;
if (state) {
/* Start acquisition on cnvst */
st->reg = MAX1027_SETUP_REG | MAX1027_CKS_MODE0 |
MAX1027_REF_MODE2;
ret = s... | false | false | false | false | false | 0 |
ipv6_to_str(const in6_addr *ipv6, char *str)
{
struct Region
{
int pos;
int length;
};
const unsigned char *ipv6_bytes= (const unsigned char *) ipv6;
// 1. Translate IPv6-address bytes to words.
// We can't just cast to short, because it's not guaranteed
// that sizeof (short) == 2. So, we have ... | false | false | false | false | false | 0 |
dio_get_bit_string(struct data_in *din, char *dest,
size_t max_dest_size)
{
int npack = 0; /* number claimed in packet */
int i; /* iterate the bytes */
fc_assert(max_dest_size > 0);
if (!dio_get_uint16(din, &npack)) {
din->bad_bit_string = TRUE;
return FALSE;
}
if (npack >= max_dest_size) ... | false | false | false | false | false | 0 |
count_num_arguments (tree decl, bool *is_varargs)
{
unsigned int num = 0;
tree t;
/* Capture named arguments for K&R functions. They do not
have a prototype and thus no TYPE_ARG_TYPES. */
for (t = DECL_ARGUMENTS (decl); t; t = DECL_CHAIN (t))
++num;
/* Check if the function has variadic arguments... | false | false | false | false | false | 0 |
ews_replace_gal_in_db (EBookBackendEws *cbews,
const gchar *filename,
GCancellable *cancellable,
GError **error)
{
EBookBackendEwsPrivate *priv = cbews->priv;
EwsOabDecoder *eod;
gboolean ret = TRUE;
struct _db_data data;
g_return_val_if_fail (p... | false | false | false | false | false | 0 |
rpcsvc_program_notify (rpcsvc_listener_t *listener, rpcsvc_event_t event,
void *data)
{
rpcsvc_notify_wrapper_t *wrapper = NULL;
if (!listener) {
goto out;
}
list_for_each_entry (wrapper, &listener->svc->notify, list) {
if (wrapper... | false | false | false | false | false | 0 |
hpet_open(struct inode *inode, struct file *file)
{
struct hpet_dev *devp;
struct hpets *hpetp;
int i;
if (file->f_mode & FMODE_WRITE)
return -EINVAL;
mutex_lock(&hpet_mutex);
spin_lock_irq(&hpet_lock);
for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
for (i = 0; i < hpetp->hp_ntim... | false | false | false | false | false | 0 |
add_filter (const char *name)
{
ImageFilter *ifilter;
GList *item;
for (item = filter_list; item; item = item->next) {
ifilter = item->data;
if (strcmp (ifilter->name, name) == 0)
return ifilter;
}
ifilter = g_new0 (ImageFilter, 1);
ifilter->name = g_strdup (name);
filter_list = g_list_prepend (filter_li... | false | false | false | false | false | 0 |
arm_frame_pointer_required (void)
{
return (cfun->has_nonlocal_label
|| SUBTARGET_FRAME_POINTER_REQUIRED
|| (TARGET_ARM && TARGET_APCS_FRAME && ! leaf_function_p ()));
} | false | false | false | false | false | 0 |
phoenix_sh_start(const struct MachineSound *msound)
{
int i, j;
UINT32 shiftreg;
poly18 = (UINT32 *)auto_malloc((1ul << (18-5)) * sizeof(UINT32));
if( !poly18 )
return 1;
shiftreg = 0;
for( i = 0; i < (1ul << (18-5)); i++ )
{
UINT32 bits = 0;
for( j = 0; j < 32; j++ )
{
bits = (b... | false | false | false | false | false | 0 |
OnMessage(Message* msg) {
// Process our own messages and then pass others to the superclass
if (MSG_TIMEOUT == msg->message_id) {
LOG(LS_INFO) << "DTLS timeout expired";
#ifdef HAVE_DTLS
DTLSv1_handle_timeout(ssl_);
#endif
ContinueSSL();
} else {
StreamInterface::OnMessage(msg);
}
} | false | false | false | false | false | 0 |
nm_gconf_migrate_0_6_connections (GConfClient *client)
{
GSList *connections, *iter;
NMConnection *conn;
int n;
n = 1;
connections = gconf_client_all_dirs (client, GCONF_PATH_0_6_WIRELESS_NETWORKS, NULL);
for (iter = connections; iter; iter = iter->next) {
conn = nm_gconf_read_0_6_wireless_connection (client,... | false | false | false | false | false | 0 |
ndbuf_free(ndbuf_t *ndbuf)
{
Py_buffer *base = &ndbuf->base;
PyMem_XFree(ndbuf->data);
PyMem_XFree(base->format);
PyMem_XFree(base->shape);
PyMem_XFree(base->strides);
PyMem_XFree(base->suboffsets);
PyMem_Free(ndbuf);
} | false | false | false | false | false | 0 |
valloc(size_t size)
{
return __libc_memalign(sysconf(_SC_PAGESIZE), size);
} | false | false | false | false | false | 0 |
text(G_GNUC_UNUSED GMarkupParseContext *context,
const gchar *value,
G_GNUC_UNUSED gsize value_len,
gpointer user_data,
G_GNUC_UNUSED GError **error)
{
LextFile *lfile = (LextFile*)user_data;
const gchar *path = lfile->path->str;
gchar *val = g_strdup(value);
g_strstrip(val);
if... | false | false | false | false | false | 0 |
patchExternalJumps(TestCodeBlock *test_block, CodeBlockHeader *new_block) {
BasicBlock *patchers = test_block->patchers;
char *test_addr = (char*)(test_block + 1);
char *new_addr = (char*)(new_block + 1);
for(; patchers; patchers = patchers->u.patch.next) {
Instruction *target = patchers->start... | false | false | false | false | false | 0 |
raid_disks_show(struct mddev *mddev, char *page)
{
if (mddev->raid_disks == 0)
return 0;
if (mddev->reshape_position != MaxSector &&
mddev->delta_disks != 0)
return sprintf(page, "%d (%d)\n", mddev->raid_disks,
mddev->raid_disks - mddev->delta_disks);
return sprintf(page, "%d\n", mddev->raid_disks... | false | false | false | false | false | 0 |
lpfc_sli4_fcf_pri_list_add(struct lpfc_hba *phba,
uint16_t fcf_index,
struct fcf_record *new_fcf_record)
{
uint16_t current_fcf_pri;
uint16_t last_index;
struct lpfc_fcf_pri *fcf_pri;
struct lpfc_fcf_pri *next_fcf_pri;
struct lpfc_fcf_pri *new_fcf_pri;
int ret;
new_fcf_pri = &phba->fcf.fcf_pri[fcf_index];
lp... | false | false | false | false | false | 0 |
cm_MeanMatchRelativeEntropyHMM(const CM_t *cm)
{
int v;
double KL = 0.;
float left_e[cm->abc->K];
float right_e[cm->abc->K];
int i,j;
for (v = 0; v < cm->M; v++) {
if(cm->stid[v] == MATP_MP) {
/* calculate marginals */
/* left half */
esl_vec_FSet(left_e, cm->abc->K, 0.);
for(i = 0; i < cm... | false | false | false | false | false | 0 |
readSubFolders( mail::callback::folderList &callback1,
mail::callback &callback2) const
{
if (isDestroyed(callback2))
return;
if (path.size() == 0)
{
mboxAccount.readTopLevelFolders(callback1, callback2);
return;
}
vector<folder *> folderList;
vector<folder *>::iterator b, e;
DIR *dirp=opendir(pa... | false | false | false | false | false | 0 |
restore_view_position(struct view *view)
{
if (!view->p_restore || (view->pipe && view->lines <= view->p_lineno))
return FALSE;
/* Changing the view position cancels the restoring. */
/* FIXME: Changing back to the first line is not detected. */
if (view->offset != 0 || view->lineno != 0) {
view->p_restore = F... | false | false | false | false | false | 0 |
mdb_crack_row4(MdbHandle *mdb, int row_start, int row_end, unsigned int bitmask_sz, unsigned int row_var_cols, unsigned int *var_col_offsets)
{
unsigned int i;
for (i=0; i<row_var_cols+1; i++) {
var_col_offsets[i] = mdb_get_int16(mdb->pg_buf,
row_end - bitmask_sz - 3 - (i*2));
}
} | false | false | false | false | false | 0 |
prepend_options_from_env(int *p_argc, char **orig_argv)
{
const char *p, *env = getenv("MODPROBE_OPTIONS");
char **new_argv, *str_start, *str_end, *str, *s, *quote;
int i, argc = *p_argc;
size_t envlen, space_count = 0;
if (env == NULL)
return orig_argv;
for (p = env; *p != '\0'; p++) {
if (*p == ' ')
sp... | false | false | false | false | false | 0 |
zpj_goa_authorizer_process_call (ZpjAuthorizer *iface, ZpjAuthorizationDomain *domain, RestProxyCall *call)
{
ZpjGoaAuthorizer *self = ZPJ_GOA_AUTHORIZER (iface);
ZpjGoaAuthorizerPrivate *priv = self->priv;
g_mutex_lock (&priv->mutex);
if (priv->access_token != NULL)
rest_proxy_call_add_param (call, "acce... | false | false | false | false | false | 0 |
FreeAuthenticationData(int count, FIceAuthDataEntry *authDataEntries)
{
/* Each transport has entries for ICE and XSMP */
char command[256];
int i;
if (!SessionSupport)
{
return;
}
for (i = 0; i < count * 2; i++)
{
free(authDataEntries[i].network_id);
free(authDataEntries[i].auth_data);
}
free ((cha... | true | true | false | false | true | 1 |
LoadGroupFromDB(Field* fields)
{
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// result = CharacterDatabase.Query("SELECT mainTank, mainAss... | false | false | false | false | false | 0 |
job_might_be_tight_parallel(const lListElem *job, const lList *pe_list)
{
bool ret = false;
const char *pe_name = NULL;
DENTER(TOP_LAYER, "job_might_be_tight_parallel");
pe_name = lGetString(job, JB_pe);
if (pe_name != NULL) {
lListElem *pe;
for_each(pe, pe_list) {
if (pe_is_match... | false | false | false | false | false | 0 |
WorldBound() const {
BBox worldBounds;
for (int i = 0; i < nverts; i++)
worldBounds = Union(worldBounds, p[i]);
return worldBounds;
} | false | false | false | false | false | 0 |
shm_toc_lookup(shm_toc *toc, uint64 key)
{
uint64 nentry;
uint64 i;
/* Read the number of entries before we examine any entry. */
nentry = toc->toc_nentry;
pg_read_barrier();
/* Now search for a matching entry. */
for (i = 0; i < nentry; ++i)
if (toc->toc_entry[i].key == key)
return ((char *) toc) + toc... | false | false | false | false | false | 0 |
setColor( const QColor &color )
{
switch ( d_data->style )
{
case QwtSymbol::Ellipse:
case QwtSymbol::Rect:
case QwtSymbol::Diamond:
case QwtSymbol::Triangle:
case QwtSymbol::UTriangle:
case QwtSymbol::DTriangle:
case QwtSymbol::RTriangle:
case Qwt... | false | false | false | false | false | 0 |
ompcbe_write_critical(csbe_context *cx,
char *lock_name,
char *shared_name)
{
if (!opt_lock_by_lib) {
csbe_printf(cx, "#pragma omp critical (");
ompcbe_ddsche_write_lock_name(cx, shared_name, lock_name);
csbe_printf(cx, ")\n{\n");
} else {
... | false | false | false | false | false | 0 |
printCPSIFlag(const MCInst *MI, unsigned OpNum,
const MCSubtargetInfo &STI, raw_ostream &O) {
const MCOperand &Op = MI->getOperand(OpNum);
unsigned IFlags = Op.getImm();
for (int i = 2; i >= 0; --i)
if (IFlags & (1 << i))
O << ARM_PROC::IFlagsToString(1 << i);
if (I... | false | false | false | false | false | 0 |
gimpact_vs_shape(btCollisionObject * body0,
btCollisionObject * body1,
btGImpactShapeInterface * shape0,
btCollisionShape * shape1,bool swapped)
{
if(shape0->getGImpactShapeType()==CONST_GIMPACT_TRIMESH_SHAPE)
{
btGImpactMeshShape * meshshape0 = static_cast<btGImpactMeshShape *>(shape0);
int& pa... | false | false | false | false | false | 0 |
main(void)
{
int i = 0, k, errs = 0;
const char *path;
efreet_init();
for (k = 0; k < LOOPS; k++)
{
for (i = 0; icons[i]; i++)
{
path = efreet_icon_path_find(THEME, icons[i], SIZE);
if (!path)
{
printf("%s: NOT FOUND\n", icons[i... | false | false | false | false | false | 0 |
infd_directory_send_welcome_message(InfdDirectory* directory,
InfXmlConnection* connection)
{
InfdDirectoryPrivate* priv;
xmlNodePtr xml;
xmlNodePtr plugins;
xmlNodePtr child;
GHashTableIter iter;
gpointer value;
const InfdNotePlugin* plugin;
InfdDirectoryConnectionIn... | false | false | false | false | false | 0 |
sdma_select_engine_vl(
struct hfi1_devdata *dd,
u32 selector,
u8 vl)
{
struct sdma_vl_map *m;
struct sdma_map_elem *e;
struct sdma_engine *rval;
if (WARN_ON(vl > 8))
return NULL;
rcu_read_lock();
m = rcu_dereference(dd->sdma_map);
if (unlikely(!m)) {
rcu_read_unlock();
return NULL;
}
e = m->map[vl &... | false | false | false | false | false | 0 |
GetLength() const
{
return m_autoClosed ? m_size : m_file.GetLength();
} | false | false | false | false | false | 0 |
find_field_for_modification (DBusHeader *header,
int field,
DBusTypeReader *reader,
DBusTypeReader *realign_root)
{
dbus_bool_t retval;
retval = FALSE;
_dbus_type_reader_init (realign_root,
... | false | false | false | false | false | 0 |
_import_cb_edje_cc_exit(void *data, __UNUSED__ int type, void *event)
{
E_Import_Config_Dialog *import;
Ecore_Exe_Event_Del *ev;
int r = 1;
ev = event;
import = data;
if (ecore_exe_data_get(ev->exe) != import) return ECORE_CALLBACK_PASS_ON;
if (ev->exit_code != 0)
{
e_util_dialog_sho... | false | false | false | false | false | 0 |
cdf_read_long_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, cdf_secid_t sid, size_t len, cdf_stream_t *scn)
{
size_t ss = CDF_SEC_SIZE(h), i, j;
ssize_t nr;
scn->sst_len = cdf_count_chain(sat, sid, ss);
scn->sst_dirlen = len;
if (scn->sst_len == (size_t)-1)
return -1;
s... | false | false | false | false | true | 1 |
auok190x_power(struct auok190xfb_par *par, bool on)
{
struct auok190x_board *board = par->board;
int ret;
if (on) {
/* We should maintain POWER up for at least 80ms before set
* RST_N and SLP_N to high (TCON spec 20100803_v35 p59)
*/
ret = regulator_enable(par->regulator);
if (ret)
return ret;
msl... | false | false | false | false | false | 0 |
Push(unsigned int itemnum)
{
if( Path.size() % 2 == 1 )
{
Path.push_back( itemnum );
return true;
}
return false;
} | false | false | false | false | false | 0 |
ssb_pci_sprom_get(struct ssb_bus *bus,
struct ssb_sprom *sprom)
{
int err;
u16 *buf;
if (!ssb_is_sprom_available(bus)) {
ssb_err("No SPROM available!\n");
return -ENODEV;
}
if (bus->chipco.dev) { /* can be unavailable! */
/*
* get SPROM offset: SSB_SPROM_BASE1 except for
* chipcommon rev >= 31... | false | false | false | false | false | 0 |
stempcmp2(t1, t2)
struct sorttemp *t1, *t2;
{
int diff;
diff = strcmp(t1->ac, t2->ac);
if (diff != 0 ) return(diff);
else return(t1->rank - t2->rank);
} | false | false | false | false | false | 0 |
vidioc_s_fmt_vid_overlay(struct file *file, void *__fh, struct v4l2_format *f)
{
struct saa7146_fh *fh = __fh;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
int err;
DEB_EE("V4L2_BUF_TYPE_VIDEO_OVERLAY: dev:%p, fh:%p\n", dev, fh);
err = vidioc_try_fmt_vid_overlay(file, fh, f);
if (0 !... | false | false | false | false | false | 0 |
MinMaxBox(Field f, float *min, float *max)
{
float box[24], *b, fuzz;
int i, j;
if (! DXBoundingBox((Object)f, (Point *)box))
return ERROR;
min[0] = min[1] = min[2] = DXD_MAX_FLOAT;
max[0] = max[1] = max[2] = -DXD_MAX_FLOAT;
b = box;
for (i = 0; i < 8; i++)
for (j = 0; j < 3; j++, b+... | false | false | false | false | false | 0 |
frame_fuzzy_find(mpg123_handle *fr, off_t want_frame, off_t* get_frame)
{
/* Default is to go to the beginning. */
off_t ret = fr->audio_start;
*get_frame = 0;
/* But we try to find something better. */
/* Xing VBR TOC works with relative positions, both in terms of audio frames and stream bytes.
Thus, it onl... | 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.