search for: endptr

Displaying 20 results from an estimated 67 matches for "endptr".

Did you mean: end_ptr
2012 Apr 17
1
[PATCH] Remove local_strtoull, windows has equivalent function _strtoui64
...onst char *suffix); static void die(const char *message); static int conditional_fclose(FILE *f); static char *local_strdup(const char *source); -#ifdef _MSC_VER -/* There's no strtoll() in MSVC6 so we just write a specialized one */ -static FLAC__int64 local__strtoll(const char *src, char **endptr); -#endif - /* * share__getopt format struct; note that for long options with no @@ -683,13 +679,8 @@ int parse_option(int short_option, const char *long_option, const char *option_a FLAC__ASSERT(0 != option_argument); { char *end; -#ifdef _MSC_VER FLAC__int64 i; - i = loc...
2006 Jun 26
2
[PATCH, RFC 3/13] OTP: parity table
Add OTP parity table. diff -urdpNX /usr/share/dontdiff -x Makefile dovecot.vanilla/src/lib-otp/otp-parity.c dovecot/src/lib-otp/otp-parity.c --- dovecot.vanilla/src/lib-otp/otp-parity.c 1970-01-01 03:00:00.000000000 +0300 +++ dovecot/src/lib-otp/otp-parity.c 2006-06-23 13:44:31.161891112 +0400 @@ -0,0 +1,29 @@ +/* + * OTP parity table. + * + * Copyright (c) 2006 Andrey Panin <pazke at
2004 Mar 02
2
[PATCH] Force mountd(8) to a specified port.
...untd.c 2 Mar 2004 21:08:17 -0000 @@ -272,11 +272,15 @@ fd_set readfds; SVCXPRT *udptransp, *tcptransp, *udp6transp, *tcp6transp; struct netconfig *udpconf, *tcpconf, *udp6conf, *tcp6conf; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; int udpsock, tcpsock, udp6sock, tcp6sock; + char *endptr; + in_port_t svcport = 0; int xcreated = 0, s; int maxrec = RPC_MAXDATASIZE; int one = 1; - int c; + int c, r; udp6conf = tcp6conf = NULL; udp6sock = tcp6sock = NULL; @@ -298,7 +302,7 @@ errx(1, "NFS server is not available or loadable"); } - while ((c = getopt(argc, a...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...nd (&z); - if (plen) - (*plen) = z->total_out; - - inflateEnd (z); - - g_free (z); return data; } @@ -278,11 +262,8 @@ int tag_func_define_bits_jpeg_3 (SwfdecSwfDecoder * s) { SwfdecBits *bits = &s->b; - int id; + guint id; SwfdecImage *image; - unsigned char *endptr; - - endptr = bits->ptr + bits->buffer->length; id = swfdec_bits_get_u16 (bits); SWFDEC_LOG (" id = %d", id); @@ -292,9 +273,7 @@ tag_func_define_bits_jpeg_3 (SwfdecSwfDe return SWFDEC_STATUS_OK; image->type = SWFDEC_IMAGE_TYPE_JPEG3; - image->raw_data...
2001 Feb 08
0
openssh2.3.0p1 and /etc/limits
...+/* Set a limit on a resource */ +/* + * rlimit - RLIMIT_XXXX + * value - string value to be read + * multiplier - value*multiplier is the actual limit + */ +static int +setrlimit_value(unsigned int rlimit, const char *value, unsigned int multiplier) +{ + struct rlimit rlim; + long limit; + char **endptr = (char **) &value; + const char *value_orig = value; + + limit = strtol(value, endptr, 10); + if (limit == 0 && value_orig == *endptr) /* no chars read */ + return 0; + limit *= multiplier; + rlim.rlim_cur = limit; + rlim.rlim_max = limit; + if (setrlimit(rlimit, &rlim)) + return...
2017 Apr 07
0
[PATCH 2/3] ringtest: support test specific parameters
...o]" + " [--param p]" " [--sleep]" " [--relax]" " [--exit]" @@ -328,6 +335,12 @@ int main(int argc, char **argv) assert(c > 0 && c < INT_MAX); max_outstanding = c; break; + case 'p': + c = strtol(optarg, &endptr, 0); + assert(!*endptr); + assert(c > 0 && c < INT_MAX); + param = c; + break; case 'b': c = strtol(optarg, &endptr, 0); assert(!*endptr); diff --git a/tools/virtio/ringtest/main.h b/tools/virtio/ringtest/main.h index 14142fa..90b0133 100644 --- a/tools/...
2017 Apr 15
1
[PATCH] ringtest: fix an assert statement
...r <dan.carpenter at oracle.com> diff --git a/tools/virtio/ringtest/main.c b/tools/virtio/ringtest/main.c index 022ae95a06bd..453ca3c21193 100644 --- a/tools/virtio/ringtest/main.c +++ b/tools/virtio/ringtest/main.c @@ -87,7 +87,7 @@ void set_affinity(const char *arg) cpu = strtol(arg, &endptr, 0); assert(!*endptr); - assert(cpu >= 0 || cpu < CPU_SETSIZE); + assert(cpu >= 0 && cpu < CPU_SETSIZE); self = pthread_self(); CPU_ZERO(&cpuset);
2017 Apr 07
0
[PATCH 2/3] ringtest: support test specific parameters
...o]" + " [--param p]" " [--sleep]" " [--relax]" " [--exit]" @@ -328,6 +335,12 @@ int main(int argc, char **argv) assert(c > 0 && c < INT_MAX); max_outstanding = c; break; + case 'p': + c = strtol(optarg, &endptr, 0); + assert(!*endptr); + assert(c > 0 && c < INT_MAX); + param = c; + break; case 'b': c = strtol(optarg, &endptr, 0); assert(!*endptr); diff --git a/tools/virtio/ringtest/main.h b/tools/virtio/ringtest/main.h index 14142fa..90b0133 100644 --- a/tools/...
2017 Apr 15
1
[PATCH] ringtest: fix an assert statement
...r <dan.carpenter at oracle.com> diff --git a/tools/virtio/ringtest/main.c b/tools/virtio/ringtest/main.c index 022ae95a06bd..453ca3c21193 100644 --- a/tools/virtio/ringtest/main.c +++ b/tools/virtio/ringtest/main.c @@ -87,7 +87,7 @@ void set_affinity(const char *arg) cpu = strtol(arg, &endptr, 0); assert(!*endptr); - assert(cpu >= 0 || cpu < CPU_SETSIZE); + assert(cpu >= 0 && cpu < CPU_SETSIZE); self = pthread_self(); CPU_ZERO(&cpuset);
2003 May 19
0
[PATCH] getpwnam() implementation in tftpd.c
...; + +/* to prevent a compiler warning */ +struct passwd *__getpwent(int pwd_fd); +struct passwd *getpwnam(const char *name); + +#define PWD_BUFFER_SIZE 256 +struct passwd *__getpwent(int pwd_fd) +{ + static char line_buff[PWD_BUFFER_SIZE]; + static struct passwd passwd; + char *field_begin; + char *endptr; + char *gid_ptr=NULL; + char *uid_ptr=NULL; + int line_len; + int i; + + /* We use the restart label to handle malformatted lines */ + restart: + /* Read the passwd line into the static buffer using a minimal of + syscalls. */ + if ((line_len = read(pwd_fd, line_buff, PWD_BUFFER_SIZE)) <= 0...
2013 Sep 06
21
[PATCH v2 0/5] xl: allow for node-wise specification of vcpu pinning
Hi all, This is the second take of a patch that I submitted some time ago for allowing specifying vcpu pinning taking NUMA nodes into account. IOW, something like this: * "nodes:0-3": all pCPUs of nodes 0,1,2,3;  * "nodes:0-3,^node:2": all pCPUS of nodes 0,1,3;  * "1,nodes:1-2,^6": pCPU 1 plus all pCPUs of nodes 1,2    but not pCPU 6; v1 was a single patch, this is
2007 Feb 15
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_shape.c libswfdec/swfdec_tag.c
...ffer); } func = swfdec_swf_decoder_get_tag_func (tag); @@ -257,32 +244,20 @@ tag_func_define_sprite (SwfdecSwfDecoder SWFDEC_ERROR ("invalid tag %d %s during DefineSprite", tag, swfdec_swf_decoder_get_tag_name (tag)); } else { - const unsigned char *endptr = parse.ptr + tag_len; ret = func (s); - swfdec_bits_syncbits (bits); - if (tag_len > 0) { - if (s->b.ptr < endptr) { - SWFDEC_WARNING ("early parse finish (%d bytes)", endptr - s->b.ptr); - } - if (s->b.ptr > endptr) { -...
2016 Jan 21
1
[PATCH] tools/virtio: add ringtest utilities
...+ notify(kickfd); +} + +void wait_for_kick(void) +{ + wait_for_notify(kickfd); +} + +void call(void) +{ + notify(callfd); +} + +void wait_for_call(void) +{ + wait_for_notify(callfd); +} + +void set_affinity(const char *arg) +{ + cpu_set_t cpuset; + int ret; + pthread_t self; + long int cpu; + char *endptr; + + if (!arg) + return; + + cpu = strtol(arg, &endptr, 0); + assert(!*endptr); + + assert(cpu >= 0 || cpu < CPU_SETSIZE); + + self = pthread_self(); + CPU_ZERO(&cpuset); + CPU_SET(cpu, &cpuset); + + ret = pthread_setaffinity_np(self, sizeof(cpu_set_t), &cpuset); + assert(!re...
2016 Jan 21
1
[PATCH] tools/virtio: add ringtest utilities
...+ notify(kickfd); +} + +void wait_for_kick(void) +{ + wait_for_notify(kickfd); +} + +void call(void) +{ + notify(callfd); +} + +void wait_for_call(void) +{ + wait_for_notify(callfd); +} + +void set_affinity(const char *arg) +{ + cpu_set_t cpuset; + int ret; + pthread_t self; + long int cpu; + char *endptr; + + if (!arg) + return; + + cpu = strtol(arg, &endptr, 0); + assert(!*endptr); + + assert(cpu >= 0 || cpu < CPU_SETSIZE); + + self = pthread_self(); + CPU_ZERO(&cpuset); + CPU_SET(cpu, &cpuset); + + ret = pthread_setaffinity_np(self, sizeof(cpu_set_t), &cpuset); + assert(!re...
2010 Oct 01
0
[LLVMdev] LLVM-2.7 to 2.8 subtle change: MemoryBuffer::getMemBuffer
...ting our project over to LLVM-2.8 today I ran into a change that should probably go in the 2.8 release notes. After r100485, the MemoryBuffer::getMemBuffer went from: /// getMemBuffer - Open the specified memory range as a MemoryBuffer. Note /// that EndPtr[0] must be a null byte and be accessible! static MemoryBuffer *getMemBuffer(const char *StartPtr, const char *EndPtr, const char *BufferName = ""); to the current (after the StringRef chang...
1999 Feb 07
0
Help needed! tricky browsing configuration and BUG_REPORT
...me_type is necessary for a correct parsing, this seems to be a bug in libsmb/namequery.c in getlmhostsent. /* Extra feature. If the name ends in '#XX', where XX is a hex number, then only add that name type. */ if((ptr = strchr(name, '#')) != NULL) { char *endptr; ptr++; *name_type = (int)strtol(ptr, &endptr,0); <<<<< should be (ptr, &endptr,16) ---------------------------------------------------------------------------- ------------ Now NMBD adds these entries to REMOTE BROADCAST SUBNET ... but the error message ca...
2017 Oct 22
2
How to dump broken IR from LLVM backend?
My pass complains and gives up after spitting out: ====================================== Instruction does not dominate all uses! %44 = icmp ne i8** %endptr, null br i1 %44, label %32, label %33 Instruction has bogus parent pointer! ====================================== Is there any way to dump the entire IR even in broken form from the backend so that I can inspect what's going on? -- Thanks & Regards, Dipanjan -------------- next part...
2017 Oct 22
2
How to dump broken IR from LLVM backend?
...1 October 2017 at 21:33, Dipanjan Das <mail.dipanjan.das at gmail.com> > wrote: > >> >> My pass complains and gives up after spitting out: >> >> ====================================== >> Instruction does not dominate all uses! >> %44 = icmp ne i8** %endptr, null >> br i1 %44, label %32, label %33 >> Instruction has bogus parent pointer! >> ====================================== >> >> Is there any way to dump the entire IR even in broken form from the >> backend so that I can inspect what's going on? >>...
2009 Jun 21
0
[PATCHv6 12/12] qemu/net: flag to control the number of vectors a nic has
...char *device, const char *p) if (get_param_value(buf, sizeof(buf), "model", p)) { nd->model = strdup(buf); } + nd->nvectors = NIC_NVECTORS_UNSPECIFIED; + if (get_param_value(buf, sizeof(buf), "vectors", p)) { + char *endptr; + long vectors = strtol(buf, &endptr, 0); + if (*endptr) { + config_error(mon, "invalid syntax for # of vectors\n"); + ret = -1; + goto out; + } + if (vectors < 0 || vectors > 0x7ffffff) {...
2009 Jun 21
0
[PATCHv6 12/12] qemu/net: flag to control the number of vectors a nic has
...char *device, const char *p) if (get_param_value(buf, sizeof(buf), "model", p)) { nd->model = strdup(buf); } + nd->nvectors = NIC_NVECTORS_UNSPECIFIED; + if (get_param_value(buf, sizeof(buf), "vectors", p)) { + char *endptr; + long vectors = strtol(buf, &endptr, 0); + if (*endptr) { + config_error(mon, "invalid syntax for # of vectors\n"); + ret = -1; + goto out; + } + if (vectors < 0 || vectors > 0x7ffffff) {...