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 |
|---|---|---|---|---|---|---|
namedmutex_create (WapiSecurityAttributes *security G_GNUC_UNUSED, gboolean owned,
const gunichar2 *name)
{
struct _WapiHandle_namedmutex namedmutex_handle = {{{0}}, 0};
gpointer handle;
gchar *utf8_name;
int thr_ret;
gpointer ret = NULL;
guint32 namelen;
gint32 offset;
/* w32 seems to guarantee that openin... | false | true | false | false | false | 1 |
LI16()
{ VMB14 VMS14 VMV14
goto TTL;
TTL:;
base[0]= Ct;
base[1]= ((object)VV[145]);
if(((((object)VV[146])->s.s_dbind))!=Cnil){
goto T834;}
base[2]= small_fixnum(0);
goto T832;
goto T834;
T834:;
if(((((object)VV[147])->s.s_dbind))!=Cnil){
goto T837;}
base[2]= small_fixnum(1);
goto T832;
goto T837;
T837:;... | false | false | false | false | false | 0 |
is_signal(char* name)
{
if (!name) {
fprintf(stderr,"is_signal: no name\n");
exit(1);
}
/*if doesn't exist hash table, init*/
if (!HTABLE) init_signals();
return searchauthelem(HTABLE,name) != NULL;
} | false | false | false | false | false | 0 |
_bit_set( char *pattern, int bit ) {
int major, minor;
major = bit/8;
minor = bit%8;
if ( pattern[major] & _bits[minor] ) {
return 1; /* Specified bit is set */
}
return 0; /* Bit not set */
} | false | false | false | false | false | 0 |
send(Protocol *protocol, String *str_arg)
{
if (result_field)
{
check(1);
update();
return protocol->store(result_field);
}
return Item::send(protocol, str_arg);
} | false | false | false | false | false | 0 |
gst_play_bin_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstPlayBin *playbin = GST_PLAY_BIN (object);
switch (prop_id) {
case PROP_URI:
gst_play_bin_set_uri (playbin, g_value_get_string (value));
break;
case PROP_SUBURI:
gst_play_bin_set_... | false | false | false | false | false | 0 |
AddProjectDependency(cbProject* base, cbProject* dependsOn)
{
if (!base || !dependsOn)
return false;
// avoid circular dependencies
if ( CausesCircularDependency(base, dependsOn) )
return false;
ProjectsArray* arr = nullptr;
DepsMap::iterator it = m_ProjectDeps.find(base);
if (... | false | false | false | false | false | 0 |
util_normalise_uri(const char *uri) {
char *path;
if(uri[0] != '/')
return NULL;
path = util_url_unescape(uri);
if(path == NULL) {
WARN1("Error decoding URI: %s\n", uri);
return NULL;
}
/* We now have a full URI-decoded path. Check it for allowability */
if(verify... | false | false | false | false | false | 0 |
handleFakeSocket( FakeSocket * data )
{
//_server->copyData( (AttalSocket*) data );
handleSocket( _defendPlayer, data->getData() );
} | false | false | false | false | false | 0 |
setSelection(const QString& url)
{
// kDebug(kfile_area) << "setSelection " << url;
if (url.isEmpty()) {
return;
}
KUrl u = d->getCompleteUrl(url);
if (!u.isValid()) { // if it still is
kWarning() << url << " is not a correct argument for setSelection!";
return;
}
... | false | false | false | false | false | 0 |
scale_pixel( int *weights, int n_x, int n_y,
u32 *dst, u32 **src, int x, int sw )
{
u32 r = 0, g = 0, b = 0, a = 0;
int i, j;
for (i = 0; i < n_y; i++) {
int *pixel_weights = weights + n_x * i;
for (j = 0; j < n_x; j++) {
u32 ta;
... | false | false | false | false | false | 0 |
ay_msn_login(eb_local_account *account)
{
ay_msn_local_account *mlad;
char buff[1024];
if (account->connected || account->connecting) {
eb_debug(DBG_MSN,
"called while already logged or logging in\n");
return;
}
account->connecting = 1;
account->connected = 0;
mlad = (ay_msn_local_account *)account->pro... | false | false | false | false | false | 0 |
watch_info_free(void *data)
{
struct watch_info *info = data;
if (info->id > 0) {
g_source_remove(info->id);
info->id = 0;
}
dbus_connection_unref(info->conn);
g_free(info);
} | false | false | false | false | false | 0 |
gf_modules_close_interface(GF_BaseInterface *ifce)
{
ModuleInstance *par;
s32 i;
if (!ifce) return GF_BAD_PARAM;
par = (ModuleInstance *) ifce->HPLUG;
if (!par || !ifce->InterfaceType) return GF_BAD_PARAM;
i = gf_list_find(par->plugman->plug_list, par);
if (i<0) return GF_BAD_PARAM;
i = gf_list_find(par->int... | false | false | false | false | false | 0 |
just_end_it_now(void * ignore)
{
if (ending) return;
ending=1;
if (libafpclient->forced_ending_hook)
libafpclient->forced_ending_hook();
exit_program=2;
signal_main_thread();
} | false | false | false | false | false | 0 |
_Read (FILE *file,int swap)
{
DBInt id;
DBObjRecord *docRec;
if (DBObject::Read (file,swap) == DBFault) return (DBFault);
if (DocsPTR->Read (file,swap) == DBFault) return (DBFault);
for (id = 0;id < DocsPTR->ItemNum ();++id)
{
if (DocsPTR->ReadItem (file,id,swap) == DBFault) return (DBFault);
docRec = Do... | false | false | false | false | false | 0 |
isl_multi_aff_lift(__isl_take isl_multi_aff *maff,
__isl_give isl_local_space **ls)
{
int i;
isl_space *space;
unsigned n_div;
if (ls)
*ls = NULL;
if (!maff)
return NULL;
if (maff->n == 0) {
if (ls) {
isl_space *space = isl_multi_aff_get_domain_space(maff);
*ls = isl_local_space_from_space(space);... | false | false | false | false | false | 0 |
get_profile_path(string dir, string config_name) {
string path = dir + "/" + config_name + CONFIG_FILE_EXTENSION;
return path;
} | false | false | false | false | false | 0 |
Send_2_plot_(plot_t *p, char * fmt, ...)
{
char *buff;
int stringlength, allocatelength;
va_list args;
stringlength = strlen(fmt)*2;
allocatelength = (512 > stringlength) ? 512:stringlength;
buff = (char *)malloc(allocatelength); /* fmt string can be VERY long... */
im_va_start(args,fmt)... | false | false | false | false | false | 0 |
main(const char * szAppName, int argc, char ** argv)
{
// This is a static function.
#if !GLIB_CHECK_VERSION(2,32,0)
if (!g_thread_supported ())
g_thread_init (NULL);
#endif
// initialize our application.
int exit_status = 0;
AP_UnixApp * pMyUnixApp = new AP_UnixApp(szAppName);
#ifdef WITH_CHAMPLAIN
Cl... | false | false | false | false | false | 0 |
write_file() {
int i, j;
#ifndef _USING_FCGI_
FILE* f = fopen(HR_INFO_FILENAME, "w");
#else
FCGI_FILE* f = FCGI::fopen(HR_INFO_FILENAME, "w");
#endif
if (!f) return ERR_FOPEN;
for (i=1; i<HR_NTYPES; i++) {
fprintf(f, "--------- %s ----------\n", hr_names[i]);
for (j=0; j<hr_nclasse... | false | false | false | false | false | 0 |
meetAirEnumAllCheck(void) {
static const char me[]="meetAirEnumAllCheck";
const airEnum **enm, *ee;
char err[AIR_STRLEN_LARGE];
unsigned int ei;
airArray *mop;
mop = airMopNew();
enm = meetAirEnumAll();
airMopAdd(mop, (void*)enm, airFree, airMopAlways);
ei = 0;
while ((ee = enm[ei])) {
/* fprin... | true | true | false | false | false | 1 |
myri10ge_remove(struct pci_dev *pdev)
{
struct myri10ge_priv *mgp;
struct net_device *netdev;
mgp = pci_get_drvdata(pdev);
if (mgp == NULL)
return;
cancel_work_sync(&mgp->watchdog_work);
netdev = mgp->dev;
unregister_netdev(netdev);
#ifdef CONFIG_MYRI10GE_DCA
myri10ge_teardown_dca(mgp);
#endif
myri10ge_du... | false | false | false | false | false | 0 |
make_utc_date_string(struct tm *tm)
{
int st;
char *buf;
if (tm == NULL) {
time_t now;
time(&now);
tm = gmtime(&now);
}
buf = (char *) malloc(64);
st = strftime(buf, 64, "%a, %d-%b-%Y %H:%M:%S GMT", tm);
if (st == 0 || st == 64) {
/* XXX */
/* ?? Return an expired date. */
return("Mon, 1-Jan-2001... | false | false | false | false | false | 0 |
check_if_not_interactive() {
char *ev;
if ((ev = getenv("ARGYLL_NOT_INTERACTIVE")) != NULL) {
not_interactive = 1;
cr_char = '\n';
} else {
not_interactive = 0;
cr_char = '\r';
}
} | false | false | false | false | true | 1 |
GEOSGeomFromHEX_buf_r(GEOSContextHandle_t extHandle, const unsigned char *hex, size_t size)
{
if ( 0 == extHandle )
{
return NULL;
}
GEOSContextHandleInternal_t *handle = 0;
handle = reinterpret_cast<GEOSContextHandleInternal_t*>(extHandle);
if ( 0 == handle->initialized )
{
... | false | false | false | false | false | 0 |
add_unixpath (struct sockaddr **saddrs, socklen_t * saddrlens,
const char *unixpath)
{
#ifdef AF_UNIX
struct sockaddr_un *un;
size_t slen;
un = GNUNET_malloc (sizeof (struct sockaddr_un));
un->sun_family = AF_UNIX;
slen = strlen (unixpath) + 1;
if (slen >= sizeof (un->sun_path))
slen = si... | false | false | false | false | false | 0 |
tsl2563_write_thresh(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan, enum iio_event_type type,
enum iio_event_direction dir, enum iio_event_info info, int val,
int val2)
{
struct tsl2563_chip *chip = iio_priv(indio_dev);
int ret;
u8 address;
if (dir == IIO_EV_DIR_RISING)
address = TSL2563_REG_HIG... | false | false | false | false | false | 0 |
tuple_set_str (Tuple * tuple, int nfield, const char * field, const char * str)
{
if (! str)
{
tuple_unset (tuple, nfield, field);
return;
}
if (! g_utf8_validate (str, -1, NULL))
{
fprintf (stderr, "Invalid UTF-8: %s\n", str);
return;
}
if (nfield < 0)
... | false | false | false | false | false | 0 |
explain_buffer_eloop(explain_string_buffer_t *sb, const char *pathname,
const char *pathname_caption, const explain_final_t *final_component)
{
if
(
explain_buffer_errno_path_resolution
(
sb,
ELOOP,
pathname,
pathname_caption,
final... | false | false | false | false | false | 0 |
adns__search_next(adns_state ads, adns_query qu, struct timeval now) {
const char *nextentry;
adns_status stat;
if (qu->search_doneabs<0) {
nextentry= 0;
qu->search_doneabs= 1;
} else {
if (qu->search_pos >= ads->nsearchlist) {
if (qu->search_doneabs) {
qu->search_vb.used= qu->search_origl... | false | false | false | false | false | 0 |
I_write_ref_points(FILE * fd, struct Ortho_Photo_Points *cp)
{
int i;
fprintf(fd, "# %7s %15s %15s %15s %9s status\n", "", "image", "", "photo",
"");
fprintf(fd, "# %15s %15s %15s %15s (1=ok)\n", "east", "north", "x",
"y");
fprintf(fd, "#\n");
for (i = 0; i < cp->count; i++)
if (cp->st... | false | false | false | false | false | 0 |
TaskCount()
{
int count=0;
for(SMTask *scan=chain; scan; scan=scan->next)
count++;
return count;
} | false | false | false | false | false | 0 |
log_alter(log_options_t opt, log_facility_t fac, char *logfile)
{
int rc = 0;
slurm_mutex_lock(&log_lock);
rc = _log_init(NULL, opt, fac, logfile);
slurm_mutex_unlock(&log_lock);
log_set_debug_flags();
return rc;
} | false | false | false | false | false | 0 |
__remove_rbio_from_cache(struct btrfs_raid_bio *rbio)
{
int bucket = rbio_bucket(rbio);
struct btrfs_stripe_hash_table *table;
struct btrfs_stripe_hash *h;
int freeit = 0;
/*
* check the bit again under the hash table lock.
*/
if (!test_bit(RBIO_CACHE_BIT, &rbio->flags))
return;
table = rbio->fs_info->st... | false | false | false | false | false | 0 |
Trspi_LoadBlob_UINT64(UINT64 *offset, UINT64 in, BYTE *blob)
{
if (blob)
UINT64ToArray(in, &blob[*offset]);
(*offset) += sizeof(UINT64);
} | false | false | false | false | false | 0 |
computeNodePlacement(NodeToValueMap &Loc) {
// Compute the inverse of the Node.Parent links. Also, collect the set
// of root nodes.
NodeChildrenMap NCM;
NodeVect Roots;
invert_find_roots(Nodes, NCM, Roots);
// Compute the initial placement determined by the users' locations, and
// the locations of the ... | false | false | false | false | false | 0 |
outputTypeToString(const TypePtr& type, bool useWstring, const StringList& metaData)
{
static const char* outputBuiltinTable[] =
{
"::Ice::Byte&",
"bool&",
"::Ice::Short&",
"::Ice::Int&",
"::Ice::Long&",
"::Ice::Float&",
"::Ice::Double&",
"::std::s... | false | false | false | false | false | 0 |
kcm_remove_event(krb5_context context,
kcm_event *event)
{
krb5_error_code ret;
kcm_event **e;
int found = 0;
log_event(event, "removing");
HEIMDAL_MUTEX_lock(&events_mutex);
for (e = &events_head; *e != NULL; e = &(*e)->next) {
if (event == *e) {
*e = event->next;
found++;
... | false | false | false | false | false | 0 |
unit_foodbox_cost(struct unit *punit)
{
int cost = 30;
if (punit->id == 0) {
/* It is a virtual unit, so must start in a city... */
struct city *pcity = tile_city(unit_tile(punit));
/* The default is to lose 100%. The growth bonus reduces this. */
int foodloss_pct = 100 - get_city_bonus(pcity, EF... | false | false | false | false | false | 0 |
addFinalStateShower(PPtr p, StepPtr s) {
if(p->children().empty()) return;
ParticleVector::const_iterator child;
for(child=p->children().begin(); child != p->children().end(); ++child) {
updateColour(*child);
s->addDecayProduct(*child);
addFinalStateShower(*child,s);
}
} | false | false | false | false | false | 0 |
readProperties(ConfigProps &props) const
{
BOOST_FOREACH(const StringPair &prop, m_props) {
props.insert(ConfigProps::value_type(prop.first, InitStateString(prop.second, true)));
}
} | false | false | false | false | false | 0 |
do_ibox_acl_check(const char *path, const char *subject, int flags, int follow_links)
{
char dirname[PFS_PATH_MAX];
if(!isdir(path))
string_dirname(path, dirname);
else
strcpy(dirname,path);
return ibox_acl_check_dir(dirname, subject, flags);
} | true | true | false | false | false | 1 |
mdrv_tms9928a(struct InternalMachineDriver *machine, const TMS9928a_interface *intf)
{
int top_border = ((intf->model == TMS9929) || (intf->model == TMS9929A)) ? TOP_BORDER_50HZ : TOP_BORDER_60HZ;
int bottom_border = ((intf->model == TMS9929) || (intf->model == TMS9929A)) ? BOTTOM_BORDER_50HZ : BOTTOM_BORDER_60HZ;... | false | false | false | false | false | 0 |
send_data_ddx(DDS & dds, ConstraintEvaluator & eval,
ostream & data_stream, const string &start,
const string &boundary, const string & anc_location,
bool with_mime_headers) const
{
// If this is a conditional request and the server should send a 304... | false | false | false | false | false | 0 |
fli_draw_text_inside( int align,
FL_Coord x,
FL_Coord y,
FL_Coord w,
FL_Coord h,
const char * istr,
int style,
int size,
... | false | false | false | false | false | 0 |
slotGameVarUp()
{
if(!game().isMainline())
{
while(!game().atLineStart())
{
game().backward();
}
MoveId currentVar = game().currentMove();
game().backward();
int n = game().variations().indexOf(currentVar) - 1;
if(n >= 0)
{
... | false | false | false | false | false | 0 |
format_insn_note(x86_insn_t *insn, char *buf, int len){
char note[32] = {0};
int len_orig = len, note_len = 32;
if ( insn->note & insn_note_ring0 ) {
STRNCATF( note, "%s", "Ring0 ", note_len );
}
if ( insn->note & insn_note_smm ) {
STRNCATF( note, "%s", "SMM ", note_len );
}
if ( insn->note & ... | false | false | false | false | false | 0 |
igb_sriov_reinit(struct pci_dev *dev)
{
struct net_device *netdev = pci_get_drvdata(dev);
struct igb_adapter *adapter = netdev_priv(netdev);
struct pci_dev *pdev = adapter->pdev;
rtnl_lock();
if (netif_running(netdev))
igb_close(netdev);
else
igb_reset(adapter);
igb_clear_interrupt_scheme(adapter);
igb_... | false | false | false | false | false | 0 |
save_new_message(MsgInfo *oldmsg, MsgInfo *newmsg, MimeInfo *info,
gboolean has_attachment)
{
MsgInfo *finalmsg;
FolderItem *item = oldmsg->folder;
MsgFlags flags = {0, 0};
gint msgnum = -1;
finalmsg = procmsg_msginfo_new_from_mimeinfo(newmsg, info);
if (!finalmsg) {
procmsg_msginfo_free(newmsg);
return... | false | false | false | false | false | 0 |
fill_values_if_necessary(DbTreeModel& model, int row)
{
//std::cout << "debug: " << G_STRFUNC << ": row=" << row << std::endl;
//if(row == 1000)
//{
// std::cout << "1000" << std::endl;
//}
if(m_values_retrieved)
{
//std::cout << "debug: " << G_STRFUNC << ": already retrieved" << std::endl;
}
e... | false | false | false | false | false | 0 |
msgActionWarning(QAction *newAction, int k, QAction *oldAction)
{
Q_ASSERT(newAction);
Q_ASSERT(oldAction);
QString msg;
QTextStream str(&msg);
str << "addOverrideAction " << newAction->objectName() << '/' << newAction->text()
<< ": Action ";
if (oldAction)
str << oldAction->ob... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
/* code */
private_key *pvt_key;
public_key *pub_key;
private_key_mpz *pvt_key_mpz;
public_key_mpz *pub_key_mpz;
unsigned char * c_pvt_key;
unsigned char * c_pub_key;
unsigned char *c_pub_decoded;
unsigned char *c_pvt_decoded;
int key_len_pu = 0;
int key_len_pv = 0;
char *keyt... | false | true | false | false | true | 1 |
qxl_bo_move_notify(struct ttm_buffer_object *bo,
struct ttm_mem_reg *new_mem)
{
struct qxl_bo *qbo;
struct qxl_device *qdev;
if (!qxl_ttm_bo_is_qxl_bo(bo))
return;
qbo = container_of(bo, struct qxl_bo, tbo);
qdev = qbo->gem_base.dev->dev_private;
if (bo->mem.mem_type == TTM_PL_PRIV0 && qbo->surface_... | false | false | false | false | false | 0 |
getChildAtPosition(const Vector2& position) const
{
const ChildList::const_reverse_iterator end = d_drawList.rend();
Vector2 p;
// if the window has RenderingWindow backing
if (d_surface && d_surface->isRenderingWindow())
static_cast<RenderingWindow*>(d_surface)->unprojectPoint(position, p);
... | false | false | false | false | false | 0 |
get_current_directory() {
int buf_size = MAXPATHLEN;
while (NULL == getcwd(my_platform.cwd, buf_size)) {
if (EINVAL == errno) {
buf_size += MAXPATHLEN;
my_platform.cwd = (char *)realloc(my_platform.cwd, buf_size * sizeof(char));
continue;
}
... | false | false | false | false | false | 0 |
SetHandleDirection(double dir[3])
{
double *d = this->HandleDirection;
if ( d[0] != dir[0] || d[1] != dir[1] || d[2] != dir[2] )
{
double c[3], handle[3];
this->SphereSource->GetCenter(c);
handle[0] = c[0] + dir[0];
handle[1] = c[1] + dir[1];
handle[2] = c[2] + dir[2];
this->HandleSource... | false | false | false | false | false | 0 |
init_dependent_queue (q) DepQ *q; {
static Af_key nullkey;
if (q->dependent_queue_initialized) return TRUE;
if ((q->dependent_queue = (Af_key *)malloc (QUEUESIZE * sizeof (Af_key)))
== (Af_key *)NULL) {
stLog ("malloc", ST_LOG_ERROR);
return FALSE;
}
q->head = q->tail = q->dependent_queue;
*q... | false | false | false | false | false | 0 |
pseq_handler_create_sequences(struct pri_detector *pde,
u64 ts, u32 min_count)
{
struct pulse_elem *p;
list_for_each_entry(p, &pde->pulses, head) {
struct pri_sequence ps, *new_ps;
struct pulse_elem *p2;
u32 tmp_false_count;
u64 min_valid_ts;
u32 delta_ts = ts - p->ts;
if (delta_ts < pde->rs->pri_... | false | true | false | false | false | 1 |
createMissingClients(client c) {
int n = 0;
while(config.liveclients < config.numclients) {
createClient(c->obuf,sdslen(c->obuf));
/* Listen backlog is quite limited on most systems */
if (++n > 64) {
usleep(50000);
n = 0;
}
}
} | false | false | false | false | true | 1 |
create_submenu_entry (GtkWidget *menu,
GMenuTreeDirectory *directory)
{
GtkWidget *menuitem;
gboolean force_categories_icon;
force_categories_icon = g_object_get_data (G_OBJECT (menu),
"panel-menu-force-icon-for-categories") != NULL;
if (force_categories_icon)
menuitem = panel_image_... | false | false | false | false | false | 0 |
finishedPlaying( double playedFraction )
{
// playedFraction will nearly always be 1, because EngineController updates length
// just before calling finishedPlaying(). Mimic Last.fm scrobbling wrt min length
// requirement, tracks shorter than 30s are often ads etc.
if( length() < 30 * 1000 )
re... | false | false | false | false | false | 0 |
worship_forbids_use(object *op, object *exp_obj, uint32 flag, const char *string) {
if (QUERY_FLAG(&op->arch->clone, flag)) {
if (QUERY_FLAG(op, flag) != QUERY_FLAG(exp_obj, flag)) {
update_priest_flag(exp_obj, op, flag);
if (QUERY_FLAG(op, flag))
draw_ext_info_format... | false | false | false | false | false | 0 |
save_map(void)
{
char fname[2048];
find_file("levels.dat", MAP_DIR, fname, 0);
if (SaveShip(fname, TRUE, 0)) {
ErrorMessage(__FUNCTION__, "Saving ship file to %s failed, possibly because of permission issues. Saving your ship to %s instead.\n", NO_NEED_TO_INFORM, IS_WARNING_ONLY, MAP_DIR, our_config_dir);
alert_... | true | true | false | false | false | 1 |
dbdead(DBPROCESS * dbproc)
{
tdsdump_log(TDS_DBG_FUNC, "dbdead(%p) [%s]\n", dbproc, dbproc? IS_TDSDEAD(dbproc->tds_socket)? "dead":"alive" : "quite dead");
if( NULL == dbproc )
return TRUE;
if (IS_TDSDEAD(dbproc->tds_socket))
return TRUE;
else
return FALSE;
} | false | false | false | false | false | 0 |
isSamePosition( const Vector3& p0, const Vector3& p1 )
{
return (std::abs(p0.x - p1.x) <= mEpsilon && std::abs(p0.y - p1.y) <= mEpsilon && std::abs(p0.z - p1.z) <= mEpsilon);
} | false | false | false | false | false | 0 |
setUIMode(RunMode mode)
{
// update editor stuff. We want to do it first, since the callstack
// may try to restore our position in some cases
updateStoppedMark(mode);
if (mode == Running)
{
// Toggle buttons..
m_continueAct->setEnabled(false);
m_stepIntoAct->setEnabled(fals... | false | false | false | false | false | 0 |
git_refspec_dst_matches(const git_refspec *refspec, const char *refname)
{
if (refspec == NULL || refspec->dst == NULL)
return false;
return (p_fnmatch(refspec->dst, refname, 0) == 0);
} | false | false | false | false | false | 0 |
_dbus_babysitter_get_child_exited (DBusBabysitter *sitter)
{
/* Be sure we're up-to-date */
while (LIVE_CHILDREN (sitter) &&
babysitter_iteration (sitter, FALSE))
;
/* We will have exited the babysitter when the child has exited */
return sitter->socket_to_babysitter < 0;
} | false | false | false | false | false | 0 |
make_time(void) {
unsigned int size = 8;
char *buffer = (char *) malloc (size);
time_t t = time(NULL);
struct tm *thetime = localtime(&t);
while (1) {
/* try to print in the allocated space. */
int nchars = snprintf (buffer, size, "%.02d:%.02d:%.02d",
thetime->tm_hour, thet... | false | false | false | false | false | 0 |
__fop_remove_recover(env, dbtp, lsnp, op, info)
ENV *env;
DBT *dbtp;
DB_LSN *lsnp;
db_recops op;
void *info;
{
__fop_remove_args *argp;
int ret;
char *real_name;
COMPQUIET(info, NULL);
real_name = NULL;
REC_PRINT(__fop_remove_print);
REC_NOOP_INTRO(__fop_remove_read);
if ((ret = __db_appname(env, (APPNA... | false | false | false | false | false | 0 |
parse_tree()
{
struct rooted_tree *tree;
tree = malloc(sizeof(struct rooted_tree));
if(NULL == tree) {
newick_parser_status = PARSER_STATUS_MALLOC_ERROR;
return NULL;
}
nodes_in_order = create_llist();
if (NULL == nodes_in_order) {
newick_parser_status = PARSER_STATUS_MALLOC_ERROR;
return NULL;
}
/*... | false | false | false | false | false | 0 |
XLOGChooseNumBuffers(void)
{
int xbuffers;
xbuffers = NBuffers / 32;
if (xbuffers > XLOG_SEG_SIZE / XLOG_BLCKSZ)
xbuffers = XLOG_SEG_SIZE / XLOG_BLCKSZ;
if (xbuffers < 8)
xbuffers = 8;
return xbuffers;
} | false | false | false | false | false | 0 |
IDtoSTV(const UnicodeString& id,
UnicodeString& source,
UnicodeString& target,
UnicodeString& variant,
UBool& isSourcePresent) {
source = ANY;
target.truncate(0);
... | false | false | false | false | false | 0 |
mark_and_show_false_exon(GtFeatureNode *fn, bool exondiff)
{
gt_feature_node_mark(fn); /* mark false exons */
if (exondiff) {
gt_gff3_output_leading(fn, NULL);
printf(".\n");
}
} | false | false | false | false | false | 0 |
addritem_folder_remove_person( ItemFolder *group, ItemPerson *person ) {
if( group && person ) {
GList *node = group->listPerson;
while( node ) {
if( node->data == person ) {
group->listPerson = g_list_remove( group->listPerson, person );
return person;
}
node = g_list_next( node );
}
}
return... | false | false | false | false | false | 0 |
mk_str_from_list(element *list, bool extra_newline) {
element *result;
GString *c = concat_string_list(reverse(list));
if (extra_newline)
g_string_append(c, "\n");
result = mk_element(STR);
result->contents.str = c->str;
g_string_free(c, false);
return result;
} | false | false | false | false | false | 0 |
sd_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct gspca_dev *gspca_dev =
container_of(ctrl->handler, struct gspca_dev, ctrl_handler);
gspca_dev->usb_err = 0;
if (!gspca_dev->streaming)
return 0;
switch (ctrl->id) {
case V4L2_CID_EXPOSURE:
setexposure(gspca_dev, ctrl->val);
break;
case V4L2_CID_GAIN:
setgain... | false | false | false | false | false | 0 |
fourxm_probe(AVProbeData *p)
{
if ((AV_RL32(&p->buf[0]) != RIFF_TAG) ||
(AV_RL32(&p->buf[8]) != FOURXMV_TAG))
return 0;
return AVPROBE_SCORE_MAX;
} | false | false | false | false | false | 0 |
vt_add_intermediate(struct cpssp *cpssp, unsigned char ch)
{
if (cpssp->escs.inter[0] == 0) {
cpssp->escs.inter[0] = ch;
return;
}
if (cpssp->escs.inter[1] == 0) {
cpssp->escs.inter[1] = ch;
return;
}
/* if we've not returned until now, ignore character */
} | false | false | false | false | false | 0 |
Generate(AsmCode& asm_code)
{
ObtainLabels(asm_code);
asm_code.AddLabel(continue_label);
condition->GenerateValue(asm_code);
asm_code.AddCmd(ASM_POP, REG_EAX);
asm_code.AddCmd(ASM_TEST, REG_EAX, REG_EAX);
asm_code.AddCmd(ASM_JZ, break_label, SIZE_NONE);
body->Generate(asm_code);
asm_code... | false | false | false | false | false | 0 |
free_html_tbl(htmltbl_t * tbl)
{
htmlcell_t **cells;
if (tbl->rc == -1) {
dtclose(tbl->u.p.rows);
} else {
cells = tbl->u.n.cells;
free(tbl->heights);
free(tbl->widths);
while (*cells) {
free_html_cell(*cells);
cells++;
}
free(tbl->u.n.cells);
}
free_html_data(&tbl->data);
fre... | false | false | false | false | false | 0 |
autohelperowl_attackpat221(int trans, int move, int color, int action)
{
int a, b, C;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(721, trans, move);
b = AFFINE_TRANSFORM(683, trans, move);
C = AFFINE_TRANSFORM(720, trans, move);
return owl_escape_value(C)>0 && play_attack_defend2_n(OTHER_COLOR(c... | false | false | false | false | false | 0 |
NSS_CMSSignerInfo_AddMSSMIMEEncKeyPrefs(NSSCMSSignerInfo *signerinfo, CERTCertificate *cert, CERTCertDBHandle *certdb)
{
NSSCMSAttribute *attr;
SECItem *smimeekp = NULL;
void *mark;
PLArenaPool *poolp;
/* verify this cert for encryption */
if (CERT_VerifyCert(certdb, cert, PR_TRUE, certUsageEma... | false | false | false | false | false | 0 |
H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
unsigned H5_ATTR_UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_cvt_t *udata = (H5O_iter_cvt_t *)_udata; /* Operator user data */
H5A_t *attr = (H5A_t *)mesg->native; /* Pointer to attribute to insert */
her... | false | false | false | false | false | 0 |
towers_get_render (Pos *pos, byte *move, int **rmovp)
{
static int rmove[512];
int *rp = rmove;
int i, j;
for (i=0; i<board_wid; i++)
for (j=0; j<board_heit; j++)
if (pos->render[j * board_wid + i] != RENDER_NONE)
{
*rp++ = i;
*rp++ = j;
*rp++ = RENDER_NONE;
}
*rp++ = -1;
*rmovp = rmove;
} | false | false | false | false | false | 0 |
details_button_remove_artwork_clicked(GtkButton *button) {
g_return_if_fail (details_view);
g_return_if_fail (details_view->track);
if (details_writethrough()) { /* Remove thumbnail on all tracks */
GList *gl;
for (gl = details_view->tracks; gl; gl = gl->next) {
ExtraTrackData *... | false | false | false | false | false | 0 |
operator()(instruction_operand op) {
code_block* compiled = op.compiled;
cell old_offset =
op.rel_offset() + (cell)compiled->entry_point() - fixup.code_offset;
switch (op.rel_type()) {
case RT_LITERAL: {
cell value = op.load_value(old_offset);
if (immediate_p(value))
... | false | false | false | false | false | 0 |
gee_traversable_base_init (GeeTraversableIface * iface) {
static gboolean initialized = FALSE;
if (!initialized) {
initialized = TRUE;
iface->stream = gee_traversable_real_stream;
iface->fold = gee_traversable_real_fold;
iface->map = gee_traversable_real_map;
iface->scan = gee_traversable_real_scan;
iface... | false | false | false | false | false | 0 |
DXImportDX(char *filename, char **namelist,
int *start, int *end, int *delta)
{
struct finfo f;
Object o = NULL;
char needfree = 1;
int rc;
/* setup finfo struct
*/
/* clear struct to be sure all pointers are NULL, and set stuff which
* we know the value of now. then call... | false | false | false | false | false | 0 |
CheckWorking()
{
bool working(false);
for( unsigned int i = 0; i < m_device_count; ++i) {
if( m_threads[i]->Working() ) {
working = true;
break;
}
}
if( working ) {
Gtk::MessageDialog dialog(*this, _("One or more devices are working, disconnecting now may cause data corruption. Proceed anyway?"),
fa... | false | false | false | false | false | 0 |
reuse_conn(struct connectdata *old_conn,
struct connectdata *conn)
{
if(old_conn->proxy.rawalloc)
free(old_conn->proxy.rawalloc);
/* free the SSL config struct from this connection struct as this was
allocated in vain and is targeted for destruction */
Curl_free_ssl_config(&old_co... | false | false | false | false | false | 0 |
convertText(const QString & line) {
QStringList fs = splitLine(line);
if (fs.count() < 8) {
DebugDialog::debug("bad text " + line);
return "";
}
return convertField(fs[2], fs[3], fs[4], fs[1], "C", "C", fs[8]);
} | false | false | false | false | false | 0 |
close(void)
{
if (io_mode() != AUDIO_IO::io_read)
write_ewf_data();
AUDIO_SEQUENCER_BASE::close();
} | false | false | false | false | false | 0 |
RgetMaxVal(
const MAP *map, /* map handle */
void *maxVal) /* write-only. Maximum value or missing value */
{
/* use buffer that can hold largest
* cell representation
*/
CSF_VAR_TYPE buf_1;
void *buf = (void *)(&buf_1);
CHECKHANDLE(map);
CsfGetVarType(buf, &(map->raster.maxVal), RgetCellRepr(map));
ma... | false | false | false | false | false | 0 |
skip_spaces(struct dsa *dsa, int across)
{ while (dsa->c == ' ' || (across && dsa->c == '\n'))
if (get_char(dsa)) return 1;
return 0;
} | false | false | false | false | false | 0 |
tp_base_contact_list_authorize_publication_async (TpBaseContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
{
TpMutableContactListInterface *mutable_iface;
mutable_iface = TP_MUTABLE_CONTACT_LIST_GET_INTERFACE (self);
g_return_if_fail (mutable_iface != NULL);
... | false | false | false | false | false | 0 |
_gcry_check_version (const char *req_version)
{
const char *ver = VERSION;
int my_major, my_minor, my_micro;
int rq_major, rq_minor, rq_micro;
const char *my_plvl;
if (req_version && req_version[0] == 1 && req_version[1] == 1)
return _gcry_compat_identification ();
/* Initialize librar... | false | false | false | false | false | 0 |
brasero_metadata_completed (BraseroMetadata *self)
{
BraseroMetadataPrivate *priv;
priv = BRASERO_METADATA_PRIVATE (self);
if (priv->error) {
BRASERO_UTILS_LOG ("Operation completed with an error %s", priv->error->message);
}
/* See if we have missing plugins */
if (priv->missing_plugins) {
if (brasero_met... | false | false | false | false | false | 0 |
ufx_is_valid_mode(struct fb_videomode *mode,
struct fb_info *info)
{
if ((mode->xres * mode->yres) > (2048 * 1152)) {
pr_debug("%dx%d too many pixels",
mode->xres, mode->yres);
return 0;
}
if (mode->pixclock < 5000) {
pr_debug("%dx%d %dps pixel clock too fast",
mode->xres, mode->yres, mode... | 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.