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 |
|---|---|---|---|---|---|---|
print_jnode_b_to_a(struct jnode *j)
{
printf("%d ", j->id >= 0 ? B_to_A[j->id] : j->id);
printf("[%d] ", j->justification);
print_set_b_to_a(j->goals);
printf(" resolved: ");
print_set_b_to_a(j->resolved);
printf("\n");
} | false | false | false | false | false | 0 |
cancel_available_timer(struct cc_core_instance *core_instance)
{
struct ast_cc_monitor *monitor_iter;
AST_LIST_LOCK(core_instance->monitors);
AST_LIST_TRAVERSE_SAFE_BEGIN(core_instance->monitors, monitor_iter, next) {
if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
if (monitor_iter->callb... | false | false | false | false | false | 0 |
push_border_change( int colour )
{
int beam_x, beam_y;
struct border_change_t *change;
get_beam_position( &beam_x, &beam_y );
if( beam_y >= DISPLAY_SCREEN_HEIGHT ) return;
if( beam_x < 0 ) beam_x = 0;
if( beam_x > DISPLAY_SCREEN_WIDTH_COLS ) beam_x = DISPLAY_SCREEN_WIDTH_COLS;
if( beam_y < 0 ) beam_y =... | false | false | false | false | false | 0 |
ds1305_set_time(struct device *dev, struct rtc_time *time)
{
struct ds1305 *ds1305 = dev_get_drvdata(dev);
u8 buf[1 + DS1305_RTC_LEN];
u8 *bp = buf;
dev_vdbg(dev, "%s secs=%d, mins=%d, "
"hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n",
"write", time->tm_sec, time->tm_min,
time->tm_hour, time->tm_mday,
ti... | false | false | false | false | false | 0 |
lastWordIsNonVn()
{
if (m_current < 0)
return false;
switch (m_buffer[m_current].form) {
case vnw_nonVn:
return true;
case vnw_empty:
case vnw_c:
return false;
case vnw_v:
case vnw_cv:
return !VSeqList[m_buffer[m_current].vseq]... | false | false | false | false | false | 0 |
main(int argc,char *argv[])
{
// turn off slow sync with C-style output (we don't use it anyway).
std::ios::sync_with_stdio(false);
if (argc != 1)
{
cout << "Usage: internalcoord " << endl;
cout << " Unit tests for internal coordinate conversion " << endl;
return(-1);
}
cout << "# Un... | false | false | false | false | false | 0 |
PrequestPort(Value *retval)
{
if (!VxdmcpEnable.num) {
retval->num = 0;
return True;
}
return False;
} | false | false | false | false | false | 0 |
collapse(char *pattern)
{
char *p = pattern, *po = pattern;
char c;
int f = 0;
if (p == NULL)
return NULL;
while ((c = *p++))
{
if (c == '*')
{
if (!(f & 1))
*po++ = '*';
f |= 1;
}
else
{
*po++ = c;
f &= ~1;
}
}
*po++ = 0;
return pattern;
} | false | false | false | false | false | 0 |
GTIFGetDatumInfo( int nDatumCode, char ** ppszName, short * pnEllipsoid )
{
char szSearchKey[24];
int nEllipsoid = 0;
const char *pszFilename;
FILE *fp;
const char *pszName = NULL;
/* -------------------------------------------------------------------- */
/* Handle a few built-in datum... | true | true | false | false | true | 1 |
bitvect(image, len)
char *image;
int len;
{
register int c;
register unsigned short *bv;
register int i;
bv = alloc(BVectSize * sizeof(unsigned short));
for (i = 0; i < BVectSize; ++i)
bv[i] = 0;
while (len-- > 0) {
c = *image++;
if (c == '\\')
c = escape(&image, &len);
... | false | false | false | false | false | 0 |
is_inside_exit_unlock(struct compilation_unit *cu, unsigned char *ptr)
{
return ptr >= cu->exit_bb_ptr &&
ptr < cu->exit_past_unlock_ptr;
} | false | false | false | false | false | 0 |
CacheEntryDestroy(cc, ce, persist)
ChimeraCache cc;
CacheEntry *ce;
bool persist;
{
GListRemoveItem(cc->cachelist, ce);
cc->curr_size -= ce->size;
if (!persist && ce->filename != NULL) unlink(ce->filename);
MPDestroy(ce->mp);
return;
} | false | false | false | false | false | 0 |
archive_write_ustar_header(struct archive_write *a, struct archive_entry *entry)
{
char buff[512];
int ret, ret2;
struct ustar *ustar;
struct archive_string_conv *sconv;
ustar = (struct ustar *)a->format_data;
/* Setup default string conversion. */
if (ustar->opt_sconv == NULL) {
if (!ustar->init_default_con... | false | false | false | false | false | 0 |
ctf_print_timestamp_real(FILE *fp,
struct ctf_stream_definition *stream,
uint64_t timestamp)
{
uint64_t ts_sec = 0, ts_nsec;
ts_nsec = timestamp;
/* Add command-line offset in ns*/
ts_nsec += opt_clock_offset_ns;
/* Add command-line offset */
ts_sec += opt_clock_offset;
ts_sec += ts_nsec / NSEC_... | false | false | false | false | false | 0 |
toolong(int signo)
{
(void)signo;
reply(421,
"Timeout (%d seconds): closing control connection.", timeout);
if (logging)
syslog(LOG_FTP | LOG_INFO, "User %s timed out after %d seconds",
(pw ? pw -> pw_name : "unknown"), timeout);
dologout(1);
} | false | false | false | false | false | 0 |
asinh(const RCP<const Basic> &arg)
{
if (eq(arg, zero)) return zero;
if (eq(arg, one)) return log(add(one, sq2));
if (eq(arg, minus_one)) return log(sub(sq2, one));
if (is_a_Number(*arg) &&
rcp_static_cast<const Number>(arg)->is_negative()) {
return mul(minus_one, asinh(mul(minus_one, ar... | false | false | false | false | false | 0 |
mpeg_hdr_parse(const uint8_t *data, struct mpeg_audio_hdr *h) {
struct mpeg_audio_hdr hz = {0};
uint32_t hh;
int i;
*h = hz;
if (data[0] != 0xff || (data[1] & 0xe0) != 0xe0)
return 0;
hh = (data[1] << 16) | (data[2] << 8) | data[3];
/*fprintf(stderr, "%08x\n", hh);*/
/* ... | false | false | false | false | false | 0 |
stun_addr_decode(ioa_addr* ca, const u08bits *cfield, int len, int xor_ed, u32bits mc, const u08bits *tsx_id) {
if(!cfield || !len || !ca || !tsx_id || (len<8)) return -1;
if(cfield[0]!=0) {
return -1;
}
int sa_family;
if(cfield[1]==1) sa_family=AF_INET;
else if(cfield[1]==2) sa_family=AF_INET6;
e... | false | false | false | false | false | 0 |
multi_options_update_local()
{
ubyte data[MAX_PACKET_SIZE],code;
int packet_size = 0;
// if i'm the server, don't do anything
if(Net_player->flags & NETINFO_FLAG_AM_MASTER){
return;
}
// build the header and add the opcode
BUILD_HEADER(OPTIONS_UPDATE);
code = MULTI_OPTION_LOCAL;
ADD_DATA(code);
// add t... | false | false | false | false | false | 0 |
ath10k_wmi_put_start_scan_tlvs(struct wmi_start_scan_tlvs *tlvs,
const struct wmi_start_scan_arg *arg)
{
struct wmi_ie_data *ie;
struct wmi_chan_list *channels;
struct wmi_ssid_list *ssids;
struct wmi_bssid_list *bssids;
void *ptr = tlvs->tlvs;
int i;
if (arg->n_channels) {
channels = ptr;
channel... | false | true | false | false | false | 1 |
local_timer_softirq_pending(void)
{
return local_softirq_pending() & TIMER_SOFTIRQ;
} | false | false | false | false | false | 0 |
run_named_test(TestSuite *suite, char *name, TestReporter *reporter) {
(*reporter->start_suite)(reporter, suite->name, count_tests(suite));
int i;
for (i = 0; i < suite->size; i++) {
if (suite->tests[i].type == test_function) {
if (strcmp(suite->tests[i].name, name) == 0) {
run... | false | false | false | false | false | 0 |
c_common_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
{
unsigned file_index;
#if YYDEBUG != 0
yydebug = set_yydebug;
#else
warning ("YYDEBUG not defined");
#endif
file_index = 0;
do
{
if (file_index > 0)
{
/* Reset the state of the parser. */
c_reset_state();
/* Reset cpplib's ma... | false | false | false | false | false | 0 |
addCountry(QLocale::Country country)
{
if (country == QLocale::AnyCountry)
return;
const QString &countryName = QLocale::countryToString(country);
if (countryName.isEmpty())
return;
QString flag = Utils::countryToIso(country);
addItem(QIcon(QString("%1/%2.png").arg(m_FlagPath, flag))... | false | false | false | false | false | 0 |
handle_offline(atransport *t)
{
D("adb: offline\n");
//Close the associated usb
t->online = 0;
run_transport_disconnects(t);
} | false | false | false | false | false | 0 |
createDevice() const
{
return new KLimitedIODevice( archive()->device(), d->pos, d->size );
} | false | false | false | false | false | 0 |
OS__strtoent(int base, const char *buf, const char *end, int32_t *ret_value) {
int32_t val = 0;
const char *p;
for(p = buf; p < end; p++) {
int ch = *p;
/* Strange huge value */
if((val * base + base) < 0)
return -1;
switch(ch) {
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/
case... | false | false | false | false | false | 0 |
Consbindingidmarks
#ifdef KC_USE_PROTOTYPES
(bindingidmark bindingidmark_1, bindingidmarks bindingidmarks_1)
#else
(bindingidmark_1, bindingidmarks_1) bindingidmark bindingidmark_1; bindingidmarks bindingidmarks_1;
#endif
{ register bindingidmarks kc_x;
int kc_i;
register kc_hashtableentry_t* kc_hte;
unsigned kc_h... | false | false | false | false | false | 0 |
next_is_schedule(__isl_keep isl_stream *s)
{
struct isl_token *tok;
int is_schedule;
tok = isl_stream_next_token(s);
if (!tok)
return 0;
if (tok->type != '{') {
isl_stream_push_token(s, tok);
return next_is_domain_colon(s);
}
is_schedule = next_is_domain_colon(s);
isl_stream_push_token(s, tok);
return... | false | false | false | false | false | 0 |
jmlist_dump(jmlist jml)
{
jmlist_debug(__func__,"called with jml=%p",jml);
if( jml->flags & JMLIST_INDEXED )
{
jmlist_debug(__func__,"passing control to indexed list dump routine.");
return ijmlist_idx_dump(jml);
} else if( jml->flags & JMLIST_LINKED )
{
jmlist_debug(__func__,"passing control to linked li... | false | false | false | false | false | 0 |
IconSpinDrawFunc (void *_self, FNT_font_t font)
{
int x, y;
menulist_s *self = (menulist_s *)_self;
x = Item_GetX (*self)+RCOLUMN_OFFSET;
y = Item_GetY (*self)+MenuText_UpperMargin (self, font->size);
if ((self->generic.flags & QMF_RIGHT_COLUMN))
x += Menu_PredictSize (self->generic.name);
Draw_Alpha... | false | false | false | false | false | 0 |
PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("Enable Effects"));
{
#if USE_AUDIO_UNITS
S.TieCheckBox(_("Audio Unit"),
wxT("/AudioUnits/Enable"),
true);
#endif
// JKC: LADSPA, Nyquist, VST, VAMP should not be translated.
#if USE_LADS... | false | false | false | false | false | 0 |
set_palette(int blocks)
{
int ent, i, k;
ent = 0;
for (i = 0; i < (2 * blocks); i++)
{
k = indx(color_pt[i].c[RED], color_pt[i].c[GREEN], color_pt[i].c[BLUE]);
if (trans[k] == -1)
{
new_pal[3 * ent] = (uint8) (color_pt[i].c[RED] << 3);
... | false | false | false | false | false | 0 |
WXMPUtils_SeparateArrayItems_1 ( XMPMetaRef wxmpObj,
XMP_StringPtr schemaNS,
XMP_StringPtr arrayName,
XMP_OptionBits options,
XMP_StringPtr catedStr,
WXMP_Result * wResult )
{
XMP_ENTER_Static ( "WXMPUtils_SeparateArrayItems_1" )
if ( wxmpObj == 0 ) XMP_Throw ( "Output ... | false | false | false | false | false | 0 |
scan_tu1_phase1(TreeNode *x)/*{{{*/
{
/* Find any tanru_unit_1 with linked sumti on it, and build a termvector
property to attach to it. */
int nc, i;
struct nonterm *nt;
TreeNode *c;
if (x->type == N_NONTERM) {
nt = &x->data.nonterm;
if (nt->type == TANRU_UNIT_1) {
check_tu1_for_links(... | false | false | false | false | false | 0 |
dropNameClash(v)
Cell v;
{
Name n = findName(textOf(v));
if ( !isNull(n) && nonNull(name(n).clashes) ) {
name(n).clashes = tl(name(n).clashes);
}
} | false | false | false | false | false | 0 |
virtio_gpu_cmd_capset_cb(struct virtio_gpu_device *vgdev,
struct virtio_gpu_vbuffer *vbuf)
{
struct virtio_gpu_get_capset *cmd =
(struct virtio_gpu_get_capset *)vbuf->buf;
struct virtio_gpu_resp_capset *resp =
(struct virtio_gpu_resp_capset *)vbuf->resp_buf;
struct virtio_gpu_drv_cap_cache *cache_ent;
... | false | true | false | false | false | 1 |
free_block_list(struct rb_root *blocks)
{
struct tree_block *block;
struct rb_node *rb_node;
while ((rb_node = rb_first(blocks))) {
block = rb_entry(rb_node, struct tree_block, rb_node);
rb_erase(rb_node, blocks);
kfree(block);
}
} | false | false | false | false | false | 0 |
Scm_SocketSendTo(ScmSocket *sock, ScmObj msg, ScmSockAddr *to,
int flags)
{
int r; u_int size;
const char *cmsg;
CLOSE_CHECK(sock->fd, "send to", sock);
cmsg = get_message_body(msg, &size);
SCM_SYSCALL(r, sendto(sock->fd, cmsg, size, flags,
&SCM_SOCK... | false | false | false | false | false | 0 |
nilfs_add_nondir(struct dentry *dentry, struct inode *inode)
{
int err = nilfs_add_link(dentry, inode);
if (!err) {
d_instantiate(dentry, inode);
unlock_new_inode(inode);
return 0;
}
inode_dec_link_count(inode);
unlock_new_inode(inode);
iput(inode);
return err;
} | false | false | false | false | false | 0 |
_mfd_ifTable_undo_setup(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *agtreq_info,
netsnmp_request_info *requests)
{
int rc;
ifTable_rowreq_ctx *rowreq_ctx = (ifTable_rowreq_ctx... | false | false | false | false | false | 0 |
internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
char *buffer, size_t buflen, int *errnop,
int *h_errnop, int flags)
{
uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct parser_data);
buffer += pad;
struct parser_data *data = (void *) buffer;
if (name == NULL)
... | false | false | false | false | false | 0 |
e_modapi_init(E_Module *m)
{
E_Mixer_Module_Context *ctxt;
ctxt = E_NEW(E_Mixer_Module_Context, 1);
if (!ctxt)
return NULL;
#ifdef HAVE_ENOTIFY
e_notification_init();
#endif
_mixer_configure_registry_register();
e_gadcon_provider_register(&_gc_class);
if (!e_mixer_pulse_init()) e_mixer_defa... | false | false | false | false | false | 0 |
unity_webapps_context_ready (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
GAsyncInitable *initable = G_ASYNC_INITABLE (source_object);
UnityWebappsContext *context;
GSource *source;
unity_webapps_context_new_data *data;
GError *error;
error = NULL;
context = UNITY... | false | false | false | false | false | 0 |
qib_7322_notify_dca(struct qib_devdata *dd, unsigned long event)
{
switch (event) {
case DCA_PROVIDER_ADD:
if (dd->flags & QIB_DCA_ENABLED)
break;
if (!dca_add_requester(&dd->pcidev->dev)) {
qib_devinfo(dd->pcidev, "DCA enabled\n");
dd->flags |= QIB_DCA_ENABLED;
qib_setup_dca(dd);
}
break;
case D... | false | false | false | false | false | 0 |
M_memLeak() {
int i,c=0;
for (i=1; i<=MAXMEM; i++)
if (mstack[i].ptr) c++;
return(c);
} | false | false | false | false | false | 0 |
fixup_line(const char *ptr, int quote_count)
{
char *str = git__malloc(strlen(ptr) + 1);
char *out = str, *esc;
const char *escapes = "ntb\"\\";
const char *escaped = "\n\t\b\"\\";
if (str == NULL)
return NULL;
while (*ptr != '\0') {
if (*ptr == '"') {
quote_count++;
} else if (*ptr != '\\') {
*out+... | false | false | false | false | false | 0 |
IsITUFaxImage(const Image *image)
{
const StringInfo
*profile;
const unsigned char
*datum;
profile=GetImageProfile(image,"8bim");
if (profile == (const StringInfo *) NULL)
return(MagickFalse);
if (GetStringInfoLength(profile) < 5)
return(MagickFalse);
datum=GetStringInfoDatum(profile);
i... | false | false | false | false | false | 0 |
print_java_stack_trace_elem(struct stack_trace_elem *elem)
{
struct compilation_unit *cu;
unsigned long bc_offset;
cu = stack_trace_elem_get_cu(elem);
struct vm_method *vmm = cu->method;
trace_printf("%s.%s", vmm->class->name, vmm->name);
if (vm_method_is_native(vmm)) {
trace_printf("(Native Method)");
ret... | false | false | false | false | false | 0 |
secret_value_new_full (gchar *secret,
gssize length,
const gchar *content_type,
GDestroyNotify destroy)
{
SecretValue *value;
g_return_val_if_fail (content_type, NULL);
if (length < 0)
length = strlen (secret);
value = g_slice_new0 (SecretVal... | false | false | false | false | false | 0 |
completion_action_activated_cb (GtkEntryCompletion *widget,
int index,
gpointer user_data)
{
GthTagsEntry *self = user_data;
const char *tag_start;
const char *tag_end;
const char *text;
char *head;
const char... | false | false | false | false | false | 0 |
bs_null_open(struct scsi_lu *lu, char *path,
int *fd, uint64_t *size)
{
*size = NULL_BS_DEV_SIZE;
dprintf("NULL backing store open, size: %" PRIu64 "\n", *size);
return 0;
} | false | false | false | false | false | 0 |
free_user (struct User *user, gpointer data)
{
if (user->realname)
free (user->realname);
if (user->hostname)
free (user->hostname);
if (user->servername)
free (user->servername);
if (user->account)
free (user->account);
free (user);
return TRUE;
} | false | false | false | false | false | 0 |
read_extents(fr_vector<ft_uoff> & loop_file_extents,
fr_vector<ft_uoff> & free_space_extents,
ft_uoff & ret_block_size_bitmask)
{
ft_uoff block_size_bitmask = ret_block_size_bitmask;
int err = 0;
do {
if (!is_open_extents()) {
ff_... | false | false | false | false | false | 0 |
get_logical_name(int id, Tcl_Interp * interp, int argc, char *argv[])
{
Nv_clientData *data = NULL;
char err_string[80];
/* Check for correct syntax */
if (argc != 2) {
Tcl_SetResult(interp, "Usage: <map> get_logical_name", TCL_VOLATILE);
return (TCL_ERROR);
}
/* Try to get the client data f... | true | true | true | false | false | 1 |
test_ref3(void)
{
void *root, *p1, *p2, *ref, *r1;
printf("test: ref3\n# PARENT REFERENCE FREE\n");
root = talloc_named_const(NULL, 0, "root");
p1 = talloc_named_const(root, 1, "p1");
p2 = talloc_named_const(root, 1, "p2");
r1 = talloc_named_const(p1, 1, "r1");
ref = talloc_reference(p2, r1);
talloc_report_fu... | false | false | false | false | false | 0 |
_gth_grid_view_keep_focus_consistent (GthGridView *self)
{
if (self->priv->focused_item > self->priv->n_items - 1)
self->priv->focused_item = - 1;
} | false | false | false | false | false | 0 |
SECKEY_EncodeDERSubjectPublicKeyInfo(SECKEYPublicKey *pubk)
{
CERTSubjectPublicKeyInfo *spki=NULL;
SECItem *spkiDER=NULL;
/* get the subjectpublickeyinfo */
spki = SECKEY_CreateSubjectPublicKeyInfo(pubk);
if( spki == NULL ) {
goto finish;
}
/* DER-encode the subjectpublickeyinfo */
sp... | false | false | false | false | false | 0 |
moveItemUp()
{
if ( currentRow() < 1 )
return;
QListWidgetItem *i = currentItem();
if ( !i )
return;
int prevRow = row(i) - 1;
i = takeItem(row(i));
insertItem(prevRow, i);
setItemSelected(i, true);
setCurrentItem(i);
} | false | false | false | false | false | 0 |
Error(int sev, const char *message, ...)
{
va_list ap;
va_start(ap, message);
/* Note the call to Warning sends only the literal message--a limitation to
deal with later. */
if( g_console_ready ) CONSOLE.Warning(sev, message);
else{
vfprintf(stderr, message, ap);
fflush(stderr);
}
va_end(ap)... | false | false | false | false | false | 0 |
glutGet(GLenum type) {
switch (type) {
case GLUT_RETURN_ZERO: return 0;
case GLUT_WINDOW_X: return glut_window->x();
case GLUT_WINDOW_Y: return glut_window->y();
case GLUT_WINDOW_WIDTH: return glut_window->w();
case GLUT_WINDOW_HEIGHT: return glut_window->h();
case GLUT_WINDOW_PARENT:
if (glut_window-... | false | false | false | false | false | 0 |
visitVACopyInst(VACopyInst &I) override {
if (F.getCallingConv() == CallingConv::X86_64_Win64)
return;
IRBuilder<> IRB(&I);
Value *VAListTag = I.getArgOperand(0);
Value *ShadowPtr = MSV.getShadowPtr(VAListTag, IRB.getInt8Ty(), IRB);
// Unpoison the whole __va_list_tag.
// FIXME: magic ABI... | false | false | false | false | false | 0 |
do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz)
{
static int firsttime = 1;
int error = 0;
if (tv && !timespec_valid(tv))
return -EINVAL;
error = security_settime(tv, tz);
if (error)
return error;
if (tz) {
/* Verify we're witin the +-15 hrs range */
if (tz->tz_minuteswest > 1... | false | false | false | false | false | 0 |
invalid_elt_sequence(MAILSTREAM *stream, MSGNO_S *msgmap)
{
long i, rawno;
MESSAGECACHE *mc;
if(!stream)
return(NULL);
for(i = 1L; i <= stream->nmsgs; i++)
if((mc = mail_elt(stream, i)) != NULL)
mc->sequence = 0; /* clear "sequence" bits */
for(i = mn_first_cur(msgmap); i ... | false | false | false | false | false | 0 |
ParseLine(D_SpeedDial * d, gchar * buf)
{
gchar **strings = g_strsplit(buf, ";", 3);
d->entry.number = *strings[0] - '0';
if (d->entry.number < 1 || d->entry.number > 9) {
g_strfreev(strings);
return FALSE;
}
d->entry.memory_type = *strings[1] - '0';
if (d->entry.memory_type < 2 || d->entry.memory_type > 3)... | false | false | false | false | false | 0 |
i2c_lpc2k_handler(int irq, void *dev_id)
{
struct lpc2k_i2c *i2c = dev_id;
if (readl(i2c->base + LPC24XX_I2CONSET) & LPC24XX_SI) {
i2c_lpc2k_pump_msg(i2c);
return IRQ_HANDLED;
}
return IRQ_NONE;
} | false | false | false | false | false | 0 |
enumerate(
int limit, const char* select_clause, const char* order_clause
) {
char query[MAX_QUERY_LEN];
int retval;
MYSQL_ROW row;
if (!cursor.active) {
// use "r1" to refer to the result, since the feeder assumes that
// (historical reasons)
//
sprintf(query,
... | false | false | false | false | false | 0 |
UserHandler(int iSigNum)
{
struct tms tCPUTicks;
//For USR1 and USR2
switch (iSigNum)
{
case SIGUSR1:
if (uStackStyle & STACK_BAR)
{
uStackStyle^=STACK_BAR;
uStackStyle|=STACK_LINE;
return;
}
if (uStackStyle & STACK_LINE)
{
uStackStyle^=STACK_LINE;
uStackStyle|=STACK_RAW;
r... | false | false | false | false | false | 0 |
apply_all_solutions()
{
CYG_REPORT_FUNCNAME("CdlTransaction::apply_all_solutions");
CYG_REPORT_FUNCARG1XV(this);
CYG_PRECONDITION_THISC();
std::list<CdlConflict>::const_iterator conf_i;
for (conf_i = this->new_conflicts.begin(); conf_i != this->new_conflicts.end(); conf_i++) {
if ((*conf_i)... | false | false | false | false | false | 0 |
dumpLookQueue()
{
debug() << "look queue:";
for (unsigned int i=0; i < m_lookQueue.size(); ++i) {
debug() << "\t" << m_lookQueue[i];
}
} | false | false | false | false | false | 0 |
ftrace_traceoff(unsigned long ip, unsigned long parent_ip, void **data)
{
if (!tracing_is_on())
return;
tracing_off();
} | false | false | false | false | false | 0 |
brasero_video_tree_model_track_removed (BraseroBurnSession *session,
BraseroTrack *track,
guint former_location,
BraseroVideoTreeModel *model)
{
BraseroVideoTreeModelPrivate *priv;
GtkTreePath *path;
GtkTreeIter iter;
if (!BRASERO_IS_TRACK_STREAM (track))
return;
priv = BRASERO_VIDEO_TREE_MODEL_... | false | false | false | false | false | 0 |
encodeString(const string& str)
{
encoding_it encoding = m_stringMap.find(str);
int encoded_str;
if (encoding == m_stringMap.end()) {
encoded_str = static_cast<int>(m_stringMap.size());
m_stringMap[str] = encoded_str;
} else {
encoded_str = encoding->second;
}
return encoded_str;
} | false | false | false | false | false | 0 |
sphCreateSorter2nd ( ESphSortFunc eGroupFunc, bool bGroupBits, const ISphMatchComparator * pComp, const CSphQuery * pQuery, const CSphGroupSorterSettings & tSettings )
{
if ( bGroupBits )
{
switch ( eGroupFunc )
{
case FUNC_GENERIC2: return sphCreateSorter3rd<MatchGeneric2_fn<true> > ( pComp, pQuery, tSetting... | false | false | false | false | false | 0 |
arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
enum machine_mode mode,
int *punsignedp ATTRIBUTE_UNUSED,
const_tree fntype ATTRIBUTE_UNUSED,
int for_return ATTRIBUTE_UNUSED)
{
if (GET_MODE_CLASS (... | false | false | false | false | false | 0 |
getIndexExemplars(UnicodeSet &dest, const Locale &locale, UErrorCode &status) {
if (U_FAILURE(status)) {
return;
}
LocalULocaleDataPointer uld(ulocdata_open(locale.getName(), &status));
UnicodeSet exemplars;
ulocdata_getExemplarSet(uld.getAlias(), exemplars.toUSet(), 0, ULOCDATA_ES_INDEX, ... | false | false | false | false | false | 0 |
gsb_data_report_check_categ_budget_in_report ( GSList *list_struct_report,
gint div_number,
gint sub_div_number )
{
GSList *tmp_list;
tmp_list = list_struct_report;
while (tmp_list)
{
struct_categ_budget_sel *categ_budget_struct = tmp_list -> data;
if (categ_budget_struct -> div_number... | false | false | false | false | false | 0 |
RelationSetNewRelfilenode(Relation relation, TransactionId freezeXid)
{
Oid newrelfilenode;
RelFileNode newrnode;
Relation pg_class;
HeapTuple tuple;
Form_pg_class classform;
/* Indexes must have Invalid frozenxid; other relations must not */
Assert((relation->rd_rel->relkind == RELKIND_INDEX &&
freezeXid ... | false | false | false | true | false | 1 |
report_kids(void) {
static _u32 st;
_s32 i;
if (wait_res >= 0) {
wait_res = waitpid(orig_pid,&st,WNOHANG);
/* Process still running or just done? */
if (wait_res >= 0) return 0;
}
/* Process gone at least a round ago... */
i = get_procentry(orig_pid,0);
if (!total_calls) exitflags |= EXITF... | false | false | false | false | false | 0 |
onCmdRGBSlider(FXObject*,FXSelector sel,void*){
FXint which=FXSELID(sel)-ID_RGB_RED_SLIDER;
rgba[which]=0.003921568627f*rgbaslider[which]->getValue();
fxrgb_to_hsv(hsva[0],hsva[1],hsva[2],rgba[0],rgba[1],rgba[2]);
updateWell();
if(target) target->tryHandle(this,FXSEL(FXSELTYPE(sel),message),(void*)(FXuval)wel... | false | false | false | false | false | 0 |
ec2n_clone(struct group *new, struct group *clone)
{
struct ec2n_group *new_grp, *clone_grp = clone->group;
new_grp = malloc(sizeof *new_grp);
if (!new_grp) {
log_error("ec2n_clone: malloc (%lu) failed",
(unsigned long)sizeof *new_grp);
free(new);
return 0;
}
memcpy(new, clone, sizeof(struct group));
... | false | false | false | false | false | 0 |
audiohook_volume_get(struct ast_channel *chan, int create)
{
struct ast_datastore *datastore = NULL;
struct audiohook_volume *audiohook_volume = NULL;
/* If we are able to find the datastore return the contents (which is actually an audiohook_volume structure) */
if ((datastore = ast_channel_datastore_find(chan, &... | false | false | false | false | false | 0 |
psc724_set_jack_state(struct snd_ice1712 *ice, bool hp_connected)
{
struct psc724_spec *spec = ice->spec;
struct snd_ctl_elem_id elem_id;
struct snd_kcontrol *kctl;
u16 power = spec->wm8776.regs[WM8776_REG_PWRDOWN] & ~WM8776_PWR_HPPD;
psc724_set_master_switch(ice, !hp_connected);
if (!hp_connected)
power |= WM... | false | false | false | false | false | 0 |
pch_gbe_get_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause)
{
struct pch_gbe_adapter *adapter = netdev_priv(netdev);
struct pch_gbe_hw *hw = &adapter->hw;
pause->autoneg =
((hw->mac.fc_autoneg) ? AUTONEG_ENABLE : AUTONEG_DISABLE);
if (hw->mac.fc == PCH_GBE_FC_RX_PAUSE) {
... | false | false | false | false | false | 0 |
ipvideo_decode_0x2 (const GstMveDemuxStream * s, unsigned char *frame,
const unsigned char **data, unsigned short *len)
{
unsigned char B;
int x, y;
int offset;
/* copy block from 2 frames ago using a motion vector */
CHECK_STREAM (len, 1);
B = *(*data)++;
if (B < 56) {
x = 8 + (B % 7);
y = ... | false | false | false | false | false | 0 |
populatePmhWithUi()
{
m_Pmh->setData(PmhData::Label, ui->personalLabel->text());
m_Pmh->setData(PmhData::Type, ui->typeCombo->currentIndex());
m_Pmh->setData(PmhData::State, ui->statusCombo->currentIndex());
m_Pmh->setData(PmhData::ConfidenceIndex, ui->confIndexSlider->value());
... | false | false | false | false | false | 0 |
A_CHolyTail(mobj_t * actor)
{
mobj_t *parent;
parent = actor->special2.m;
if (parent)
{
if (parent->state >= &states[parent->info->deathstate])
{ // Ghost removed, so remove all tail parts
CHolyTailRemove(actor);
return;
}
e... | false | false | false | false | false | 0 |
jset_input_stream_position(j_decompress_ptr cinfo, int offset)
{
if (cinfo->src->seek_input_data) {
cinfo->src->seek_input_data(cinfo, offset);
} else {
cinfo->src->bytes_in_buffer = cinfo->src->current_offset - offset;
cinfo->src->next_input_byte = cinfo->src->start_input_byte + offset;
}
} | false | false | false | false | false | 0 |
find_file(char *name, const char *path)
{ const char *p;
char *q;
char path_buf[PATH_BUF_SIZE];
char dir_sep[2]={DIR_SEP,0};
for (p=path;p;p=q+1) {
q=strchr(p,LIST_SEP);
if (q) {
if (!prepare_path_buf(path_buf,p,q)) continue;
} else {
q--;
if (!prepare_path_buf(path_buf,p,p+strlen(p))) continue;
}... | false | false | false | false | false | 0 |
_convertPyInt_AsSsize_t(PyObject *o, Py_ssize_t *size_ptr)
{
/* PyObject to Py_ssize_t converter */
*size_ptr = PyLong_AsSsize_t(o);
if (*size_ptr == -1 && PyErr_Occurred())
return 0;
return 1;
} | false | false | false | false | false | 0 |
knh_ResultSet_next(CTX ctx, kResultSet *o)
{
if(DP(o)->qcur != NULL) {
if(DP(o)->conn->dspi->qcurnext(ctx, DP(o)->qcur, o)) {
DP(o)->count += 1;
return 1;
}
else {
kbytes_t t = {{""}, 0};
DP(o)->qcurfree(DP(o)->qcur);
DP(o)->qcur = NULL;
DP(o)->qcurfree = knh_getQueryDSPI(ctx, t)->qcurfree;
}... | false | false | false | false | false | 0 |
toolbar_context_menu (GtkToolbar *tb, WBCGtk *gtk, GdkEventButton *event_button)
{
GtkWidget *box = gtk_widget_get_parent (GTK_WIDGET (tb));
GtkWidget *zone = gtk_widget_get_parent (GTK_WIDGET (box));
GtkWidget *menu = gtk_menu_new ();
GtkWidget *item;
gboolean detached;
static struct {
char const *text;
Gtk... | false | false | false | false | false | 0 |
checkIncrementBoolean()
{
if (!_settings->isEnabled("style"))
return;
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
const std::size_t functions = symbolDatabase->functionScopes.size();
for (std::size_t i = 0; i < functions; ++i) {
const Scope * scope = symbolDa... | false | false | false | false | false | 0 |
gxddrw (gadouble x, gadouble y){ /* Draw to x,y */
gaint i, j;
gaint w,h;
i = (gaint)(x*xscl+0.5);
j = height - (gaint)(y*yscl+0.5);
XDrawLine (display, drwbl, gc, xxx, yyy, i, j);
if (wchose && lwidth>5) {
w = xxx - i;
if (w<0) w = -1*w;
h = yyy-j;
if (h<0) h = -1*h;
if (w<h) {
... | false | false | false | false | false | 0 |
tarWrite(const void *buf, size_t len, TAR_MEMBER *th)
{
size_t res;
if (th->zFH != NULL)
res = GZWRITE(buf, 1, len, th->zFH);
else
res = fwrite(buf, 1, len, th->nFH);
th->pos += res;
return res;
} | false | false | false | false | false | 0 |
pf_check(struct parse_frame *frm, chunk_t *pc)
{
int in_ifdef = frm->in_ifdef;
int b4_cnt = cpd.frame_count;
int pp_level = cpd.pp_level;
const char *txt = NULL;
chunk_t *next;
if (pc->type != CT_PREPROC)
{
return(pp_level);
}
next = chunk_get_next(pc);
... | false | false | false | false | false | 0 |
sendTiltSlew(void)
{
char buf[4];
if (myTiltSlewDesired > getMaxTiltSlew())
myTiltSlewDesired = getMaxTiltSlew();
if (myTiltSlewDesired < getMinTiltSlew())
myTiltSlewDesired = getMinTiltSlew();
if (myTiltSlewDesired != myTiltSlew)
{
ArLog::log(ArLog::Verbose,"ArVCC4::sendTiltSlew: sending tiltSl... | false | false | false | false | false | 0 |
GOUse_go_naga_brazier(Player* /*pPlayer*/, GameObject* pGo)
{
if (Creature* pCreature = GetClosestCreatureWithEntry(pGo, NPC_MUGLASH, INTERACTION_DISTANCE * 2))
{
if (npc_muglashAI* pEscortAI = dynamic_cast<npc_muglashAI*>(pCreature->AI()))
{
DoScriptText(SAY_MUG_BRAZIER_WAIT, pCreat... | false | false | false | false | false | 0 |
wil6210_irq_misc_thread(int irq, void *cookie)
{
struct wil6210_priv *wil = cookie;
u32 isr = wil->isr_misc;
trace_wil6210_irq_misc_thread(isr);
wil_dbg_irq(wil, "Thread ISR MISC 0x%08x\n", isr);
if (isr & ISR_MISC_FW_ERROR) {
wil_fw_core_dump(wil);
wil_notify_fw_error(wil);
isr &= ~ISR_MISC_FW_ERROR;
wi... | false | false | false | false | false | 0 |
dwarf_get_cie_augmentation_data(Dwarf_Cie cie,
Dwarf_Small ** augdata,
Dwarf_Unsigned * augdata_len,
Dwarf_Error * error)
{
if (cie == NULL) {
_dwarf_error(NULL, error, DW_DLE_CIE_NULL);
return (DW_DLV_ERROR);
}
if (cie->ci_gnu_eh_augmentation_len == 0) {
return DW_DLV_NO... | 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.