search for: buf1

Displaying 20 results from an estimated 60 matches for "buf1".

Did you mean: buf
2002 Jan 13
0
rsynd-2.5.1 / io.c patches
...atic void check_timeout(void) { @@ -163,9 +164,11 @@ * give a better explanation. We can tell whether the connection has * started by looking e.g. at whether the remote version is known yet. */ -static int read_timeout (int fd, char *buf, int len) +static int read_timeout (int fd, void *buf1, int len) { int n, ret=0; + unsigned char * buf; + buf = (unsigned char *)buf1; io_flush(); @@ -236,8 +239,10 @@ /*! Continue trying to read len bytes - don't return until len has been read. */ -static void read_loop (int fd, char *buf, int len) +stati...
2006 Sep 12
1
openssh (OpenBSD) , bsdauth and tis authsrv
nuqneH, I've tried using TIS authsrv authentication via bsd auth and found it quite limited. The most important restriction it does not log ip and fqdn of the remote peer, nor the application name, to the authentication server. It does not matter much for TIS authsrv, but since other applications do provide such information, our authsrv version uses it for extra authentication restrictions.
2008 May 29
0
Again, teach me speex AEC please!
...(pCodec->type != TYPE_DECODE) { return; } speex_bits_destroy(&pCodec->bits); speex_decoder_destroy(pCodec->pSt); free(pCodec); } /** * Encode a byte array. */ JNIEXPORT jint JNICALL Java_com_peterhi_Speex_encode(JNIEnv* env, jclass c, jint p, jbyteArray buf1, jbyteArray buf2) { jbyte* bytes1 = (*env)->GetByteArrayElements(env, buf1, JNI_FALSE); jbyte* bytes2 = (*env)->GetByteArrayElements(env, buf2, JNI_FALSE); int len1 = (*env)->GetArrayLength(env, buf1); int len2 = (*env)->GetArrayLength(env, buf2); jint ret = 0;...
2016 Feb 09
2
Question about __builtin_object_size
...ter that. For this case LLVM as result generates 0 or -1 depends of second argument of __builtin_object_size function. Is this correct behaviour or it should work as gcc (gcc calculates correct value for this case) ? Example for this issue: include <assert.h> int main() { struct V { char buf1[10]; int b; char buf2[10]; } var; char *p = &var.buf1[1], *q = &var.b; assert (__builtin_object_size (p, 0) == sizeof (var) - 1); return 0; } Thanks, Strahinja
2016 Feb 09
2
Question about __builtin_object_size
...second argument >> of __builtin_object_size function. Is this correct behaviour or it should >> work as gcc (gcc calculates correct value for this case) ? >> >> Example for this issue: >> >> include <assert.h> >> int main() { >> struct V { char buf1[10]; >> int b; >> char buf2[10]; >> } var; >> >> char *p = &var.buf1[1], *q = &var.b; >> assert (__builtin_object_size (p, 0) == sizeof (var) - 1); >> return 0; >> } >> >&g...
2017 Aug 20
2
RFC: Resolving TBAA issues
...s is that > > there are many ways to prove no-alias, and TBAA is one of them. > > The reason i stare at dump files and debug info is precisely to > > separate the TBAA portion from the rest. > > Makes sense to me. However, for a translation unit like this: > > struct BUF1 { ... }; > struct BUF2 { ... }; > > int foo(int n, struct BUF1* p, struct BUF2* q) { > for (int i = 0; i < n; i++) > p->b1 += q->b2; > return 0; > } > > I think we can be sure there are no ways for the compiler to know that > these two...
2012 May 03
1
[nut-commits] svn commit r3554 - branches/windows_port/common
...12 ? ? ? ?(r3553) > +++ branches/windows_port/common/wincompat.c ? ?Thu May ?3 08:31:38 2012 ? ? ? ?(r3554) > @@ -212,7 +212,7 @@ > ? ?of chars containing the message to display (no terminal 0 required here) */ > ?void syslog(int priority, const char *fmt, ...) > ?{ > - ? ? ? char buf1[LARGEBUF]; > + ? ? ? char buf1[LARGEBUF+sizeof(DWORD)]; > ? ? ? ?char buf2[LARGEBUF]; > ? ? ? ?va_list ap; > ? ? ? ?HANDLE pipe; > > _______________________________________________ > nut-commits mailing list > nut-commits at lists.alioth.debian.org > http://lists.alioth.d...
2017 Aug 20
2
RFC: Resolving TBAA issues
On Sun, Aug 20, 2017 at 2:47 AM, Ivan A. Kosarev via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hello Daniel, > > >>>> the type of (*x) is not compatible with the type of (*b) or, > >>>> recursively, type of b->i. Similarly, the type of (*b) is > >>>> not compatible with (*x) or, recursively, x->i. > >> ... >
2017 Oct 02
3
[PATCH 0/2] builder: Choose better weights in the planner.
It started out as "this'll be just a simple fix ..." and turned into something a bit over-engineered in the end. Here it is anyway. Rich.
2019 Aug 10
1
Re: [PATCH libnbd 2/9] generator: Generalize OFlags.
...ocaml/tests/test_410_pwrite.ml > @@ -33,7 +33,8 @@ let () = > let nbd = NBD.create () in > NBD.connect_command nbd ["nbdkit"; "-s"; "--exit-with-parent"; "-v"; > "file"; datafile]; > - NBD.pwrite nbd buf1 0_L ~flags:[NBD.cmd_flag_fua]; > + let flags = let open NBD.CMD_FLAG in [FUA] in > + NBD.pwrite nbd buf1 0_L ~flags; ...but not here. It doesn't affect the code, but the consistency may be worth it. This and patch 1 look fine to me. -- Eric Blake, Principal Software Engineer Red Hat...
2020 May 19
5
[PATCHv2] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
...@ int canonical_checksum(int csum_type) return csum_type >= CSUM_MD4 ? 1 : 0; } +#ifndef ENABLE_SSE2 // see checksum_sse2.cpp /* a simple 32 bit checksum that can be updated from either end (inspired by Mark Adler's Adler-32 checksum) @@ -119,6 +120,7 @@ uint32 get_checksum1(char *buf1, int32 len) } return (s1 & 0xffff) + (s2 << 16); } +#endif void get_checksum2(char *buf, int32 len, char *sum) { diff --git a/checksum_sse2.cpp b/checksum_sse2.cpp new file mode 100644 index 00000000..9a2ae86b --- /dev/null +++ b/checksum_sse2.cpp @@ -0,0 +1,289 @@ +/* + * SSE2/SS...
2003 Oct 05
2
Possible security hole
Maybe security related mails should be sent elsewhere? I didn't notice any so here it goes: sender.c:receive_sums() s->count = read_int(f); .. s->sums = (struct sum_buf *)malloc(sizeof(s->sums[0])*s->count); if (!s->sums) out_of_memory("receive_sums"); for (i=0; i < (int) s->count;i++) { s->sums[i].sum1 = read_int(f);
2002 Jan 13
0
rsynd-2.5.1 / checksum.c patches
...on 6-JAN-2002 22:41:06.45 OPENVMS_AXP */ /* Copyright (C) Andrew Tridgell 1996 Copyright (C) Paul Mackerras 1996 @@ -30,7 +31,7 @@ a simple 32 bit checksum that can be upadted from either end (inspired by Mark Adler's Adler-32 checksum) */ -uint32 get_checksum1(char *buf1,int len) +uint32 get_checksum1(const void *buf1,int len) { int i; uint32 s1, s2; @@ -49,7 +50,7 @@ } -void get_checksum2(char *buf,int len,char *sum) +void get_checksum2(const void *buf,int len,unsigned char *sum) { int i; static char *buf1; @@ -82,7 +83,7 @@...
2020 May 20
0
[PATCHv2] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
...return csum_type >= CSUM_MD4 ? 1 : 0; > } > > +#ifndef ENABLE_SSE2 // see checksum_sse2.cpp > /* > a simple 32 bit checksum that can be updated from either end > (inspired by Mark Adler's Adler-32 checksum) > @@ -119,6 +120,7 @@ uint32 get_checksum1(char *buf1, int32 len) > } > return (s1 & 0xffff) + (s2 << 16); > } > +#endif > > void get_checksum2(char *buf, int32 len, char *sum) > { > diff --git a/checksum_sse2.cpp b/checksum_sse2.cpp > new file mode 100644 > index 00000000..9a2ae86b > --- /dev/nul...
2020 May 18
3
[PATCH] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
What do you base this on? Per https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html : "For the x86-32 compiler, you must use -march=cpu-type, -msse or -msse2 switches to enable SSE extensions and make this option effective. For the x86-64 compiler, these extensions are enabled by default." That reads to me like we're fine for SSE2. As stated in my comments, SSSE3 support must be
2017 Aug 20
3
RFC: Resolving TBAA issues
...ny ways to prove no-alias, and TBAA is one of them. > > The reason i stare at dump files and debug info is precisely to > > separate the TBAA portion from the rest. > > Makes sense to me. However, for a translation unit like this: > > struct BUF1 { ... }; > struct BUF2 { ... }; > > int foo(int n, struct BUF1* p, struct BUF2* q) { > for (int i = 0; i < n; i++) > p->b1 += q->b2; > return 0; > } > > I think we can be sure there...
2020 May 18
6
[PATCH] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
...cksum(int csum_type) return csum_type >= CSUM_MD4 ? 1 : 0; } +#ifndef __SSE2__ // see checksum_sse2.c for SSE2/SSSE3 version /* a simple 32 bit checksum that can be updated from either end (inspired by Mark Adler's Adler-32 checksum) @@ -119,6 +120,7 @@ uint32 get_checksum1(char *buf1, int32 len) } return (s1 & 0xffff) + (s2 << 16); } +#endif void get_checksum2(char *buf, int32 len, char *sum) { diff --git a/checksum_sse2.c b/checksum_sse2.c new file mode 100644 index 00000000..51662833 --- /dev/null +++ b/checksum_sse2.c @@ -0,0 +1,243 @@ +/* + * SSE2/SSSE3-op...
2002 Mar 15
1
Weak CheckSum Question
Hi all, I am writing a xdelta-like application as a personal experiment and am busy implementing the rsync protocol, so far so good. I am using C++ templates and creating the algorithms so that operate on any stream, array, etc. through iterators. All seems well except that I am getting a lot of false hits with the weak checksum. When generating checksums of blocksize 1024 on the RedHat 7.1
2019 Aug 10
0
[PATCH libnbd 2/9] generator: Generalize OFlags.
...test_410_pwrite.ml +++ b/ocaml/tests/test_410_pwrite.ml @@ -33,7 +33,8 @@ let () = let nbd = NBD.create () in NBD.connect_command nbd ["nbdkit"; "-s"; "--exit-with-parent"; "-v"; "file"; datafile]; - NBD.pwrite nbd buf1 0_L ~flags:[NBD.cmd_flag_fua]; + let flags = let open NBD.CMD_FLAG in [FUA] in + NBD.pwrite nbd buf1 0_L ~flags; let buf2 = Bytes.create 512 in NBD.pread nbd buf2 0_L; diff --git a/ocaml/tests/test_460_block_status.ml b/ocaml/tests/test_460_block_status.ml index df861c9..69635b4 100644 --...
2019 Aug 10
0
[PATCH libnbd 1/5] python: Change aio_buffer into nbd.Buffer class.
...-pwrite.py index 4bbc494..71aa9ba 100644 --- a/python/t/510-aio-pwrite.py +++ b/python/t/510-aio-pwrite.py @@ -33,17 +33,17 @@ h = nbd.NBD () h.connect_command (["nbdkit", "-s", "--exit-with-parent", "-v", "file", datafile]) -buf1 = nbd.aio_buffer_from_bytearray (buf) +buf1 = nbd.Buffer.from_bytearray (buf) cookie = h.aio_pwrite (buf1, 0, nbd.CMD_FLAG_FUA) while not (h.aio_command_completed (cookie)): h.poll (-1) -buf2 = nbd.aio_buffer (512) +buf2 = nbd.Buffer (512) cookie = h.aio_pread (buf2, 0) while not (h.aio_...