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
get_signals(SLMP_INFO *info) { u16 status = read_reg(info, SR3); u16 gpstatus = read_status_reg(info); u16 testbit; /* clear all serial signals except RTS and DTR */ info->serial_signals &= SerialSignal_RTS | SerialSignal_DTR; /* set serial signal bits to reflect MISR */ if (!(status & BIT3)) info->serial_s...
false
false
false
false
false
0
_map_size( char *buf ) { long b_size; char *end_ptr; b_size = strtol(buf, &end_ptr, 10); if ((b_size == LONG_MIN) || (b_size == LONG_MAX) || (b_size < 0)) { fprintf(stderr, "size specification is invalid, ignored\n"); b_size = 0; } else if (end_ptr[0] == '\0') ; else if ((end_ptr[0] == 'k') || (end_ptr[...
false
false
false
false
false
0
tableInsert(table_t *table, const char *key, int value) { const int v = tableFind(table, key); if(v > 0) /* duplicate key */ return (v == value) ? value : -1; /* allow real dups */ assert(value != -1); /* that would confuse us */ if(table->tableHead == NULL) table->tableLast = table->tableHead = (tableEntry ...
false
false
false
false
false
0
posix_confstr(PyObject *self, PyObject *args) { PyObject *result = NULL; int name; char buffer[255]; int len; if (!PyArg_ParseTuple(args, "O&:confstr", conv_confstr_confname, &name)) return NULL; errno = 0; len = confstr(name, buffer, sizeof(buffer)); if (len == 0) { if...
false
false
false
false
false
0
set_line_numbers(ScintillaObject * sci, gboolean set) { if (set) { gchar tmp_str[15]; gint len = scintilla_send_message(sci, SCI_GETLINECOUNT, 0, 0); gint width; g_snprintf(tmp_str, 15, "_%d", len); width = scintilla_send_message(sci, SCI_TEXTWIDTH, STYLE_LINENUMBER, (sptr_t) tmp_str); scintilla_send_mes...
false
false
false
false
false
0
gplotAddPlot(GPLOT *gplot, NUMA *nax, NUMA *nay, l_int32 plotstyle, const char *plottitle) { char buf[L_BUF_SIZE]; char emptystring[] = ""; char *datastr, *title; l_int32 n, i; l_float32 valx, valy, startx, delx; SARRAY ...
true
true
false
false
false
1
ms_uid(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { struct Client *target_p; time_t newts = 0; newts = atol(parv[3]); if(parc != 10) { sendto_realops_flags(UMODE_ALL, L_ALL, "Dropping server %s due to (invalid) command 'UID' " "with %d arguments (expecting...
false
false
false
false
true
1
srtp_stream_init_from_ekt(srtp_stream_t stream, const void *srtcp_hdr, unsigned pkt_octet_len) { err_status_t err; const uint8_t *master_key; srtp_policy_t srtp_policy; uint32_t roc; /* * NOTE: at present, we only support a single ekt_policy at a time. */ if (stream->ekt->data->spi !...
false
false
false
false
false
0
print_bm(struct BM *bm) { int i, j; for (i = 0; i < bm->rows; i++) { for (j = 0; j < bm->cols; j++) { fprintf(stderr, "%d ", BM_get(bm, j, i)); } fprintf(stderr, "\n"); } return; }
false
false
false
false
false
0
config_setting_get_string(const config_setting_t *setting) { return((setting->type == CONFIG_TYPE_STRING) ? setting->value.sval : NULL); }
false
false
false
false
false
0
bl_alloc_init_bio(int npg, struct block_device *bdev, sector_t disk_sector, bio_end_io_t end_io, struct parallel_io *par) { struct bio *bio; npg = min(npg, BIO_MAX_PAGES); bio = bio_alloc(GFP_NOIO, npg); if (!bio && (current->flags & PF_MEMALLOC)) { while (!bio && (npg /= 2)) bio = bio_alloc(GFP_NOIO, npg);...
false
false
false
false
false
0
stats_ziplinks (struct Client *source_p) { rb_dlink_node *ptr; struct Client *target_p; struct ZipStats *zipstats; int sent_data = 0; char buf[128], buf1[128]; RB_DLINK_FOREACH (ptr, serv_list.head) { target_p = ptr->data; if(IsCapable (target_p, CAP_ZIP)) { zipstats = target_p->localClient->zipstats; ...
true
true
false
false
false
1
is_closed(int *closed) const { uint32 n_points; double x1, y1, x2, y2; const char *data= m_data; if (no_data(data, 4)) return 1; n_points= uint4korr(data); if (n_points == 1) { *closed=1; return 0; } data+= 4; if (n_points == 0 || not_enough_points(data, n_points)) return 1; /* G...
false
false
false
false
false
0
cmd_store_env_value_and_pop2(struct lldpctl_conn_t *conn, struct writer *w, struct cmd_env *env, void *key) { return (cmdenv_put(env, key, cmdenv_arg(env)) != -1 && cmdenv_pop(env, 2) != -1); }
false
false
false
false
false
0
remove_arg (gint num, gint *argc, gchar **argv[]) { gint n; g_assert (num <= (*argc)); for (n = num; (*argv)[n] != NULL; n++) (*argv)[n] = (*argv)[n+1]; (*argv)[n] = NULL; (*argc) = (*argc) - 1; }
false
false
false
false
false
0
decode_line_short_2_of_2_to_float(void* source_array, EPR_SBandId* band_id, int offset_x, int raster_width, int step_x, void*...
false
false
false
false
false
0
_dxfBoundaryCollapse2KndGeometricallyOk(SimpData *simp_data, int v0, int v1, /* this procedure must be run twice, once for the star of the vertex v0 and once for the star of the vertex v1 Here, v1 rather stands for the first vertex of the star */ int *star0, int ...
false
false
false
false
false
0
spif_str_dup(spif_str_t self) { spif_str_t tmp; ASSERT_RVAL(!SPIF_STR_ISNULL(self), SPIF_NULL_TYPE(str)); tmp = SPIF_ALLOC(str); memcpy(tmp, self, SPIF_SIZEOF_TYPE(str)); tmp->s = SPIF_CAST(charptr) STRDUP(SPIF_CONST_CAST_C(char *) SPIF_STR_STR(self)); tmp->len = self->len; tmp->size = self...
false
false
false
false
false
0
cfread_ushort(CFILE *file, int ver, ushort deflt) { ushort s; if (file->version < ver) return deflt; if (cfread( &s, sizeof(s), 1, file) != 1) return deflt; s = INTEL_SHORT(s); return s; }
false
false
false
false
false
0
LinkController(FCDController* controller) { bool ret = true; if (controller->GetBaseTarget() == NULL) { if (controller->IsSkin()) { ret &= FArchiveXML::LinkSkinController(controller->GetSkinController()); } else if (controller->IsMorph()) { ret &= FArchiveXML::LinkMorphController(controlle...
false
false
false
false
false
0
iwl_mvm_enter_d0i3_iterator(void *_data, u8 *mac, struct ieee80211_vif *vif) { struct iwl_d0i3_iter_data *data = _data; struct iwl_mvm *mvm = data->mvm; struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); u32 flags = CMD_ASYNC | CMD_HIGH_PRIO | CMD_SEND_IN_IDLE; IWL_DEBUG_RPM(mvm, "entering D0i3 - v...
false
false
false
false
false
0
base64( const std::string& str ) { char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; int lng = str.length(); std::string out; out.reserve( lng * 2 ); std::string data = str + "\0\0\0\0"; for( int i = 0; i < lng; i += 3 ){ unsigned char* cstr = (unsig...
false
false
false
false
false
0
fcoe_interface_create(struct net_device *netdev, enum fip_state fip_mode) { struct fcoe_ctlr_device *ctlr_dev; struct fcoe_ctlr *ctlr; struct fcoe_interface *fcoe; int size; int err; if (!try_module_get(THIS_MODULE)) { FCOE_NETDEV_DBG(netdev, "Could not get a reference to the module\n"); fcoe =...
false
false
false
false
false
0
getLength() { if (!linDict.isDict()) return 0; int length; if (linDict.getDict()->lookupInt("L", NULL, &length) && length > 0) { return length; } else { error(-1, "Length in linearization table is invalid"); return 0; } }
false
false
false
false
false
0
dht_fd_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int op_errno, fd_t *fd, dict_t *xdata) { dht_local_t *local = NULL; int this_call_cnt = 0; call_frame_t *prev = NULL; local = frame->local; prev = cookie; LOCK (&frame->loc...
false
false
false
false
true
1
_concatenate(const UChar *left, int32_t leftLength, const UChar *right, int32_t rightLength, UChar *dest, int32_t destCapacity, const Normalizer2 *n2, UErrorCode *pErrorCode) { if(U_FAILURE(*pErrorCode)) { return 0; } if(destCap...
false
false
false
false
false
0
ap_rxplus_exec(apr_pool_t *pool, ap_rxplus_t *rx, const char *pattern, char **newpattern) { int ret = 1; int startl, oldl, newl, diffsz; const char *remainder; char *subs; /* snrf process_regexp from mod_headers */ if (ap_regexec(&rx->rx, pattern, rx->nmatch, rx->pmatc...
false
false
false
false
true
1
svnic_dev_notify_set(struct vnic_dev *vdev, u16 intr) { u64 a0, a1; int wait = VNIC_DVCMD_TMO; if (!vdev->notify) { vdev->notify = pci_alloc_consistent(vdev->pdev, sizeof(struct vnic_devcmd_notify), &vdev->notify_pa); if (!vdev->notify) return -ENOMEM; } a0 = vdev->notify_pa; a1 = ((u64)intr << 32)...
false
false
false
false
false
0
panel_context_menu_check_for_screen (GtkWidget *w, GdkEvent *ev, gpointer data) { static int times = 0; if (!w) { times = 0; return FALSE; } if (ev->type != GDK_KEY_PRESS) return FALSE; if (ev->key.keyval == GDK_KEY_f || ev->key.keyval == GDK_KEY_F) { times++; if (times == 3) { ...
false
false
false
false
false
0
setMifTag(int& next_tag) { for (int i = 0; i < data.nofComponents; i++) { data.components[i]->setMifTag(next_tag); } }
false
false
false
false
false
0
set_fieldtype_arg(FIELDTYPE *typ, void *(*const make_arg)(va_list *), void *(*const copy_arg)(const void *), void (*const free_arg) (void *)) { T((T_CALLED("set_fieldtype_arg(%p,%p,%p,%p)"), typ, make_arg, copy_arg, free_arg)); if (typ != 0 && make_arg != (void *)0) { typ->status |= _HAS...
false
false
false
false
false
0
e_dbus_object_skeleton_get_property (GObject *gobject, guint prop_id, GValue *value, GParamSpec *pspec) { EDBusObjectSkeleton *object = E_DBUS_OBJECT_SKELETON (gobject); GDBusInterface *interface; switch (prop_id) { case 1: interface = g_dbus_object_get_interface (G_DBUS_...
false
false
false
false
false
0
_AVCE00ReadScanE00(AVCE00ReadE00Ptr psRead) { AVCE00ParseInfo *psInfo = psRead->hParseInfo; const char *pszLine; const char *pszName = 0; void *obj; int iSect = 0; while (CPLGetLastErrorNo() == 0 && (pszLine = CPLReadLine(psRead->hFile) ) != NULL ) { obj = ...
false
false
false
false
true
1
display_mime(struct mailmime * mime) { clistiter * cur; switch (mime->mm_type) { case MAILMIME_SINGLE: printf("single part\n"); break; case MAILMIME_MULTIPLE: printf("multipart\n"); break; case MAILMIME_MESSAGE: printf("message\n"); break; } if (mime->mm_mime_fields != NULL) { if (clist_begin(...
false
false
false
false
false
0
budget_stop_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct budget *budget = (struct budget *) demux->priv; int status = 0; dprintk(2, "budget: %p\n", budget); spin_lock(&budget->feedlock); if (--budget->feeding == 0) status = stop_ts_capture(budget); spin_unlock(&budget->fe...
false
false
false
false
false
0
SetDriver(uint8 driverId) { switch(driverId) { case DIRECTX9: _driverType = video::EDT_DIRECT3D9; break; case DIRECTX8: _driverType = video::EDT_DIRECT3D8; break; case OPENGL: _driverType = video::EDT_OPENGL; break; case SOFTWARE: _driverType = video::EDT_SOF...
false
false
false
false
false
0
create_cattr_named_arg (void *minfo, MonoObject *typedarg) { static MonoClass *klass; static MonoMethod *ctor; MonoObject *retval; void *unboxed, *params [2]; if (!klass) klass = mono_class_from_name (mono_defaults.corlib, "System.Reflection", "CustomAttributeNamedArgument"); if (!ctor) ctor = mono_class_get...
false
false
false
false
false
0
XToTime(x) Coord x; { float tmp; int denom; if ((x <= traceBox.left) || (x >= traceBox.right)) return TIME_BOUND; denom = traceBox.right - traceBox.left - 2; if (denom == 0) return TIME_BOUND; /* avoid divide-by-zero */ tmp = (float)tims.steps / (float)denom; return (tims.start + R...
false
false
false
false
false
0
InternalIsFileLoaded(const string& filename) const { MutexLockMaybe lock(mutex_); return tables_->FindFile(filename) != NULL; }
false
false
false
false
false
0
propfind_curprivset(const xmlChar *name, xmlNsPtr ns, struct propfind_ctx *fctx, xmlNodePtr resp, struct propstat propstat[], void *rock __attribute__((unused))) { int rights; unsigned flags = 0; xmlNodePtr set; if (!fctx->mailbox) return HTTP_NOT_FOUND; if (((rights = cyrus_acl_myright...
false
false
false
false
false
0
command(char c) { int index = static_cast<uint>(c); if (index < 0 || index >= 0x100) return NULL; return cmdMap_[index]; }
false
false
false
false
false
0
start_new_outpacket(int userid, char *data, int datalen) /* Copies data to .outpacket and resets all counters. data is expected to be compressed already. */ { datalen = MIN(datalen, sizeof(users[userid].outpacket.data)); memcpy(users[userid].outpacket.data, data, datalen); users[userid].outpacket.len = datalen; ...
false
false
false
false
false
0
esl_wei_pdf(double x, double mu, double lambda, double tau) { double y = lambda * (x-mu); double val; if (x < mu) return 0.; if (x == mu) { if (tau < 1.) return eslINFINITY; else if (tau > 1.) return 0.; else if (tau == 1.) return lambda; } val = lambda * tau * exp...
false
false
false
false
false
0
GetNextBlock(struct Block * block) { if(block->subBlocks.first) block = block->subBlocks.first; else { for(; block; ) { if(block->next) { block = block->next; break; } block = block->parent; } } return block; }
false
false
false
false
false
0
horizontalSpacing() const { if (m_hSpace >= 0) { return m_hSpace; } else { return smartSpacing(QStyle::PM_LayoutHorizontalSpacing); } }
false
false
false
false
false
0
pch_setup_backlight(struct intel_connector *connector, enum pipe unused) { struct drm_device *dev = connector->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_panel *panel = &connector->panel; u32 cpu_ctl2, pch_ctl1, pch_ctl2, val; pch_ctl1 = I915_READ(BLC_PWM_PCH_CTL1); panel->backl...
false
false
false
false
false
0
mem_crc32(u32 crc, const char *buff, size_t size) { const char *buff_end = buff + size; crc ^= 0xFFFFFFFFL; while (buff < buff_end) { crc = crc32_table[(crc ^ (*buff++)) & 0xFF] ^ (crc >> 8); } return crc ^ 0xFFFFFFFFL; }
false
false
false
false
false
0
operator-=(date_time_period_set const &v) { for(unsigned i=0;i<v.size();i++) { *this-=v[i]; } return *this; }
false
false
false
false
false
0
to_nd_blk_region(struct device *dev) { struct nd_region *nd_region = to_nd_region(dev); WARN_ON(!is_nd_blk(dev)); return container_of(nd_region, struct nd_blk_region, nd_region); }
false
false
false
false
false
0
static_extruded_remove (FT_Library freetype, FT_Face face, gamgi_extruded *extruded, char *error) { gamgi_bool valid = TRUE; /************************* * remove Mesa resources * *************************/ gluDeleteTess (extruded->tesselator); /************************** * remove Gamgi resources * ***************...
false
false
false
false
false
0
readZipCodes() { if (!zipCodes.isEmpty()) return; QString c = Utils::readTextFile(m_Path + "/zipcodes.csv"); if (c.isEmpty()) Utils::Log::addError("Randomizer", "Can not read zip codes.", __FILE__, __LINE__); foreach(const QStr...
false
false
false
false
false
0
InsertChild(w) Widget w; { if (((CompositeWidget)XtParent(w))->composite.num_children > 1) { XtAppWarningMsg( XtWidgetToApplicationContext(w), "insertChild", "badChild", "XbaeCaption", "XbaeCaption: Cannot add more than one child.", (String *)NULL, (Cardinal *...
false
false
false
false
false
0
IsPDF(const unsigned char *magick,const size_t offset) { if (offset < 5) return(False); if (LocaleNCompare((char *) magick,"%PDF-",5) == 0) return(True); return(False); }
false
false
false
false
false
0
attach(GMainContext *ctx) { g_assert(_ctx == NULL); // just to be sane _ctx = ctx ? ctx : g_main_context_default(); g_main_context_ref(_ctx); // create the source for dispatching messages _source = g_source_new((GSourceFuncs *) &dispatcher_funcs, sizeof(DispatcherSource)); ((Disp...
false
false
false
false
false
0
CmdIndex(int code) { char *text, *r, *s, *t; getNonBlank(); text = getDelimitedText('{', '}', TRUE); diagnostics(4, "CmdIndex \\index{%s}", text); fprintRTF("{\\xe{\\v "); t = text; while (t) { s = t; t = strchr(s, '!'); if (t) *t = '\0'; r = str...
false
false
false
false
false
0
ConstantFoldInstruction(Instruction *I, const DataLayout &DL, const TargetLibraryInfo *TLI) { // Handle PHI nodes quickly here... if (PHINode *PN = dyn_cast<PHINode>(I)) { Constant *CommonValue = nullptr; for (Value *Incoming : PN->incoming_values()) { // If th...
false
false
false
false
false
0
jcnf_add_key_internal( jcnf *p, char *key, /* Key path name */ jc_type type, void *data, size_t dataSize, /* Data size (including string nul) */ char *comment ) { jc_error ev; jc_key *kp; if (key == NULL || (type != jc_null && (data == NULL || dataSize == 0))) return jc_bad_addkey_params; if (p->nkeys >...
false
false
false
false
false
0
slotExpanded( const QModelIndex &index ) { if( !m_treeModel ) return; if( m_filterModel ) m_treeModel->slotExpanded( m_filterModel->mapToSource( index )); else m_treeModel->slotExpanded( index ); }
false
false
false
false
false
0
retrieve_contents (bfd *abfd, asection *sec, bfd_boolean keep_memory) { bfd_byte *contents; bfd_size_type sec_size; sec_size = bfd_get_section_limit (abfd, sec); contents = elf_section_data (sec)->this_hdr.contents; if (contents == NULL && sec_size != 0) { if (!bfd_malloc_and_get_section (abfd, ...
false
false
false
false
false
0
c3745_nm_stop_online(vm_instance_t *vm,u_int slot,u_int subslot) { if (!slot) { vm_error(vm,"OIR not supported on slot 0.\n"); return(-1); } /* The NM driver must be initialized */ if (!vm_slot_get_card_ptr(vm,slot)) { vm_error(vm,"trying to shut down empty slot %u.\n",slot); ret...
false
false
false
false
false
0
gnc_table_get_cell_location (Table *table, const char *cell_name, VirtualCellLocation vcell_loc, VirtualLocation *virt_loc) { VirtualCell *vcell; CellBlock *cellblock; int cell_row, cell_col; if (table == NULL) ...
false
false
false
false
false
0
createTestGroup(MprTestService *sp, MprTestDef *def, MprTestGroup *parent) { MprTestGroup *gp, *child; MprTestDef **dp; MprTestCase *tc; char name[80]; static int counter = 0; mprAssert(sp); mprAssert(def); gp = mprAllocObj(MprTestGroup, manageTestGroup); ...
false
false
false
true
false
1
parse_car_or_cdr_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, ...
false
false
false
false
false
0
wakeUp (TimeoutId id, void *data) { InnListener lis = (InnListener) data ; Buffer *readArray ; ASSERT (id == lis->inputEOFSleepId) ; lis->inputEOFSleepId = 0 ; readArray = makeBufferArray (bufferTakeRef (lis->inputBuffer), NULL) ; prepareRead (lis->myep,readArray,newArticleCommand,lis,1) ; }
false
false
false
false
false
0
length_KDCDHKeyInfo(const KDCDHKeyInfo *data) { size_t ret = 0; { size_t Top_tag_oldret = ret; ret = 0; ret += der_length_bit_string(&(data)->subjectPublicKey); ret += 1 + der_length_len (ret); ret += 1 + der_length_len (ret); ret += Top_tag_oldret; } { size_t Top_tag_oldret = ret; ret = 0; ret += der_length_unsigned(&...
false
false
false
false
false
0
xfx(double x, double Q) { vector<double> r(13); fevolvepdf(&x, &Q, &r[0]); return r; }
false
false
false
false
false
0
test_write_read(void) { int i = 0; int *write_buf, *read_buf; TESTING("simple write/read to/from metadata accumulator"); /* Allocate buffers */ write_buf = (int *)HDmalloc(1024 * sizeof(int)); HDassert(write_buf); read_buf = (int *)HDcalloc(1024, sizeof(int)); HDassert(read_buf); ...
false
false
false
false
false
0
brasero_filtered_uri_clear (BraseroFilteredUri *filtered) { BraseroFilteredUriPrivate *priv; GHashTableIter iter; gpointer key; priv = BRASERO_FILTERED_URI_PRIVATE (filtered); g_hash_table_iter_init (&iter, priv->restored); while (g_hash_table_iter_next (&iter, &key, NULL)) { brasero_utils_unregister_string (...
false
false
false
false
false
0
keys_init (void) { gl_tls_key_init (buffer_key, free); gl_tls_key_init (bufmax_key, NULL); /* The per-thread initial values are NULL and 0, respectively. */ }
false
false
false
false
false
0
bq24190_remove(struct i2c_client *client) { struct bq24190_dev_info *bdi = i2c_get_clientdata(client); pm_runtime_get_sync(bdi->dev); bq24190_register_reset(bdi); pm_runtime_put_sync(bdi->dev); bq24190_sysfs_remove_group(bdi); power_supply_unregister(bdi->battery); power_supply_unregister(bdi->charger); pm_ru...
false
false
false
false
false
0
copy_1symtab(struct symtab_t *osytp) { int32 ofreezes; struct symtab_t *nsytp; ofreezes = osytp->freezes; nsytp = __alloc_symtab(ofreezes); *nsytp = *osytp; /* must leave as NULL if empty table */ if (osytp->numsyms == 0) nsytp->stsyms = NULL; else nsytp->stsyms = copy_stsyms(osytp->stsyms, osytp->numsyms); ...
false
false
false
false
false
0
toshiba_bluetooth_present(acpi_handle handle) { acpi_status result; u64 bt_present; /* * Some Toshiba laptops may have a fake TOS6205 device in * their ACPI BIOS, so query the _STA method to see if there * is really anything there. */ result = acpi_evaluate_integer(handle, "_STA", NULL, &bt_present); if (...
false
false
false
false
false
0
ompi_win_destruct(ompi_win_t *win) { if (NULL != win->w_keyhash) { ompi_attr_delete_all(WIN_ATTR, win, win->w_keyhash); OBJ_RELEASE(win->w_keyhash); } if (NULL != win->error_handler) { OBJ_RELEASE(win->error_handler); } if (NULL != win->w_group) { ompi_group_decreme...
false
false
false
false
false
0
hash_bytes(SHA_CTX * pctx, U8 * pdata, int length, int padding) { /* This buffer size is FIXED as per the algorithm */ U8 buffer[64]; int pos, avail, offset; if (padding > sizeof(buffer)) { return; } memset(buffer, 0, padding); pos = padding; offset = 0; while ...
false
true
false
false
false
1
draw_vsep_win(wp, row) win_T *wp; int row; { int hl; int c; if (wp->w_vsep_width) { /* draw the vertical separator right of this window */ c = fillchar_vsep(&hl); screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + wp->w_height, W_ENDCOL(wp), W_ENDCOL(wp) + 1, c, ' ', hl); } }
false
false
false
false
false
0
clone_method(ID mid, const rb_method_entry_t *me, struct clone_method_data *data) { VALUE newiseqval; if (me->def && me->def->type == VM_METHOD_TYPE_ISEQ) { rb_iseq_t *iseq; newiseqval = rb_iseq_clone(me->def->body.iseq->self, data->klass); GetISeqPtr(newiseqval, iseq); rb_add_method(data->klass, mid, VM_ME...
false
false
false
false
false
0
run( const gchar * name, gint nparams, // !!! Always 3 for INTERACTIVE, not lengthof(param)? const GimpParam * param, gint * nreturn_vals, GimpParam ** return_vals) { static GimpParam values[1]; // return values persist after run() returns TGimpAdapterParameters parameters; ...
false
false
false
false
false
0
text_block(const string& s, double width, int justify, int innerjust) { double ox,oy,x,y,ll,rr,uu,dd; double a,b,c,d; set_base_size(); g_get_bounds(&a,&b,&c,&d); g_init_bounds(); dont_print = true; fftext_block(s,width,justify); dont_print = false; g_get_bounds(&ll,&dd,&rr,&uu); if (ll > rr) {ll=0; rr=0; uu=0...
false
false
false
false
false
0
submit_work_async(struct work *work_in, struct timeval *tv_work_found) { struct work *work = copy_work(work_in); pthread_t submit_thread; if (tv_work_found) copy_time(&work->tv_work_found, tv_work_found); applog(LOG_DEBUG, "Pushing submit work to work thread"); if (unlikely(pthread_create(&submit_thread, NULL, ...
false
false
false
false
false
0
luaQ_pcall(lua_State *L, int na, int nr, int eh, int oh) { QtLuaEngine *engine = luaQ_engine(L); QObject *obj = engine; if (oh) obj = luaQ_toqobject(L, oh); if (! obj) luaL_error(L, "invalid qobject"); return luaQ_pcall(L, na, nr, eh, obj); }
false
false
false
false
false
0
getAnnotationVal(UT_uint32 annpid) const { UT_sint32 i =0; UT_sint32 pos = 0; fl_AnnotationLayout * pAL = NULL; for(i=0; i<m_vecAnnotations.getItemCount(); i++) { pAL = getNthAnnotation(i); if(pAL->getAnnotationPID() == annpid) { pos = i; break; } } if(pos != i) pos = -1; return pos; }
false
false
false
false
false
0
create_postproc (PostProcessing *postproc) { GtkWidget *dialog; GtkWidget *dialog_vbox2; GtkWidget *vbox1; GtkWidget *label4; GtkWidget *hseparator1; GtkWidget *scrolledwindow2; GtkWidget *textview; GtkWidget *dialog_action_area2; GtkWidget *button_cancel; GtkWidget *button_ok; dialog = gtk_dialo...
false
false
false
false
false
0
aerror(C *a, C *b, int n) { if (n > 0) { /* compute the relative Linf error */ double e = 0.0, mag = 0.0; int i; for (i = 0; i < n; ++i) { e = dmax(e, norm2(c_re(a[i]) - c_re(b[i]), c_im(a[i]) - c_im(b[i]))); mag = dmax(mag, dmin(norm2(c_re(a[i]), c_im(a[i])), norm...
false
false
false
false
true
1
dwarf_get_abbrev(Dwarf_Debug dbg, Dwarf_Unsigned offset, Dwarf_Abbrev * returned_abbrev, Dwarf_Unsigned * length, Dwarf_Unsigned * abbr_count, Dwarf_Error * error) { Dwarf_Small *abbrev_ptr = 0; Dwarf_Small *abbrev_section_end = 0; Dwarf_Half attr = 0; Dwarf_Half attr_form = 0; Dwarf...
false
false
false
false
false
0
AABBTest (dxGeom *o, dReal aabb[6]) { dGeomClass *c = &user_classes[type-dFirstUserClass]; if (c->aabb_test) return c->aabb_test (this,o,aabb); else return 1; }
false
false
false
false
false
0
_gcr_gnupg_records_get_fingerprint (GPtrArray *records) { GcrRecord *record; record = _gcr_records_find (records, GCR_RECORD_SCHEMA_FPR); if (record != NULL) return _gcr_record_get_raw (record, GCR_RECORD_FPR_FINGERPRINT); return NULL; }
false
false
false
false
false
0
print_keydata(kdbe_key_t *keys, unsigned int len) { unsigned int i; for (i = 0; i < len; i++, keys++) { print_key(keys); } }
false
false
false
false
false
0
setup_state (guint n_sources, guint source_types, guint database_state, gpointer *state) { gint i; for (i = 0; i < n_sources; i++) { guint contents = database_state % 7; GvdbTable *table = NULL; gchar *filename; if (contents) {...
false
false
false
false
false
0
ssl3_InitCompressionContext(ssl3CipherSpec *pwSpec) { /* Setup the compression functions */ switch (pwSpec->compression_method) { case ssl_compression_null: pwSpec->compressor = NULL; pwSpec->decompressor = NULL; pwSpec->compressContext = NULL; pwSpec->decompressContext = NULL; pwSpec->destroyCompressC...
false
false
false
false
false
0
flush_buffer(struct tty_struct *tty) { struct slgt_info *info = tty->driver_data; unsigned long flags; if (sanity_check(info, tty->name, "flush_buffer")) return; DBGINFO(("%s flush_buffer\n", info->device_name)); spin_lock_irqsave(&info->lock, flags); info->tx_count = 0; spin_unlock_irqrestore(&info->lock, f...
false
false
false
false
false
0
main(int argc, char **argv) { using fst::script::FstClass; using fst::script::MutableFstClass; using fst::script::ArcSort; string usage = "Sorts arcs of an FST.\n\n Usage: "; usage += argv[0]; usage += " [in.fst [out.fst]]\n"; std::set_new_handler(FailedNewHandler); SET_FLAGS(usage.c_str(), &argc, &a...
false
false
false
false
false
0
ueConstStrSeek( const char *src, size_t n ) { size_t i = 0; const char *iter = src; for ( i = 0; i < n; i++ ) { iter += ueBytesFromChar( iter[0] ); } return iter; }
false
false
false
false
false
0
forward_socket(struct sockaddr *to, dns_tls_t *tls) { int i, s, port; uint16_t r; /* try 10 times */ for (i = 0; i < 10; i++) { r = xarc4random(&tls->tls_arctx); port = FORWARD_PORT_MIN + (r & 0xf000); if ((s = dns_util_socket(PF_INET, SOCK_DGRAM, port)) > 0) { plog...
false
false
false
false
false
0
try_update_version (NMShellWatcher *watcher) { NMShellWatcherPrivate *priv = watcher->priv; GVariant *v; char *version, *p; v = g_dbus_proxy_get_cached_property (priv->shell_proxy, "ShellVersion"); if (!v) { /* The shell has claimed the name, but not yet registered its interfaces... * (https://bugzilla.gnome...
false
false
false
false
false
0
is_pte_valid(const gpt_entry *pte, const u64 lastlba) { if ((!efi_guidcmp(pte->partition_type_guid, NULL_GUID)) || le64_to_cpu(pte->starting_lba) > lastlba || le64_to_cpu(pte->ending_lba) > lastlba) return 0; return 1; }
false
false
false
false
false
0
SaveShip(char *shipname) { char *LevelMem; /* linear memory for one Level */ char *MapHeaderString; FILE *ShipFile; // to this file we will save all the ship data... char filename[FILENAME_LEN+1]; int level_anz; int array_i, array_num; int i; DebugPrintf (2, "\nint SaveShip(char *shipname): real func...
false
false
false
false
false
0
getCallerSavedRegs(const MachineFunction *MF) const { static const MCPhysReg CallerSavedRegsV4[] = { Hexagon::R0, Hexagon::R1, Hexagon::R2, Hexagon::R3, Hexagon::R4, Hexagon::R5, Hexagon::R6, Hexagon::R7, Hexagon::R8, Hexagon::R9, Hexagon::R10, Hexagon::R11, Hexagon::R12, Hexagon::R13, Hexagon::R14, H...
false
false
false
false
false
0
isc_ratelimiter_release(isc_ratelimiter_t *rl) { isc_result_t result = ISC_R_SUCCESS; LOCK(&rl->lock); switch (rl->state) { case isc_ratelimiter_shuttingdown: result = ISC_R_SHUTTINGDOWN; break; case isc_ratelimiter_stalled: if (!ISC_LIST_EMPTY(rl->pending)) { result = isc_timer_reset(rl->timer, i...
false
false
false
false
false
0
senescent_p (void) { time_t now = time ((time_t *) 0); struct tm *tm = localtime (&now); const char *s = screensaver_id; char mon[4], year[5]; int m, y, months; s = strchr (s, ' '); if (!s) abort(); s++; s = strchr (s, '('); if (!s) abort(); s++; s = strchr (s, '-'); if (!s) abort(); s++; strncpy (mon...
false
false
false
false
false
0
init_ldap_userdir(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { for (; s; s = s->next) { ldap_userdir_config *s_cfg = (ldap_userdir_config *) ap_get_module_config(s->module_config, &ldap_userdir_module); apply_config_defaults(s_cfg); } ap_add_version_component(pco...
false
false
false
false
false
0