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 |
|---|---|---|---|---|---|---|
move_block(GtkScintilla *scintilla, gint indentation_size)
{
gint startline;
gint endline;
gint line;
gint indent;
startline = gtk_scintilla_line_from_position(scintilla, gtk_scintilla_get_selection_start(scintilla));
endline = gtk_scintilla_line_from_position(scintilla, gtk_scintilla_get_selection_end(sci... | false | false | false | false | false | 0 |
ListLogInfo(FILE *file,ExceptionInfo *exception)
{
#define MegabytesToBytes(value) ((MagickSizeType) (value)*1024*1024)
char
limit[MaxTextExtent];
const char
*path;
const LogInfo
**log_info;
register ssize_t
i;
size_t
number_aliases;
ssize_t
j;
if (file == (const FILE *) NUL... | true | true | false | false | false | 1 |
lock()
{
BOOST_ASSERT(m_impl != NULL);
record_view::private_data* const impl = static_cast< record_view::private_data* >(m_impl);
if (impl->is_detach_from_thread_needed())
{
attribute_value_set::const_iterator
it = impl->m_attribute_values.begin(),
end = impl->m_attribut... | false | false | false | false | false | 0 |
tp_tests_simple_channel_dispatcher_dispose (GObject *object)
{
TpTestsSimpleChannelDispatcher *self = SIMPLE_CHANNEL_DISPATCHER (object);
tp_clear_object (&self->priv->conn);
g_slist_foreach (self->priv->requests, (GFunc) g_object_unref, NULL);
g_slist_free (self->priv->requests);
g_free (self->priv->old_h... | false | false | false | false | false | 0 |
arout(char *s, int *v, int n)
{
int i;
Bprint(ftable, "static\tconst\tshort %s[] =\n{", s);
for(i = 0; i < n;) {
if(i%10 == 0)
Bprint(ftable, "\n");
Bprint(ftable, "%4d", v[i]);
i++;
if(i == n)
Bprint(ftable, "\n};\n");
else
Bprint(ftable, ",");
}
} | false | false | false | false | false | 0 |
gnutls_openpgp_privkey_export_subkey_rsa_raw (gnutls_openpgp_privkey_t pkey,
unsigned int idx,
gnutls_datum_t * m,
gnutls_datum_t * e,
g... | false | false | false | false | false | 0 |
prefs_account_select_folder_cb(GtkWidget *widget, gpointer data)
{
FolderItem *item;
gchar *id;
item = foldersel_folder_sel(NULL, FOLDER_SEL_COPY, NULL, FALSE);
if (item && item->path) {
id = folder_item_get_identifier(item);
if (id) {
gtk_entry_set_text(GTK_ENTRY(data), id);
g_free(id);
}
}
} | false | false | false | false | false | 0 |
__ecereNameSpace__ecere__gfx__drivers__hb_getAdvances(HB_Font font, const HB_Glyph * glyphs, unsigned int numGlyphs, HB_Fixed * advances, int flags)
{
struct __ecereNameSpace__ecere__gfx__drivers__FontEntry * entry = (*font).userData;
struct __ecereNameSpace__ecere__gfx__drivers__Font * glFont = entry->font;
int c;
uns... | false | false | false | false | false | 0 |
GetWaveYPos(float value, float min, float max,
int height, bool dB, bool outer,
float dBr, bool clip)
{
if (dB) {
if (height == 0) {
return 0;
}
float sign = (value >= 0 ? 1 : -1);
if (value != 0.) {
float db = 20.0 * log10(fabs(value));
... | false | false | false | false | false | 0 |
url_datpath()
{
if( empty() ) return std::string();
return "/bbs/read.cgi?BBS=" + get_id() + "&KEY=";
} | false | false | false | false | false | 0 |
HackPath(const Glib::ustring &path)
{
const char *bad[] = { "[0]", "[1]", "[2]", "[3]", "[4]",
"[5]", "[6]", "[7]", "[8]", "[9]" };
const char *good[] = { "[00]", "[01]", "[02]", "[03]", "[04]",
"[05]", "[06]", "[07]", "[08]", "[09]" };
Glib::ustring p = path;
// strip off the ending "text()"
size_t pos ... | false | false | false | false | false | 0 |
draw_grid_layer (glView *view,
cairo_t *cr)
{
const lglTemplate *template;
gboolean rotate_flag;
const lglTemplateFrame *frame;
gdouble w, h;
gdouble x, y;
gdouble x0, y0;
gl_debug (DEBUG_VIEW, ... | false | false | false | false | false | 0 |
saveToHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags) const {
BOOL bSuccess = FALSE;
if(_mpage) {
bSuccess = FreeImage_SaveMultiBitmapToHandle(fif, _mpage, io, handle, flags);
}
return bSuccess;
} | false | false | false | false | false | 0 |
cleanup(char *context)
{
int fd;
int err_save;
int cmdn = 0;
char **cmdv = NULL;
char file[LAM_PATH_MAX];
err_save = errno;
if (context != NULL)
printf(context);
if (NULL != new_hostname) {
sfh_argv_add(&cmdn, &cmdv, DEFTWIPE);
if (fl_debug)
sfh_argv_add(&cmdn, &cmdv, "-d");
if (... | true | true | false | false | true | 1 |
plLineFollowMod()
: fFollowMode(kFollowObject), fFollowFlags(0), fPath(NULL),
fOffset(0.0f), fOffsetClamp(0.0f), fSpeedClamp(0.0f) { } | false | false | false | false | false | 0 |
populateSplitBlock(Block *b, Variable* v, Variable const* u) {
b->addVariable(v);
for (Cit c=v->in.begin();c!=v->in.end();++c) {
if (canFollowLeft(*c,u))
populateSplitBlock(b, (*c)->left, v);
}
for (Cit c=v->out.begin();c!=v->out.end();++c) {
if (canFollowRight(*c,u))
... | false | false | false | false | false | 0 |
process_post(char * data, size_t data_len)
{
char buf[0x10000] = {0};
size_t data_off = 0;
char * ptr = NULL;
// Ensure data is semi-safe for ANSI-C
if (data[data_len]) {
// not null terminated
return -1;
}
// Setup the form object
struct form_sub_t * form = calloc(1, sizeof(struct form_sub_t));
if (!f... | true | true | false | false | false | 1 |
beforeClosing(bool showCancel, bool & discard) {
discard = false;
if (anyModified()) {
QMessageBox::StandardButton reply = beforeClosingMessage(m_fwFilename, showCancel);
if (reply == QMessageBox::Save) {
return save();
}
else if (reply == QMessageBox::Discard) {
discard = true;
retur... | false | false | false | false | false | 0 |
p_avl(Avl_node p, int level)
{
int i;
if (p == NULL) {
for (i = 0; i < level; i++)
printf(" ");
printf("----\n");
}
else {
p_avl(p->right, level+1);
for (i = 0; i < level; i++)
printf(" ");
printf("%4d\n", (int) p->item);
p_avl(p->left, level+1);
}
} | false | false | false | false | false | 0 |
displayPrimSkill()
{
_primSkill = new AskCombo( tr( "Primary skill: " ), this );
_primSkill->insertItem( tr( "Attack" ) );
_primSkill->insertItem( tr( "Defense" ) );
_primSkill->insertItem( tr( "Power" ) );
_primSkill->insertItem( tr( "Knowledge" ) );
_primSkill->insertItem( tr( "Morale" ) );
_primSkill->insertI... | false | false | false | false | false | 0 |
state_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
char *s = buf;
#ifdef CONFIG_SUSPEND
suspend_state_t i;
for (i = PM_SUSPEND_MIN; i < PM_SUSPEND_MAX; i++)
if (pm_states[i])
s += sprintf(s,"%s ", pm_states[i]);
#endif
if (hibernation_available())
s += sprintf(s, "disk ");
if ... | false | false | false | false | false | 0 |
cmd_set_zip_out_level(struct ctrl_command *cmd)
{
#ifdef HAVE_LIBZ
out_state.zip_state.level = *cmd->data;
if ((out_state.zip_state.level < -1) ||
(out_state.zip_state.level > 9))
send_error("invalid compression level %d",
out_state.zip_state.level);
#else
send_error("can't set compressio... | false | false | false | false | false | 0 |
db__driver_open_database(dbHandle * handle)
{
const char *name;
dbConnection connection;
init_error();
db_get_connection(&connection);
name = db_get_handle_dbname(handle);
/* if name is empty use connection.databaseName */
if (strlen(name) == 0)
name = connection.databaseName;
G_debu... | false | false | false | false | false | 0 |
setUrlEditable(bool editable)
{
if (d->m_editable != editable) {
d->switchView();
}
} | false | false | false | false | false | 0 |
radeon_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
struct radeon_context *radeon = RADEON_CONTEXT(ctx);
struct radeon_renderbuffer *rrb = radeon_renderbuffer(rb... | false | false | false | false | false | 0 |
parse_cachedir_options(SwapDir * sd, struct cache_dir_option *options, int reconfiguring)
{
int old_read_only = sd->flags.read_only;
char *name, *value;
struct cache_dir_option *option, *op;
while ((name = strtok(NULL, w_space)) != NULL) {
value = strchr(name, '=');
if (value)
*value++ = '\0'; /... | false | false | false | true | false | 1 |
safe_malloc (unsigned int siz)
{
void *p;
if (siz == 0)
return 0;
if ((p = (void *) malloc (siz)) == 0)
{
perror ("Out of memory!");
sleep (1);
exit (1);
}
return (p);
} | false | false | false | false | false | 0 |
icmp_rx_echo_reply ( struct io_buffer *iobuf,
struct sockaddr_tcpip *st_src ) {
struct icmp_echo *echo = iobuf->data;
int rc;
/* Sanity check */
if ( iob_len ( iobuf ) < sizeof ( *echo ) ) {
DBGC ( icmpcol ( st_src ), "ICMP RX echo reply too short at "
"%zd bytes (min %zd bytes)\n",
iob_len... | false | false | false | false | false | 0 |
spputc(register stream * s, byte b)
{
for (;;) {
if (s->end_status)
return s->end_status;
if (!sendwp(s)) {
*++(s->swptr) = b;
return b;
}
s_process_write_buf(s, false);
}
} | false | false | false | false | false | 0 |
GetBoilerplateValue(Expression* expression) {
if (expression->AsLiteral() != NULL) {
return expression->AsLiteral()->handle();
}
if (CompileTimeValue::IsCompileTimeValue(expression)) {
return CompileTimeValue::GetValue(expression);
}
return Factory::undefined_value();
} | false | false | false | false | false | 0 |
bt_ctf_stream_set_fd(struct bt_ctf_stream *stream, int fd)
{
int ret = 0;
if (stream->pos.fd != -1) {
ret = -1;
goto end;
}
ctf_init_pos(&stream->pos, NULL, fd, O_RDWR);
stream->pos.fd = fd;
end:
return ret;
} | false | false | false | false | false | 0 |
OnMouseWheelInHtmlWindowEvent(wxMouseEvent& event)
// ----------------------------------------------------------------------------
{
// This routines does a font zoom when the user uses ctrl-wheelmouse
// on one of our monitored html windows
//-Debugging: to verify we're getting the right window
//-con... | false | false | false | false | false | 0 |
per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min)
{
int i;
int mlength;
mlength = (length - min >= 0) ? length - min : min;
per_write_length(s, mlength);
for (i = 0; i < length; i++)
stream_write_uint8(s, oct_str[i]);
} | false | false | false | false | false | 0 |
gnm_solver_stop (GnmSolver *sol, GError **err)
{
gboolean res;
g_return_val_if_fail (GNM_IS_SOLVER (sol), FALSE);
g_signal_emit (sol, solver_signals[SOL_SIG_STOP], 0, err, &res);
return res;
} | false | false | false | false | false | 0 |
getIntegerValue (const std::string §ion,
const std::string &name,
int defaultValue)
{
const std::string notFoundString ("0xdeadbeef");
std::string stringValue = getStringValue (section, name, notFoundString);
if ( notFoundString != stringValue ... | false | false | false | false | false | 0 |
sierra_net_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{
int err;
struct hip_hdr hh;
struct sk_buff *new_skb;
dev_dbg(&dev->udev->dev, "%s", __func__);
/* could contain multiple packets */
while (likely(skb->len)) {
err = parse_hip(skb->data, skb->len, &hh);
if (err) {
if (netif_msg_rx_err(dev))
... | false | true | false | false | false | 1 |
SCR_FinishCinematic (void)
{
if( cls.state < ca_connected || cls.demoplaying )
return;
// tell the server to advance to the next map / cinematic
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
SZ_Print (&cls.netchan.message, va("nextserver %i\n", cl.servercount));
} | false | false | false | false | false | 0 |
L6__LOCAL_FINISH__sloop()
{register object *base=vs_base;
register object *sup=base+VM6; VC6
vs_check;vs_top=sup;
base[2]= ((object)VV[23]);
vs_top=(vs_base=base+2)+1;
return;
} | false | false | false | false | false | 0 |
LA(int i)
{
if ( caseSensitive ) {
return inputState->getInput().LA(i);
} else {
return toLower(inputState->getInput().LA(i));
}
} | false | false | false | false | false | 0 |
elm_layout_part_cursor_set(Evas_Object *obj,
const char *part_name,
const char *cursor)
{
ELM_LAYOUT_CHECK(obj) EINA_FALSE;
ELM_LAYOUT_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(part_name, EINA_FALSE);
Evas_Object *part_... | false | false | false | false | false | 0 |
monkey_samples_per_frame(unsigned int versionid, unsigned int compressionlevel)
{
if (versionid >= 3950) {
return 294912; // 73728 * 4
} else if (versionid >= 3900) {
return 73728;
} else if ((versionid >= 3800) && (compressionlevel == COMPRESSION_LEVEL_EXTRA_HIGH)) {
return 73728;
... | false | false | false | false | false | 0 |
InitOutdoorPvP()
{
uint8 counter = 0;
LOAD_OPVP_ZONE(SI);
LOAD_OPVP_ZONE(EP);
LOAD_OPVP_ZONE(HP);
LOAD_OPVP_ZONE(ZM);
LOAD_OPVP_ZONE(TF);
LOAD_OPVP_ZONE(NA);
LOAD_OPVP_ZONE(GH);
sLog.outString();
sLog.outString(">> Loaded %u Outdoor PvP zones", counter);
} | false | false | false | false | false | 0 |
build_crc(struct ezusb_packet *data)
{
u16 crc = 0;
u8 *bytes = (u8 *)data;
int i;
for (i = 0; i < 8; i++)
crc = (crc << 1) + bytes[i];
return crc;
} | false | false | false | false | false | 0 |
safe_strtoll(const char *str, long long *val)
{
long long v;
int endidx;
if (!*str)
return -EINVAL;
errno = 0;
if (sscanf(str, "%lli%n", &v, &endidx) < 1)
return -EINVAL;
if (str[endidx])
return -EINVAL;
*val = v;
return 0;
} | false | false | false | false | false | 0 |
ACE_SSL_Asynch_Write_Stream_Result
(ACE_Handler & handler,
ACE_HANDLE handle,
ACE_Message_Block & message_block,
size_t bytes_to_write,
const void * act,
ACE_HANDLE event,
int priority,
int signal_number
)
: AWS_RESULT... | false | false | false | false | false | 0 |
gt_bittab_new(unsigned long num_of_bits)
{
GtBittab *b;
gt_assert(num_of_bits != 0);
b = gt_malloc(sizeof (GtBittab));
b->num_of_bits = num_of_bits;
if (num_of_bits / (8UL * sizeof (unsigned long)))
b->tabsize = 1 + ((num_of_bits - 1) / (8UL * sizeof (unsigned long)));
else
b->tabsize = 1UL;
b... | false | false | false | false | false | 0 |
Remove(Interactor* i) {
i->parent = nil;
if (i->insert_window != nil) {
delete i->insert_window;
i->insert_window = nil;
i->managed_window = nil;
}
if (i->window != nil) {
/* implicit i->Orphan() from InteractorWindow::unbind */
i->window->unbind();
i->Deactivate();
}
} | false | false | false | false | false | 0 |
init_pixmaps (struct state *st)
{
int i;
XGCValues gcv;
GC fg_gc = 0, bg_gc = 0;
st->pixmaps [0] = st->pixmaps [1] = 0;
for (i = MIN_DEPTH; i < MAX_SIZE; i++)
{
int w = (1+(i/32))<<5; /* server might be faster if word-aligned */
int h = i;
Pixmap p = XCreatePixmap (st->dpy, st->window, w... | false | false | false | false | false | 0 |
InvertCase(std::string &s, unsigned int start)
{
if (start >= s.size())
return;
unsigned int i;
for (i = start; i < s.size();++i)
if (isalpha(s[i]) && !isdigit(s[i])) {
if (isupper(s[i])) s[i] = tolower(s[i]);
else s[i] = toupper(s[i]);
}
} | false | false | false | false | false | 0 |
flmRcaCleanupCache(
FLMUINT uiMaxLockTime,
FLMBOOL bMutexesLocked)
{
RCACHE * pTmpRCache;
RCACHE * pPrevRCache;
RCACHE * pNextRCache;
FLMUINT uiRecordsExamined = 0;
FLMUINT uiLastTimePaused = FLM_GET_TIMER();
FLMUINT uiCurrTime;
FLMBOOL bUnlockMutexes = FALSE;
if( !bMutexesLocked)
{
f_mu... | false | false | false | false | false | 0 |
zd1201_set_mode(struct net_device *dev,
struct iw_request_info *info, __u32 *mode, char *extra)
{
struct zd1201 *zd = netdev_priv(dev);
short porttype, monitor = 0;
unsigned char buffer[IW_ESSID_MAX_SIZE+2];
int err;
if (zd->ap) {
if (*mode != IW_MODE_MASTER)
return -EINVAL;
return 0;
}
err = zd1201... | true | true | false | false | false | 1 |
get_real_temp(float temperature, char **scale, int temp_units)
{
double real_temp = (double) temperature;
switch (temp_units) {
case TEMP_CELSIUS:
*scale = "degrees C";
break;
case TEMP_FAHRENHEIT:
real_temp = (real_temp * 1.8) + 32;
*scale = "degrees F";
break;
case TEMP_KELVIN:
default... | false | false | false | false | false | 0 |
GWEN_Text_EscapeToBufferTolerant(const char *src, GWEN_BUFFER *buf) {
while(*src) {
unsigned char x;
x=(unsigned char)*src;
if (!(
(x>='A' && x<='Z') ||
(x>='a' && x<='z') ||
(x>='0' && x<='9') ||
x==' ' ||
x=='.' ||
x==',' ||
x=='.' |... | false | false | false | false | true | 1 |
UT_go_set_file_permissions (char const *uri, UT_GOFilePermissions * file_permissions)
{
#if defined (GOFFICE_WITH_GNOME)
GnomeVFSFileInfo *file_info;
GnomeVFSResult result;
file_info = gnome_vfs_file_info_new ();
file_info->permissions = (GnomeVFSFilePermissions)0;
/* Set owner permissions */
if (file_pe... | false | false | false | false | false | 0 |
ExifRotate(const char * fname, int new_angle)
{
int fail = FALSE;
int exif_angle = 0;
int a;
if(new_angle == 0)
return TRUE;
// use jhead functions
ResetJpgfile();
// Start with an empty image information structure.
memset(&ImageInfo, 0, sizeof(ImageInfo));
if (!Rea... | false | false | false | false | true | 1 |
clutter_actor_set_child_at_index (ClutterActor *self,
ClutterActor *child,
gint index_)
{
g_return_if_fail (CLUTTER_IS_ACTOR (self));
g_return_if_fail (CLUTTER_IS_ACTOR (child));
g_return_if_fail (child->priv->parent == self);
g_return... | false | false | false | false | false | 0 |
arcrimi_copy_from_card(struct net_device *dev, int bufnum,
int offset, void *buf, int count)
{
struct arcnet_local *lp = netdev_priv(dev);
void __iomem *memaddr = lp->mem_start + 0x800 + bufnum * 512 + offset;
TIME(dev, "memcpy_fromio", count, memcpy_fromio(buf, memaddr, count));
} | false | false | false | false | false | 0 |
copystrarray(dest, src, ndestp, nsrc)
char **dest, *CONST *src;
int *ndestp, nsrc;
{
int i;
if (dest != src) freestrarray(dest, (ndestp) ? *ndestp : nsrc);
if (nsrc <= 0) /*EMPTY*/;
# ifndef DEP_DYNAMICLIST
else if (dest) /*EMPTY*/;
# endif
else dest = (char **)Xrealloc(dest, nsrc * sizeof(*dest));
for (i = 0; i... | false | false | false | false | false | 0 |
bc_add_inner_classes_attr(JVM_CLASS *class, char *inner_class,
char *outer_class, char *inner_name, int acc_flags)
{
struct InnerClassEntry *entry;
JVM_ATTRIBUTE *attr;
int c;
char *t;
if(!class) {
BAD_ARG();
return -1;
}
attr = find_attribute(class, class->attributes, "InnerClasses");
if(!... | false | false | false | false | false | 0 |
xmmsv_dict_free (xmmsv_dict_t *dict)
{
xmmsv_dict_iter_t *it;
/* free iterators */
while (dict->iterators) {
it = (xmmsv_dict_iter_t *) dict->iterators->data;
xmmsv_dict_iter_free (it);
}
xmmsv_list_free (dict->flatlist);
free (dict);
} | false | false | false | false | true | 1 |
AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no)
{
ushort q_addr;
uchar tid_no;
uchar sdtr_data;
uchar syn_period_ix;
uchar syn_offset;
PortAddr iop_base;
iop_base = asc_dvc->iop_base;
if (((asc_dvc->init_sdtr & scsiq->q1.target_id) != 0) &&
((asc_dvc->sdtr_done & scsiq->q1.target_id)... | false | false | false | false | false | 0 |
totem_fullscreen_parent_window_notify (GtkWidget *parent_window,
GParamSpec *property,
TotemFullscreen *fs)
{
GtkWidget *popup;
if (totem_fullscreen_is_fullscreen (fs) == FALSE)
return;
popup = gtk_scale_button_get_popup (GTK_SCALE_BUTTON (fs->volume));
if (parent_window == fs->priv->paren... | false | false | false | false | false | 0 |
cc_register (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
return (GET_CODE (op) == REG) && ((
#line 303 "../../src/gcc/config/arm/predicates.md"
(REGNO (op) == CC_REGNUM)) && ((
#line 304 "../../src/gcc/config/arm/predicates.md"
(mode == GET_MODE (op))) || (
#line 305 "../../src/gcc/config/arm/predicates.md"
(m... | false | false | false | false | false | 0 |
ctor(QScriptContext *ctx, QScriptEngine *)
{
return ctx->throwError("QGraphicsItem cannot be instantiated");
} | false | false | false | false | false | 0 |
up_device_supply_get_on_battery (UpDevice *device, gboolean *on_battery)
{
UpDeviceSupply *supply = UP_DEVICE_SUPPLY (device);
UpDeviceKind type;
UpDeviceState state;
gboolean is_power_supply;
gboolean is_present;
g_return_val_if_fail (UP_IS_DEVICE_SUPPLY (supply), FALSE);
g_return_val_if_fail (on_battery != NU... | false | false | false | false | false | 0 |
pcan_usb_pro_set_bus(struct peak_usb_device *dev, u8 onoff)
{
struct pcan_usb_pro_msg um;
/* if bus=on, be sure the bitrate being set before! */
if (onoff) {
struct pcan_usb_pro_device *pdev =
container_of(dev, struct pcan_usb_pro_device, dev);
pcan_usb_pro_set_bitrate(dev, pdev->cached_ccbt);
}
pca... | false | false | false | false | false | 0 |
fimc_hw_get_frame_index(struct fimc_dev *dev)
{
s32 reg;
if (dev->drv_data->cistatus2) {
reg = readl(dev->regs + FIMC_REG_CISTATUS2) & 0x3f;
return reg - 1;
}
reg = readl(dev->regs + FIMC_REG_CISTATUS);
return (reg & FIMC_REG_CISTATUS_FRAMECNT_MASK) >>
FIMC_REG_CISTATUS_FRAMECNT_SHIFT;
} | false | false | false | false | false | 0 |
paintEvent(QPaintEvent *ev)
{
QTextEdit::paintEvent(ev);
if (!d->clickMessage.isEmpty() && document()->isEmpty()) {
QPainter p(viewport());
QFont f = font();
f.setItalic(d->italicizePlaceholder);
p.setFont(f);
QColor color(palette().color(viewport()->foregroundRole()))... | false | false | false | false | false | 0 |
assert_user_dir ()
{
GDir *dh;
dh = g_dir_open (main_path_user (), 0, NULL);
if (dh == NULL)
{
g_message ("creating an empty user folder:\n %s", main_path_user ());
g_mkdir (main_path_user (), DIR_PERM);
dh = g_dir_open (main_path_user (), 0, NULL);
if (dh == NULL)
g_error ("could not creat a user folde... | false | false | false | false | false | 0 |
remove_chain (
FATFS *fs, /* File system object */
DWORD clst /* Cluster# to remove a chain from */
) {
FRESULT res;
DWORD nxt;
#if _USE_ERASE
DWORD scl = clst, ecl = clst, resion[2];
#endif
if (clst < 2 || clst >= fs->n_fatent) { /* Check range */
res = FR_INT_ERR;
} else {
res = FR_OK;
while (clst ... | false | false | false | false | false | 0 |
reset()
{
/* start over with the first block */
block_cur_ = block_head_;
/* initialize the free pointer for the new block, if we have one */
if (block_cur_ != 0)
{
/* start at the beginning of the new block */
cur_free_ = block_cur_->buf_;
... | false | false | false | false | false | 0 |
array_type_to_sql (GdaMetaStore *store, const GValue *specific_name)
{
gchar *str;
GdaDataModel *model;
gint nrows;
const GValue *cvalue;
if (!specific_name || gda_value_is_null (specific_name))
return g_strdup ("[]");
model = gda_meta_store_extract (store, "SELECT data_type, array_spec FROM _element_types ... | false | false | false | false | false | 0 |
dicod_log_pre_setup()
{
char *str = getenv(DICTD_LOGGING_ENVAR);
if (str) {
char *p;
log_facility = strtoul(str, &p, 10);
if (*p == ':') {
log_print_severity = strtoul(p + 1, &p, 10);
if (*p == ':')
log_tag = p + 1;
}
log_to_stderr = 0;
dicod_log_setup();
}
} | false | false | false | false | true | 1 |
bond_all()
{
int i,m,atom1;
int nlocal = atom->nlocal;
int *num_bond = atom->num_bond;
int **bond_atom = atom->bond_atom;
int **bond_type = atom->bond_type;
int *tag = atom->tag;
int newton_bond = force->newton_bond;
nbondlist = 0;
for (i = 0; i < nlocal; i++)
for (m = 0; m < num_bond[i]; m++) ... | false | false | false | false | false | 0 |
mqtt3_db_message_store_find(struct mosquitto *context, uint16_t mid, struct mosquitto_msg_store **stored)
{
struct mosquitto_client_msg *tail;
if(!context) return MOSQ_ERR_INVAL;
*stored = NULL;
tail = context->msgs;
while(tail){
if(tail->store->source_mid == mid && tail->direction == mosq_md_in){
*stored =... | false | false | false | false | false | 0 |
print_alg(private_proposal_t *this, printf_hook_data_t *data,
u_int kind, void *names, bool *first)
{
enumerator_t *enumerator;
size_t written = 0;
u_int16_t alg, size;
enumerator = create_enumerator(this, kind);
while (enumerator->enumerate(enumerator, &alg, &size))
{
if (*first)
{
written += print... | false | false | false | false | false | 0 |
cnt_deliver(struct sess *sp)
{
struct worker *wrk;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
wrk = sp->wrk;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
AZ(sp->wrk->busyobj);
sp->director = NULL;
sp->restarts = 0;
RES_WriteObj(sp);
assert(WRW_IsReleased(wrk));
assert(wrk->wrw.ciov == wrk->wrw.siov);
(void)HSH_Deref(wr... | false | false | false | false | false | 0 |
bmc150_magn_trigger_handler(int irq, void *p)
{
struct iio_poll_func *pf = p;
struct iio_dev *indio_dev = pf->indio_dev;
struct bmc150_magn_data *data = iio_priv(indio_dev);
int ret;
mutex_lock(&data->mutex);
ret = bmc150_magn_read_xyz(data, data->buffer);
if (ret < 0)
goto err;
iio_push_to_buffers_with_tim... | false | false | false | false | false | 0 |
CheckTable(struct GPTHeader *header) {
uint32_t sizeOfParts, newCRC;
GPTPart *partsToCheck;
GPTHeader *otherHeader;
int allOK = 0;
// Load partition table into temporary storage to check
// its CRC and store the results, then discard this temporary
// storage, since we don't use it in any but reco... | false | false | false | false | false | 0 |
test(char *URL)
{
int res;
CURLSHcode scode = CURLSHE_OK;
char *url;
struct Tdata tdata;
CURL *curl;
CURLSH *share;
int i;
struct userdata user;
user.text = (char *)"Pigs in space";
user.counter = 0;
printf( "GLOBAL_INIT\n" );
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(st... | false | false | false | false | false | 0 |
getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, PropertyMap::PropertyMode mode)
{
// FIXME: Filling PropertyNameArray with an identifier for every integer
// is incredibly inefficient for large arrays. We need a different approach.
ArrayStorage* storage = m_storage;
unsigned use... | false | false | false | false | false | 0 |
find_conversation_by_pid (GdmSession *self,
GPid pid)
{
GHashTableIter iter;
gpointer key, value;
g_hash_table_iter_init (&iter, self->priv->conversations);
while (g_hash_table_iter_next (&iter, &key, &value)) {
GdmSessionConversation *co... | false | false | false | false | false | 0 |
ExplicitHydrogenCount(bool ExcludeIsotopes) const
{
//If ExcludeIsotopes is true, H atoms with _isotope!=0 are not included.
//This excludes D, T and H when _isotope exlicitly set to 1 rather than the default 0.
int numH=0;
OBAtom *atom;
OBBondIterator i;
for (atom = ((OBAtom*)this)->BeginNbrA... | false | false | false | false | false | 0 |
obj_tpm_get_cb12(TSS_HTPM hTpm, TSS_FLAG flag, UINT32 *size, BYTE **out)
{
struct tsp_object *obj;
struct tr_tpm_obj *tpm;
TSS_RESULT result = TSS_SUCCESS;
TSS_CALLBACK *cb;
if ((obj = obj_list_get_obj(&tpm_list, hTpm)) == NULL)
return TSPERR(TSS_E_INVALID_HANDLE);
tpm = (struct tr_tpm_obj *)obj->data;
if (... | false | false | false | false | false | 0 |
runPassPipeline(StringRef Arg0, LLVMContext &Context, Module &M,
TargetMachine *TM, tool_output_file *Out,
StringRef PassPipeline, OutputKind OK,
VerifierKind VK,
bool ShouldPreserveAssemblyUseListOrder,
... | false | false | false | false | false | 0 |
cm36651_setup_reg(struct cm36651_data *cm36651)
{
struct i2c_client *client = cm36651->client;
struct i2c_client *ps_client = cm36651->ps_client;
int i, ret;
/* CS initialization */
cm36651->cs_ctrl_regs[CM36651_CS_CONF1] = CM36651_ALS_ENABLE |
CM36651_ALS_THRES;
cm36651->cs_ctrl_regs[CM36651_CS_CONF... | false | false | false | false | false | 0 |
sis190_tx_pkt_err(u32 status, struct net_device_stats *stats)
{
#define TxErrMask (WND | TABRT | FIFO | LINK)
if (!unlikely(status & TxErrMask))
return 0;
if (status & WND)
stats->tx_window_errors++;
if (status & TABRT)
stats->tx_aborted_errors++;
if (status & FIFO)
stats->tx_fifo_errors++;
if (status & ... | false | false | false | false | false | 0 |
HyphobFunction5_ (double *f5minP, double *f5maxP, RuntimeS *runtimeSP)
{
int residuesN, residueI; /* Do not use size_t instead of int ! */
int max_length;
char *residue_nameP;
char residue_nameA[RESNAMESIZE];
double f1, f1min, f1max, f1before;
double f2, f2min, f2max, f2before;
double f3, f3min, f3max, f3befor... | true | true | false | false | false | 1 |
ResolveMSCYK(CM_TOPHITS *initial, int i0, int j0, int W, float cutoff) {
int x, y, i, j;
int included;
CM_TOPHITS *merged = NULL;
CM_HIT *hit = NULL;
merged = cm_tophits_Create();
for (x = 0; x < initial->N; x++) {
i = initial->unsrt[x].start;
j = initial->unsrt[x].stop;
included = 0;
i... | false | false | false | false | false | 0 |
find_prefix(const char *name)
{
struct isns_tag_prefix *p;
unsigned int i;
for (i = 0, p = all_prefixes; i < __ISNS_OBJECT_TYPE_MAX; ++i, ++p) {
if (p->name && !strncmp(name, p->name, p->name_len))
return p;
}
return NULL;
} | false | false | false | false | false | 0 |
strfree (const char *string)
/*
This routine is called by the user to "free" a string. In reality, it will
search the hash table for an entry corresponding to string. If it finds one,
it will decrement the reference count. It is an error if there is no entry
for string, which implies that at some point a point... | false | false | false | false | false | 0 |
dircheck(PyFileObject* f)
{
#if defined(HAVE_FSTAT) && defined(S_IFDIR) && defined(EISDIR)
struct stat buf;
if (f->f_fp == NULL)
return f;
if (fstat(fileno(f->f_fp), &buf) == 0 &&
S_ISDIR(buf.st_mode)) {
char *msg = strerror(EISDIR);
PyObject *exc = PyObject_CallFunction(PyEx... | false | false | false | false | false | 0 |
kvm_get_dr(struct kvm_vcpu *vcpu, int dr, unsigned long *val)
{
switch (dr) {
case 0 ... 3:
*val = vcpu->arch.db[dr];
break;
case 4:
/* fall through */
case 6:
if (vcpu->guest_debug & KVM_GUESTDBG_USE_HW_BP)
*val = vcpu->arch.dr6;
else
*val = kvm_x86_ops->get_dr6(vcpu);
break;
case 5:
/* fall t... | false | false | false | false | false | 0 |
gen_tmp_stack_mem (enum machine_mode mode, rtx addr)
{
rtx mem = gen_rtx_MEM (mode, addr);
MEM_NOTRAP_P (mem) = 1;
if (!cfun->calls_alloca)
set_mem_alias_set (mem, get_frame_alias_set ());
return mem;
} | false | false | false | false | false | 0 |
af_nodelta (busykey, savekey)
Af_key *busykey;
Af_key *savekey;
{
register FILE *busyfile;
VATTR(savekey).af_fsize = af_retfsize (busykey->af_ldes->af_busyfilename);
VATTR(savekey).af_dsize = 0;
VATTR(savekey).af_repr = AF_CHUNK;
if ((VATTR(savekey).af_data = af_malloc (savekey->af_ldes, (unsigne... | false | false | false | false | true | 1 |
elm_notify_timeout_set(Evas_Object *obj,
double timeout)
{
ELM_NOTIFY_CHECK(obj);
ELM_NOTIFY_DATA_GET(obj, sd);
sd->timeout = timeout;
_timer_init(obj, sd);
} | false | false | false | false | false | 0 |
check_alert (gnutls_session_t session, int ret)
{
if (ret == GNUTLS_E_WARNING_ALERT_RECEIVED
|| ret == GNUTLS_E_FATAL_ALERT_RECEIVED)
{
int last_alert = gnutls_alert_get (session);
if (last_alert == GNUTLS_A_NO_RENEGOTIATION &&
ret == GNUTLS_E_WARNING_ALERT_RECEIVED)
printf
... | false | false | false | false | false | 0 |
parsereq(register const struct sunrpc_msg *rp, register u_int length)
{
register const u_int32_t *dp;
register u_int len;
/*
* find the start of the req data (if we captured it)
*/
dp = (u_int32_t *)&rp->rm_call.cb_cred;
TCHECK(dp[1]);
len = EXTRACT_32BITS(&dp[1]);
if (len < length) {
dp += (len + (2 * si... | false | false | false | false | false | 0 |
between_variance (panelmod_t *pan, DATASET *gset)
{
gretlopt bopt;
MODEL bmod;
int *blist;
int i, j, k;
int err = 0;
blist = gretl_list_new(gset->v);
if (blist == NULL) {
return E_ALLOC;
}
j = k = 1;
for (i=1; i<=gset->v; i++) {
if (pan->pooled->list[i] == 0) {
blist[k+... | false | false | false | false | false | 0 |
cmos_do_shutdown(int rtc_irq)
{
spin_lock_irq(&rtc_lock);
if (is_valid_irq(rtc_irq))
cmos_irq_disable(&cmos_rtc, RTC_IRQMASK);
spin_unlock_irq(&rtc_lock);
} | 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.