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 |
|---|---|---|---|---|---|---|
control_config_toggle_invert()
{
int z;
z = Cc_lines[Selected_line].cc_index;
Assert(z & JOY_AXIS);
z &= ~JOY_AXIS;
control_config_save_axis_undo(z);
Invert_axis[z] = !Invert_axis[z];
} | false | false | false | false | false | 0 |
spinlock_grab_try(spinlock_t *s, bool hidden)
{
spinlock_check(s);
if G_LIKELY(atomic_acquire(&s->lock)) {
if G_LIKELY(!hidden)
spinlock_account(s);
return TRUE;
}
return FALSE;
} | false | false | false | false | false | 0 |
chkbnd()
{
/*This procedure modified by M. Lathrop 29/04/86
with the introduction of continue and repeat*/
int i, j, k, ik, ii, jk;
boolean continue_;
/* cgh -- gcc warning fix */
ii = ik = jk = 0;
do {
clb = clbcon;
for (j = 1; j <= 2; j++) {
k = 0;
for (i = 1; i <= nall; i++) {... | false | false | false | false | false | 0 |
key(int k, int x, int y)
{
if (get_centered_pic())
{
set_centered_pic(0);
return;
}
if (k == 3 || k == 27 || k == 'q')
exit(0);
if (k == KEY_F(1) || k == 'h')
{
help("taipedit.html", taipedit_help);
}
if (k == 'l')
load(1);
if (k == 's')
save();
if (k >= '1' && k < '1'+G... | false | false | false | false | false | 0 |
ForwardAppendedDataOffset(OffsetType streamPos,
OffsetType offset,
const char* attr)
{
ostream& os = *(this->Stream);
OffsetType returnPos = os.tellp();
os.seekp(streamPos);
if(attr)
{
os << " " << attr... | false | false | false | false | false | 0 |
rsock_sockopt_new(int family, int level, int optname, VALUE data)
{
NEWOBJ(obj, struct RObject);
OBJSETUP(obj, rb_cSockOpt, T_OBJECT);
StringValue(data);
sockopt_initialize((VALUE)obj, INT2NUM(family), INT2NUM(level), INT2NUM(optname), data);
return (VALUE)obj;
} | false | false | false | false | false | 0 |
gwy_marker_box_remove_marker(GwyMarkerBox *mbox,
gint i)
{
gboolean selection_changed = FALSE;
gdouble pos;
gint j;
g_return_val_if_fail(GWY_IS_MARKER_BOX(mbox), FALSE);
g_return_val_if_fail(i >= 0 && i < mbox->markers->len, FALSE);
pos = g_array_index(mbox->marker... | false | false | false | false | false | 0 |
GetFileList()
{
char **papszFileList = RawDataset::GetFileList();
if( poCompressedDS != NULL )
{
char **papszCFileList = poCompressedDS->GetFileList();
papszFileList = CSLInsertStrings( papszFileList, -1,
papszCFileList );
CSLDestroy( pap... | false | false | false | false | false | 0 |
yajl_parse(yajl_handle hand, const unsigned char * jsonText,
size_t jsonTextLen)
{
yajl_status status;
/* lazy allocation of the lexer */
if (hand->lexer == NULL) {
hand->lexer = yajl_lex_alloc(&(hand->alloc),
hand->flags & yajl_allow_comments,
... | false | false | false | false | false | 0 |
_backup_adder_orc_add_volume_u16 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
orc_union16 * ORC_RESTRICT ptr0;
const orc_union16 * ORC_RESTRICT ptr4;
orc_union16 var34;
#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
volatile orc_union16 var35;
#else
orc_un... | false | false | false | false | false | 0 |
exo_icon_bar_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
ExoIconBarItem *item;
ExoIconBar *icon_bar = EXO_ICON_BAR (widget);
GList *lp;
gint n = 0;
gint max_width = 0;
gint max_height = 0;
if (!EXO_ICON_BAR_... | false | false | false | false | false | 0 |
logfs_rename_cross(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
struct logfs_super *super = logfs_super(old_dir->i_sb);
struct logfs_disk_dentry dd;
struct logfs_transaction *ta;
loff_t pos;
int err;
/* 1. locate source dd */
err = logfs_get_dd(o... | false | false | false | false | false | 0 |
_eio_file_copy_xattr(Ecore_Thread *thread __UNUSED__,
Eio_File_Progress *op __UNUSED__,
int in, int out)
{
char *tmp;
ssize_t length;
ssize_t i;
length = flistxattr(in, NULL, 0);
if (length <= 0) return ;
tmp = alloca(length);
length = flistxattr(in, tmp... | false | false | false | false | false | 0 |
run_tests () {
// Sanity checks of the algorithm.
{
t_box_list list;
list.push_back(t_box(16,16));
list.push_back(t_box(8,8));
list.push_back(t_box(4,8));
list.push_back(t_box(4,4));
list.push_back(t_box(4,4));
run_packer(list);
}
{
t_box_list list;
list.push_back(t_box(16... | false | false | false | false | false | 0 |
EditFiles()
{ struct Edit *ptr;
struct stat statbuf;
Debug("Editfiles()\n");
for (ptr=VEDITLIST; ptr!=NULL; ptr=ptr->next)
{
if (ptr->done == 'y' || strcmp(ptr->scope,CONTEXTID))
{
continue;
}
if (strncmp(ptr->fname,"home",4) == 0)
{
DoEditHomeFiles(ptr);
}
else
... | false | false | false | false | false | 0 |
GetSupportedSyncTypes(OpenSync::API &api) const
{
pst_type types = PST_ALL;
const_iterator b = begin(), e = end();
for( ; b != e; ++b ) {
types &= (*b)->GetSupportedSyncTypes(api);
}
return types;
} | false | false | false | false | false | 0 |
check_coord(x, y, str)
int x, y;
const char *str;
{
char ebuf[60];
if (x >= 0 && y >= 0 && x <= (int)max_x_map && y <= (int)max_y_map &&
(IS_ROCK(tmpmap[y][x]) || IS_DOOR(tmpmap[y][x]))) {
Sprintf(ebuf, "%s placed in wall at (%02d,%02d)?!", str, x, y);
yywarning(ebuf);
}
} | false | false | false | false | false | 0 |
qr_le_cost(const Operand* op0, const Operand* op1, const Operand* op2)
{
int cost;
int le_int_cost, le_real_cost, le_double_cost;
#ifdef OUTPUT_TBL_OP_NAME
printf("operator name: %s\n",ope_cost_tbl[LE].operator_name);
#endif
le_int_cost = ope_cost_tbl[LE].costs[0];
le_real_cost = ope_cost_tbl[LE].c... | false | false | false | false | false | 0 |
update_devfreq(struct devfreq *devfreq)
{
unsigned long freq;
int err = 0;
u32 flags = 0;
if (!mutex_is_locked(&devfreq->lock)) {
WARN(true, "devfreq->lock must be locked by the caller.\n");
return -EINVAL;
}
if (!devfreq->governor)
return -EINVAL;
/* Reevaluate the proper frequency */
err = devfreq->g... | false | false | false | false | false | 0 |
FillPortalStore(Portal portal, bool isTopLevel)
{
DestReceiver *treceiver;
char completionTag[COMPLETION_TAG_BUFSIZE];
PortalCreateHoldStore(portal);
treceiver = CreateDestReceiver(DestTuplestore);
SetTuplestoreDestReceiverParams(treceiver,
portal->holdStore,
portal->holdContext,
false... | false | false | false | false | false | 0 |
NextFile( void ) {
#ifdef WIN32
return FindNextFile( m_Dir, &m_Entry ) != FALSE;
#else
if ( m_Dir ) m_Entry = readdir( m_Dir );
return m_Entry != NULL;
#endif
} | false | false | false | false | false | 0 |
asciiCaseMap(char b, UBool uppercase) {
if(uppercase) {
if(_SMALL_A<=b && b<=_SMALL_Z) {
b-=(_SMALL_A-_CAPITAL_A);
}
} else {
if(_CAPITAL_A<=b && b<=_CAPITAL_Z) {
b+=(_SMALL_A-_CAPITAL_A);
}
}
return b;
} | false | false | false | false | false | 0 |
cpl_column_values_delete(cpl_column_values *values,
cpl_size length, cpl_type type)
{
cpl_size i;
if (values) {
switch (type) {
case CPL_TYPE_INT | CPL_TYPE_POINTER:
case CPL_TYPE_LONG | CPL_TYPE_POINTER:
case CPL_TYPE_LONG_LONG | CPL_TYPE... | false | false | false | false | false | 0 |
cb_udp_write(jdns_session_t *, void *app, int handle, const jdns_address_t *addr, int port, unsigned char *buf, int bufsize)
{
QJDns::Private *self = (QJDns::Private *)app;
QUdpSocket *sock = self->socketForHandle.value(handle);
if(!sock)
return 0;
QHostAddress host = addr2qt(addr);
int ret = sock->writ... | false | false | false | false | false | 0 |
program_hpp_type0(struct pci_dev *dev, struct hpp_type0 *hpp)
{
u16 pci_cmd, pci_bctl;
if (!hpp)
hpp = &pci_default_type0;
if (hpp->revision > 1) {
dev_warn(&dev->dev,
"PCI settings rev %d not supported; using defaults\n",
hpp->revision);
hpp = &pci_default_type0;
}
pci_write_config_byte(dev, PCI_... | false | false | false | false | false | 0 |
clk_debug_init(void)
{
struct clk_core *core;
struct dentry *d;
rootdir = debugfs_create_dir("clk", NULL);
if (!rootdir)
return -ENOMEM;
d = debugfs_create_file("clk_summary", S_IRUGO, rootdir, &all_lists,
&clk_summary_fops);
if (!d)
return -ENOMEM;
d = debugfs_create_file("clk_dump", S_IRUGO, rootdi... | false | false | false | false | false | 0 |
equinox_draw_arrow (cairo_t * cr,
const EquinoxColors * colors,
const WidgetParameters * widget,
const ArrowParameters * arrow,
int x, int y, int width, int height) {
EquinoxRGB color;
color = colors->text[widget->state_type];
if (color.r != colors->bg[GTK_STATE_NORMAL].r || color.g != colors-... | false | false | false | false | false | 0 |
default_target_version (void)
{
/* Use a cache. Assumes that the PATH environment variable doesn't change
during the lifetime of the program. */
static const char *java_version_cache;
if (java_version_cache == NULL)
{
/* Determine the version from the found JVM. */
java_version_cache = jav... | false | false | false | false | false | 0 |
poppler_page_find_text_with_options (PopplerPage *page,
const char *text,
PopplerFindFlags options)
{
PopplerRectangle *match;
GList *matches;
double xMin, yMin, xMax, yMax;
gunichar *ucs4;
glong ucs4_len;
double height;
Te... | false | false | false | false | false | 0 |
acdHelpXsd(const AcdPAcd thys, AjPList tablist)
{
AcdPXsdItem item;
static AjPStr nostr = NULL;
static AjPStr nullstr = NULL;
AjBool boolval;
AjBool tmpBool;
AjPStr helpStr = NULL;
AjPStr defstr = NULL;
AjPStr* def = NULL;
if(!acdDoXsd)
return;
/* skip associated q... | false | false | false | false | false | 0 |
nic_enc28j60_poll( nic_enc28j60_t *self )
{
ssize_t n;
if ( (ECON1(self) & ECON1_RXEN) /* Ethernet RX enabled? */
&& self->tap_fd > 0
&& (n = read( self->tap_fd,
self->eth_rx_buf + ETH_STATUS_LENGTH,
ETH_MAX )) > 0) {
libspectrum_word erxwrpt = GET_PT... | false | false | false | false | false | 0 |
_entry_hash(gconstpointer v) {
const GaEntryGroupServiceEntry *entry =
(const GaEntryGroupServiceEntry *) v;
guint32 h = 0;
guint i;
for (i = 0; i < entry->size; i++) {
h = (h << 5) - h + entry->value[i];
}
return h;
} | false | false | false | false | false | 0 |
dbpriv_build_prep_table(void)
{
int i, j;
int nwords;
char **words;
char cprep[100];
const char *p;
char *t;
pt_entry *current_alias, **prev;
for (i = 0; i < NPREPS; i++) {
p = prep_list[i];
prev = &prep_table[i];
while (*p) {
t = cprep;
if (*p == '/')
p++;
while (*p... | false | false | false | false | true | 1 |
hb_string_isprint(gchar *str)
{
gboolean valid = TRUE;
gchar *p;
gunichar c;
if(g_utf8_validate(str, -1, NULL))
{
p = str;
while(*p && valid)
{
c = g_utf8_get_char(p);
valid = g_unichar_isprint(c);
p = g_utf8_next_char(p);
}
}
return valid;
} | false | false | false | false | false | 0 |
lpfc_sli4_cq_get(struct lpfc_queue *q)
{
struct lpfc_cqe *cqe;
uint32_t idx;
/* sanity check on queue memory */
if (unlikely(!q))
return NULL;
/* If the next CQE is not valid then we are done */
if (!bf_get_le32(lpfc_cqe_valid, q->qe[q->hba_index].cqe))
return NULL;
/* If the host has not yet processed the... | false | false | false | false | false | 0 |
_lldpctl_needs(lldpctl_conn_t *conn, size_t length)
{
uint8_t *buffer = NULL;
ssize_t rc;
if ((buffer = malloc(length)) == NULL)
return SET_ERROR(conn, LLDPCTL_ERR_NOMEM);
rc = conn->recv(conn, buffer, length, conn->user_data);
if (rc < 0) {
free(buffer);
return SET_ERROR(conn, rc);
}
if (rc == 0) {
fr... | false | false | false | false | false | 0 |
compare_oid(unsigned long *oid1, unsigned int oid1len,
unsigned long *oid2, unsigned int oid2len)
{
unsigned int i;
if (oid1len != oid2len)
return 0;
else {
for (i = 0; i < oid1len; i++) {
if (oid1[i] != oid2[i])
return 0;
}
return 1;
}
} | false | false | false | false | false | 0 |
posix_handle_pair (xlator_t *this, const char *real_path,
data_pair_t *trav, int flags)
{
int sys_ret = -1;
int ret = 0;
if (ZR_FILE_CONTENT_REQUEST(trav->key)) {
ret = posix_set_file_contents (this, real_path, trav, flags);
} else {
... | false | false | false | false | false | 0 |
H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk)
{
unsigned btree_k[H5B_NUM_BTREE_ID];
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pset_sym_k, FAIL);
H5TRACE3("e", "iIuIu", plist_id, ik, lk);
/* Get the ... | false | false | false | false | false | 0 |
factory_create_search (GkmSession *session, GkmTransaction *transaction,
CK_ATTRIBUTE_PTR attrs, CK_ULONG n_attrs)
{
GkmManager *s_manager, *m_manager;
GkmSecretSearch *search;
gchar *identifier = NULL;
CK_ATTRIBUTE *attr;
GHashTable *fields;
gchar *schema_name;
GkmModule *module;
CK_RV r... | false | false | false | false | false | 0 |
test_comparable (void)
{
GDataComparable *category = GDATA_COMPARABLE (gdata_category_new ("term", "http://scheme", "label"));
/* Test the NULL comparisons */
g_assert_cmpint (gdata_comparable_compare (category, NULL), ==, 1);
g_assert_cmpint (gdata_comparable_compare (NULL, category), ==, -1);
g_assert_cmpint (g... | false | false | false | false | false | 0 |
free_all(thread_t * thread)
{
SOCK *sock_obj = THREAD_ARG(thread);
DBG("Total read size read = %d Bytes, fd:%d\n",
sock_obj->total_size, sock_obj->fd);
if (sock_obj->buffer)
FREE(sock_obj->buffer);
/*
* Decrement the current global get number.
* => free the reserved thread
*/
req->response_time = t... | false | false | false | false | false | 0 |
unparse_fn(const char *name, const struct expr *expr)
{
char *buf, *tmp;
tmp = unparse_op(expr->u.op.a, prec_add);
buf = alloc_size(strlen(name)+strlen(tmp)+3);
sprintf(buf, "%s(%s)", name, tmp);
free(tmp);
return buf;
} | false | false | false | false | false | 0 |
terrain_extract( struct PData *pd, struct Translateables *xl )
{
PData *sub, *subsub;
List *entries;
/* get weather */
if ( !parser_get_entries( pd, "weather", &entries ) ) goto parser_failure;
list_reset( entries );
while ( ( sub = list_next( entries ) ) ) {
if ( parser_get_pdata( sub, ... | false | false | false | false | false | 0 |
dewarpApplyDisparity(L_DEWARP *dew,
PIX *pixs,
l_int32 debugflag)
{
PIX *pixv, *pixd;
PROCNAME("dewarpApplyDisparity");
if (!dew)
return ERROR_INT("dew not defined", procName, 1);
if (dew->success == 0)
return ERROR_INT("model failed to ... | false | false | false | false | false | 0 |
death_info(void *unused, const char *title)
{
int i, j, k;
object_type *o_ptr;
store_type *st_ptr = &store[STORE_HOME];
(void)unused;
(void)title;
screen_save();
/* Display player */
display_player(0);
/* Prompt for inventory */
prt("Hit any key to see more information: ", 0, 0);
/* Allow abort at this... | false | false | false | false | false | 0 |
cgraph_add_new_function (tree fndecl, bool lowered)
{
struct cgraph_node *node;
switch (cgraph_state)
{
case CGRAPH_STATE_CONSTRUCTION:
/* Just enqueue function to be processed at nearest occurrence. */
node = cgraph_node (fndecl);
node->next_needed = cgraph_new_nodes;
if (lowered)
node->lowered =... | false | false | false | false | false | 0 |
IPrcWrite(pfPrcHelper* prc) {
prc->startTag("Params");
prc->writeParamHex("Flags", fFlags);
prc->writeParam("Begin", fBegin);
prc->writeParam("End", fEnd);
prc->writeParam("LoopBegin", fLoopBegin);
prc->writeParam("LoopEnd", fLoopEnd);
prc->writeParam("Speed", fSpeed);
prc->endTag(true);... | false | false | false | false | false | 0 |
camel_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs,
const gchar *zPath,
sqlite3_file *pFile,
gint flags,
gint *pOutFlags)
{
static GRecMutex only_once_lock;
static sqlite3_io_methods io_methods = {0};
CamelSqlite3File *cFile;... | false | false | false | false | false | 0 |
gsd_preview_scanner_selected (GnomeScanDialog *gsd)
{
GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
GtkWidget*widget = GTK_WIDGET (gsd);
GParamSpec *pspec;
GSParamSpecPaperSize *psps;
GtkPaperSize *ps;
GnomeScanner *scanner;
GdkPixbuf *pixbuf;
GnomeScanPreviewPlugin *plugin;
GSList *node = NULL, *node0 = N... | false | false | false | false | false | 0 |
_ds_delete_signature (DSPAM_CTX * CTX, const char *signature)
{
char filename[MAX_FILENAME_LENGTH];
char scratch[128];
_ds_userdir_path(filename,
CTX->home,
(CTX->group) ? CTX->group : CTX->username,
"sig");
snprintf(scratch, sizeof(scratch), "/%s.si... | false | false | false | false | false | 0 |
dspio_scp(struct hda_codec *codec,
int mod_id, int req, int dir, void *data, unsigned int len,
void *reply, unsigned int *reply_len)
{
int status = 0;
struct scp_msg scp_send, scp_reply;
unsigned int ret_bytes, send_size, ret_size;
unsigned int send_get_flag, reply_resp_flag, reply_error_flag;
unsigned int rep... | false | true | false | false | false | 1 |
_initialize()
{
UT_DEBUGMSG (("XAP_UnixFrameImpl::_initialize()\n"));
// get a handle to our keyboard binding mechanism
// and to our mouse binding mechanism.
EV_EditEventMapper * pEEM = XAP_App::getApp()->getEditEventMapper();
UT_ASSERT(pEEM);
m_pKeyboard = new ev_UnixKeyboard(pEEM);
UT_ASSERT(m_pKeybo... | false | false | false | false | false | 0 |
tex_draw_accent(uchar **in, TexArgStrs* params, int *out, int *lout) {
double lef,dep,wid,hei;
double wid2,hei2,lef2,dep2,h=0,cwid,cwid2;
int ix,ix2;
int savefnt = p_fnt;
int newfnt = pass_font(params->getCStr1());
texint(params->str2,&ix);
int *m = NULL;
if (params->str3[0] != 0 && params->str3[1] != 0) {
if... | false | false | false | false | true | 1 |
read_embark(piece_info_t *list, int piece_type)
{
void inconsistent(void);
piece_info_t *ship;
piece_info_t *obj;
int count;
for (ship = list; ship != NULL; ship = ship->piece_link.next) {
count = ship->count; /* get # of pieces we need */
if (count < 0) inconsistent ();
ship->count = 0; /* not... | false | false | false | false | false | 0 |
nemo_bookmarks_window_restore_geometry (GtkWidget *window)
{
const char *window_geometry;
g_return_if_fail (GTK_IS_WINDOW (window));
g_return_if_fail (NEMO_IS_BOOKMARK_LIST (bookmarks));
window_geometry = nemo_bookmark_list_get_window_geometry (bookmarks);
if (window_geometry != NULL) {
eel_gtk_window_set_i... | false | false | false | false | false | 0 |
command_stats_getPopularPhotos(flickcurl* fc, int argc, char *argv[])
{
char* date = argv[1];
const char* sort = NULL;
int per_page = -1;
int page = 0;
const char *extras = NULL;
flickcurl_photo** photos;
int i;
if(argc > 1) {
sort = argv[2];
if(argc > 2) {
per_page = parse_page_param(a... | false | false | false | false | false | 0 |
carl9170_init_power_cal(struct ar9170 *ar)
{
carl9170_regwrite_begin(ar);
carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE_MAX, 0x7f);
carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE1, 0x3f3f3f3f);
carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE2, 0x3f3f3f3f);
carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE3, 0x3f3f3f... | false | false | false | false | false | 0 |
parse_numlist(CS& cmd)
{
unsigned here = cmd.cursor();
PARAMETER<double> new_value(NOT_VALID);
cmd >> new_value;
if (cmd.gotit(here)) {
_scale = new_value;
return true;
}else{
return false;
}
} | false | false | false | false | false | 0 |
percentsub(Program *prog, int subs, String **destp)
{
int result = 1;
if (*ip == '%') {
while (*ip == '%') Stringadd(*destp, *ip++);
} else if (!*ip || is_space(*ip)) {
/* "% " and "%" at end of line are left alone */
Stringadd(*destp, '%');
} else if (subs >= SUB_FULL) {
if ((*destp)->len) {
... | false | false | false | false | false | 0 |
HexIntToVal(const char *Buffer, const char *End) {
uint64_t Result = 0;
for (; Buffer != End; ++Buffer) {
uint64_t OldRes = Result;
Result *= 16;
char C = *Buffer;
if (C >= '0' && C <= '9')
Result += C-'0';
else if (C >= 'A' && C <= 'F')
Result += C-'A'+10;
else if (C >= 'a' && C... | false | false | false | false | false | 0 |
smfw_dotrack(seq)
seq_type seq;
{
long end_marker;
timebase_type old_timebase = timebase;
unsigned long chunk_size;
if (seq->runflag) {
if ((seq->timebase->virt_base == 0) &&
(seq->timebase->rate == STOPRATE))
/*we just set these last time through... do nothing*/;
... | false | false | false | false | false | 0 |
dif_group(GtkWidget *widget, gpointer user_data)
{
GList *gwalker = NULL;
GList *list = llist_to_glist(get_contacts(COMBO_TEXT(group_name)), 1);
const char *tmp =
gtk_entry_get_text(GTK_ENTRY(GTK_BIN(contact_name)->child));
if (g_signal_handler_is_connected(contact_name, contact_input_handler))
g_signal_hand... | false | false | false | false | false | 0 |
IsSpecialNet(const losig* const sig)
{
return ( (isvdd((char*)sig->NAMECHAIN->DATA))
|| (isvss((char*)sig->NAMECHAIN->DATA)) );
} | false | false | false | false | false | 0 |
netup_unidvb_request_modules(struct device *dev)
{
static const char * const modules[] = {
"lnbh25", "ascot2e", "horus3a", "cxd2841er", NULL
};
const char * const *curr_mod = modules;
int err;
while (*curr_mod != NULL) {
err = request_module(*curr_mod);
if (err) {
dev_warn(dev, "request_module(%s) failed... | false | false | false | false | false | 0 |
gearman_packet_unpack_header(gearman_packet_st *packet)
{
uint32_t tmp;
if (not memcmp(packet->args, "\0REQ", 4))
{
packet->magic= GEARMAN_MAGIC_REQUEST;
}
else if (not memcmp(packet->args, "\0RES", 4))
{
packet->magic= GEARMAN_MAGIC_RESPONSE;
}
else
{
gearman_error(*packet->universal, GE... | false | false | false | false | false | 0 |
CopyJSObject(JSObject* source) {
// Never used to copy functions. If functions need to be copied we
// have to be careful to clear the literals array.
ASSERT(!source->IsJSFunction());
// Make the clone.
Map* map = source->map();
int object_size = map->instance_size();
Object* clone;
// If we're force... | false | false | false | false | false | 0 |
hilight_init_rec(HILIGHT_REC *rec)
{
#ifdef HAVE_REGEX_H
if (rec->regexp_compiled) regfree(&rec->preg);
rec->regexp_compiled = !rec->regexp ? FALSE :
regcomp(&rec->preg, rec->text, REG_EXTENDED|REG_ICASE) == 0;
#endif
} | false | false | false | false | false | 0 |
makeFirstSets()
{
// cerr << "MAKING TERM FIRST SETS" << endl;
bool modified = true;
while ( modified ) {
modified = false;
for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
if ( prod->fsm->startState->isFinState() ) {
long *inserted = prod->firstSet.insert( -1 );
if ( inserted != 0 )
mo... | false | false | false | false | false | 0 |
maCreateServer(MaAppweb *appweb, cchar *name)
{
MaServer *server;
mprAssert(appweb);
if ((server = mprAllocObj(MaServer, manageServer)) == NULL) {
return 0;
}
if (name == 0 || *name == '\0') {
name = "default";
}
server->name = sclone(name);
server->endpoints = mprCr... | false | false | false | true | false | 1 |
__gm_phy_read(struct skge_hw *hw, int port, u16 reg, u16 *val)
{
int i;
gma_write16(hw, port, GM_SMI_CTRL,
GM_SMI_CT_PHY_AD(hw->phy_addr)
| GM_SMI_CT_REG_AD(reg) | GM_SMI_CT_OP_RD);
for (i = 0; i < PHY_RETRIES; i++) {
udelay(1);
if (gma_read16(hw, port, GM_SMI_CTRL) & GM_SMI_CT_RD_VAL)
goto ready;
... | false | false | false | false | false | 0 |
spherematch_nn(PyObject* self, PyObject* args) {
int i, NY;
long p1, p2;
kdtree_t *kd1, *kd2;
npy_intp dims[1];
PyArrayObject* inds;
PyArrayObject* dist2s;
int *pinds;
double *pdist2s;
double rad;
anbool notself;
int* tempinds;
PyObject* rtn;
// So that ParseTuple("b") with a C ... | false | false | false | false | false | 0 |
disk_alloc_events(struct gendisk *disk)
{
struct disk_events *ev;
if (!disk->fops->check_events)
return;
ev = kzalloc(sizeof(*ev), GFP_KERNEL);
if (!ev) {
pr_warn("%s: failed to initialize events\n", disk->disk_name);
return;
}
INIT_LIST_HEAD(&ev->node);
ev->disk = disk;
spin_lock_init(&ev->lock);
mut... | false | false | false | false | false | 0 |
render(GemState *state)
{
int orientation=1;
pixBlock*img=NULL;
state->get(GemState::_PIX, img);
if ( !img || !&img->image ) return;
glRasterPos2i(0, 0);
// hack to center image at 0,0
if(img->image.upsidedown)
orientation=-1;
glPixelZoom(1,orientation);
glBitmap(0, 0, 0.f, 0.f, -(img->image.xsi... | false | false | false | false | false | 0 |
pull_read_reply (GVfsBackendSftp *backend,
int reply_type,
GDataInputStream *reply,
guint32 len,
GVfsJob *job,
gpointer user_data)
{
PullRequest *request = user_data;
SftpPullHandle *handle = request->handle;
handle->num_req--;
... | false | false | false | false | false | 0 |
goodix_i2c_read(struct i2c_client *client,
u16 reg, u8 *buf, int len)
{
struct i2c_msg msgs[2];
u16 wbuf = cpu_to_be16(reg);
int ret;
msgs[0].flags = 0;
msgs[0].addr = client->addr;
msgs[0].len = 2;
msgs[0].buf = (u8 *)&wbuf;
msgs[1].flags = I2C_M_RD;
msgs[1].addr = client->addr;
msgs[1].len =... | false | false | false | false | false | 0 |
collect_scope_parameters_(NetScope*scope,
const map<perm_string,LexicalScope::param_expr_t>¶meters)
{
for (mparm_it_t cur = parameters.begin()
; cur != parameters.end() ; cur ++) {
NetEParam*tmp = new NetEParam;
tmp->set_line(*((*cur).second.expr));
tmp->cast_signed( (*cur).second.si... | false | false | false | false | false | 0 |
get_formatted_length(const char *fmt, va_list ap, size_t *flen)
{
int st;
static FILE *fp = NULL;
if (fp == NULL) {
/* XXX this API needs to be changed... what if this descriptor is closed? */
if ((fp = fopen("/dev/null", "w")) == NULL)
return(-1);
}
/*
* POSIX says that vfprintf() is equivalent to ... | false | false | false | false | true | 1 |
check_level_78 (const char *name)
{
struct cb_level_78 *p78;
for (p78 = lev78ptr; p78; p78 = p78->next) {
if (strcasecmp (name, p78->fld78->name) == 0) {
return p78->fld78;
}
}
return NULL;
} | false | false | false | false | false | 0 |
query_owncloud (GomAccountMinerJob *job,
GError **error)
{
GomOwncloudMiner *self = GOM_OWNCLOUD_MINER (job->miner);
GomOwncloudMinerPrivate *priv = self->priv;
GFile *root;
GList *l;
GList *volumes;
GMainContext *context;
GMount *mount;
GVolume *volume;
SyncData data;
gboolean found... | false | false | false | false | false | 0 |
mcscompact(mcscxdef *ctx)
{
char buf[512];
ulong max;
mcsseg cur_in;
mcsseg cur_out;
mcsdsdef *desc_in;
mcsdsdef *desc_out;
uint siz;
uint rdsiz;
ulong ptr_in;
ulong ptr_out;
max = 0; /* start at of... | true | true | false | false | false | 1 |
findchar_backward(int startPos, unsigned int searchChar,
int *foundPos) const {
if (startPos <= 0) {
*foundPos = 0;
return 0;
}
if (startPos > mLength)
startPos = mLength;
for (startPos = prev_char(startPos); startPos>=0; startPos = prev_char(startPos)) {
if (searchChar == char_a... | false | false | false | false | false | 0 |
expand(const RCP<const Basic> &self)
{
if (is_a<Symbol>(*self)) return self;
if (is_a_Number(*self)) return self;
if (is_a<Add>(*self)) return add_expand(rcp_static_cast<const Add>(self));
if (is_a<Mul>(*self)) return mul_expand(rcp_static_cast<const Mul>(self));
if (is_a<Pow>(*self)) return pow_exp... | false | false | false | false | false | 0 |
mean_largest_dist (gfloat ** vals, gint * cols, gint ncols,
gfloat * min, gfloat * max, GGobiData * d, ggobid * gg)
{
/*
* Find the minimum and maximum values of each variable,
* scaling by mean and largest distance
*/
gint i, j;
gdouble dx, sumxi, mean, sumdist, lgdist = 0.0;
/*
* Find t... | false | false | false | false | false | 0 |
e1000e_set_mdio_slow_mode_hv(struct e1000_hw *hw, bool slow)
{
s32 ret_val = E1000_SUCCESS;
u16 data = 0;
/* Set MDIO mode - page 769, register 16: 0x2580==slow, 0x2180==fast */
hw->phy.addr = 1;
ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT,
(BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT)... | false | false | false | false | false | 0 |
xget_all_open_fds (void)
{
int *array;
array = get_all_open_fds ();
if (!array)
{
fprintf (stderr, "%s:%d: get_all_open_fds failed: %s\n",
__FILE__, __LINE__, strerror (errno));
exit (1);
}
return array;
} | false | false | false | false | false | 0 |
read_keys(const char *file, struct listnode *list)
{
struct adb_public_key *key;
FILE *f;
char buf[MAX_PAYLOAD];
char *sep;
int ret;
f = fopen(file, "r");
if (!f) {
D("Can't open '%s'\n", file);
return;
}
while (fgets(buf, sizeof(buf), f)) {
/* Allocate 4 ex... | true | true | false | false | true | 1 |
set_unique_reg_note (insn, kind, datum)
rtx insn;
enum reg_note kind;
rtx datum;
{
rtx note = find_reg_note (insn, kind, NULL_RTX);
switch (kind)
{
case REG_EQUAL:
case REG_EQUIV:
/* Don't add REG_EQUAL/REG_EQUIV notes if the insn
has multiple sets (some callers assume single_set... | false | false | false | false | false | 0 |
FillList()
{
control->Freeze();
Clear();
m_Items.Clear();
TodoItemsMap::iterator it;
if (m_pSource->GetSelection()==0) // Single file
{
wxString filename(wxEmptyString);
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinEditor(Manager::Get()->GetEditorManager()->Get... | false | false | false | false | false | 0 |
c_common_get_narrower (tree op, int *unsignedp_ptr)
{
op = get_narrower (op, unsignedp_ptr);
if (TREE_CODE (TREE_TYPE (op)) == ENUMERAL_TYPE
&& ENUM_IS_SCOPED (TREE_TYPE (op)))
{
/* C++0x scoped enumerations don't implicitly convert to integral
type; if we stripped an explicit conversion to a lar... | false | false | false | false | false | 0 |
pj_datum_transform( PJ *srcdefn, PJ *dstdefn,
long point_count, int point_offset,
double *x, double *y, double *z )
{
double src_a, src_es, dst_a, dst_es;
int z_is_temp = FALSE;
pj_errno = 0;
/* ------------------------------------------------... | false | false | false | false | true | 1 |
H5T__free(H5T_t *dt)
{
unsigned i;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
HDassert(dt && dt->shared);
/*
* If a named type is being closed then close the object header and
* remove from the list of open objects in the file.
*/
if(H5T_STATE_... | false | false | false | false | false | 0 |
targetShouldOfferProxy(Entry *e)
{
if(!e->c->d->proxy.isValid())
return false;
// if target, don't offer any proxy if the requester already did
const StreamHostList &hosts = e->c->d->req.hosts;
for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) {
if((*it).isProxy())
return false;... | false | false | false | false | false | 0 |
epr_create_flag_def()
{
EPR_SFlagDef* flag_def = NULL;
flag_def = (EPR_SFlagDef*) calloc(1, sizeof (EPR_SFlagDef));
if (flag_def == NULL) {
epr_set_err(e_err_out_of_memory,
"epr_create_flag_def: out of memory");
return NULL;
}
flag_def->magic = EPR_MAGIC_FLAG_DEF... | false | false | false | false | false | 0 |
checkMergeClash ( const CGLabel& from, const CGLabel& to, const DepSet& dep, unsigned int nodeId )
{
CGLabel::const_iterator p, p_end;
DepSet clashDep(dep);
bool clash = false;
for ( p = from.begin_sc(), p_end = from.end_sc(); p < p_end; ++p )
if ( isUsed(inverse(p->bp()))
&& findConceptClash ( to.getLabel(dt... | false | false | false | false | false | 0 |
brcmf_sdiod_ib_irqhandler(struct sdio_func *func)
{
struct brcmf_bus *bus_if = dev_get_drvdata(&func->dev);
struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
brcmf_dbg(INTR, "IB intr triggered\n");
brcmf_sdio_isr(sdiodev->bus);
} | false | false | false | false | false | 0 |
ParseWindowsCommandLine(const char* command,
std::vector<std::string>& args)
{
// See the MSDN document "Parsing C Command-Line Arguments" at
// http://msdn2.microsoft.com/en-us/library/a1y7w461.aspx for rules
// of parsing the windows command line.
bool in_argument ... | false | false | false | false | false | 0 |
kg_set_ccache_name (OM_uint32 *minor_status, const char *name)
{
char *new_name = NULL;
char *swap = NULL;
char *kg_ccache_name;
krb5_error_code kerr;
if (name) {
new_name = strdup(name);
if (new_name == NULL) {
*minor_status = ENOMEM;
return GSS_S_FAILURE;
... | false | false | false | false | false | 0 |
gt_asqg_writer_show_header(GtAsqgWriter *aw, float erate,
unsigned long minlen, const char *inputfilename, bool has_containments,
bool has_transitives, GT_UNUSED GtError *err)
{
gt_assert(aw != NULL);
gt_file_xprintf(aw->file,
"HT\tVN:i:%lu\tER:f:%g\tOL:i:%lu\tIN:Z:%s\tCN:i:%c\tTE:i:%c\n",
GT_AS... | false | false | false | false | false | 0 |
stringify_arg (pfile, arg)
cpp_reader *pfile;
macro_arg *arg;
{
unsigned char *dest = BUFF_FRONT (pfile->u_buff);
unsigned int i, escape_it, backslash_count = 0;
const cpp_token *source = NULL;
size_t len;
/* Loop, reading in the argument's tokens. */
for (i = 0; i < arg->count; i++)
{
... | 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.