Hi,
This bit from setvbuf(3):
The size parameter may be given as zero to obtain
deferred optimal-size buffer allocation as usual.
doesn't describe what's happening in setvbuf.c. When size is 0,
fp->_fb.base is allocated immediately:
/*
* Find optimal I/O size for se
> On Jul 22, 2017, at 12:49 PM, Ingo Schwarze wrote:
>
> [...]
>
> * In main(), prefer "return" over exit(3).
Any particular reason for this or is that just the style that people
have settled on?
And to be clear you're saying
warn("whatever");
return 1;
is preferred over
Hi,
Unlikely to happen during normal use, but setvbuf(3) can fail
to allocate your buffer:
/* prog.c */
#include
int
main(int argc, char *argv[])
{
if (setvbuf(stdout, NULL, _IOFBF, 0))
perror("setvbuf");
2017-07-29 2:15 GMT+03:00 Андрей Болконский :
> sorry. correct patch:
>
> 2017-07-28 23:52 GMT+03:00 Андрей Болконский :
>
>> This header not used since retire sparc.
>> build amd64 is ok
FWIW, I've tested this patch on amd64. It lacks removing dkbad.h from
src/distrib/sets/lists/comp/mi, but othe
sorry. correct patch:
2017-07-28 23:52 GMT+03:00 Андрей Болконский :
> This header not used since retire sparc.
> build amd64 is ok
>
>
> *diff -ruN src/sys/ddb/db_structinfo.c mysrc/sys/ddb/db_structinfo.c*
> *--- src/sys/ddb/db_structinfo.c 2017-07-27 23:55:18.744698016 +0300*
> *+++ mysrc/sys/
> Date: Fri, 28 Jul 2017 20:45:10 +
> From: Florian Obser
>
> same for libform as previous diff for mopd.
>
> OK?
ok kettenis@
> diff --git frm_driver.c frm_driver.c
> index de06cdaf8a4..0e8ca3b88a5 100644
> --- frm_driver.c
> +++ frm_driver.c
> @@ -1285,7 +1285,7 @@ _nc_Synchronize_Option
> Date: Fri, 28 Jul 2017 20:43:06 +
> From: Florian Obser
>
> this silences
>
> cc -O2 -pipe -I/usr/src/usr.sbin/mopd/mopd -I/usr/src/usr.sbin/mopd/mopd/..
> -I/usr/src/usr.sbin/mopd/mopd/../common -Werror-implicit-function-declaration
> -MD -MP -c /usr/src/usr.sbin/mopd/mopd/process.c
This header not used since retire sparc.
build amd64 is ok
*diff -ruN src/sys/ddb/db_structinfo.c mysrc/sys/ddb/db_structinfo.c*
*--- src/sys/ddb/db_structinfo.c 2017-07-27 23:55:18.744698016 +0300*
*+++ mysrc/sys/ddb/db_structinfo.c 2017-07-28 00:36:10.241963162 +0300*
*@@ -1,5 +1,6 @@*
* /* $Op
same for libform as previous diff for mopd.
OK?
diff --git frm_driver.c frm_driver.c
index de06cdaf8a4..0e8ca3b88a5 100644
--- frm_driver.c
+++ frm_driver.c
@@ -1285,7 +1285,7 @@ _nc_Synchronize_Options(FIELD *field, Field_Options
newopts)
if (form->status & _POSTED)
{
-
this silences
cc -O2 -pipe -I/usr/src/usr.sbin/mopd/mopd -I/usr/src/usr.sbin/mopd/mopd/..
-I/usr/src/usr.sbin/mopd/mopd/../common -Werror-implicit-function-declaration
-MD -MP -c /usr/src/usr.sbin/mopd/mopd/process.c
/usr/src/usr.sbin/mopd/mopd/process.c:139:17: warning: equality comparison w
Martin Pieuchot:
> The second one has been found by Matthias Pitzl and fixed this week
> by bluhm@: em(4) was reporting incorrect link state. This link state
> being applied to the corresponding routes, rtisvalid() would refuse
> to use the selected route which would break some NFS setups.
>
> P
On Fri, Jul 28, 2017 at 09:34:29PM +0200, Frederic Cambus wrote:
> Hi tech@,
>
> plog format string should be literal.
>
> Comments? OK?
OK
while you are in there, can you add format attributes to plog like our
log.h has (see usr.sbin/bgpd/log.h for example)
>
> Index: usr.sbin/amd/amd/ifs_op
Hi tech@,
plog format string should be literal.
Comments? OK?
Index: usr.sbin/amd/amd/ifs_ops.c
===
RCS file: /cvs/src/usr.sbin/amd/amd/ifs_ops.c,v
retrieving revision 1.5
diff -u -p -r1.5 ifs_ops.c
--- usr.sbin/amd/amd/ifs_ops.c 2
I just want to point out that we already return -1 for mmap allocation
failures in the positional argument code.
- todd
pointed out by clang
OK?
diff --git pool.c pool.c
index b6691ae0da6..3b289446522 100644
--- pool.c
+++ pool.c
@@ -496,6 +496,7 @@ unalloc:
pc = &pool_caches[--i];
free(pc->cache_cpus);
}
+ return (-1);
}
void
--
I'm not entirely sure you are r
New diff, which
a) deals with ENFILE
b) fixes an embarrassing bug for IPv6 accepts
Any OKs?
Index: parse.y
===
RCS file: /cvs/src/usr.sbin/snmpd/parse.y,v
retrieving revision 1.43
diff -u -p -p -u -r1.43 parse.y
--- parse.y 5
On Fri, Jul 28, 2017 at 12:36:22PM +, Florian Obser wrote:
> not really a problem, errstr are just various static strings, but still...
>
> pointed out by clang, OK?
OK claudio@
> diff --git snmpd/parse.y snmpd/parse.y
> index efd1159c3ab..cc3d4194556 100644
> --- snmpd/parse.y
> +++ snmpd/
On Fri, Jul 28, 2017 at 12:34:25PM +, Florian Obser wrote:
>
> clang...
>
> OK?
OK claudio@
> diff --git route6d/log.c route6d/log.c
> index 3dd3aefe558..efaba6900e5 100644
> --- route6d/log.c
> +++ route6d/log.c
> @@ -93,7 +93,7 @@ vlog(int pri, const char *fmt, va_list ap)
>
> (v
On Fri, Jul 28, 2017 at 12:27:15PM +, Florian Obser wrote:
> ... pointed out by clang
>
> OK?
OK claudio@
>
>
> diff --git dvmrpctl/parser.c dvmrpctl/parser.c
> index ffbf7c05a1e..17ec5fbb33a 100644
> --- dvmrpctl/parser.c
> +++ dvmrpctl/parser.c
> @@ -54,7 +54,6 @@ static const struct toke
On Fri, Jul 28, 2017 at 12:32:56PM +, Florian Obser wrote:
>
> clang...
>
> OK?
OK claudio@
>
> diff --git ripctl/parser.c ripctl/parser.c
> index e82045f0eb7..08a7e88e71a 100644
> --- ripctl/parser.c
> +++ ripctl/parser.c
> @@ -54,8 +54,6 @@ static const struct token t_main[];
> static co
Hello,
Here is a patch to route(8) to automatically choose the right address family
when adding a default route using the "default" keyword.
Index: route.8
===
RCS file: /cvs/src/sbin/route/route.8,v
retrieving revision 1.79
diff -u
> Date: Fri, 28 Jul 2017 12:34:25 +
> From: Florian Obser
>
> clang...
>
> OK?
ok kettenis@
> diff --git route6d/log.c route6d/log.c
> index 3dd3aefe558..efaba6900e5 100644
> --- route6d/log.c
> +++ route6d/log.c
> @@ -93,7 +93,7 @@ vlog(int pri, const char *fmt, va_list ap)
>
> (v
> Date: Fri, 28 Jul 2017 12:27:15 +
> From: Florian Obser
>
> ... pointed out by clang
>
> OK?
ok kettenis@
> diff --git dvmrpctl/parser.c dvmrpctl/parser.c
> index ffbf7c05a1e..17ec5fbb33a 100644
> --- dvmrpctl/parser.c
> +++ dvmrpctl/parser.c
> @@ -54,7 +54,6 @@ static const struct token
> Date: Fri, 28 Jul 2017 12:32:56 +
> From: Florian Obser
>
> clang...
>
> OK?
ok kettenis@
> diff --git ripctl/parser.c ripctl/parser.c
> index e82045f0eb7..08a7e88e71a 100644
> --- ripctl/parser.c
> +++ ripctl/parser.c
> @@ -54,8 +54,6 @@ static const struct token t_main[];
> static con
On Fri, 28 Jul 2017 12:36:22 + Florian Obser wrote:
> not really a problem, errstr are just various static strings, but still...
>
> pointed out by clang, OK?
>
> diff --git snmpd/parse.y snmpd/parse.y
> index efd1159c3ab..cc3d4194556 100644
> --- snmpd/parse.y
> +++ snmpd/parse.y
> @@ -273,
On Fri, 28 Jul 2017 12:39:48 + Florian Obser wrote:
> Not sure about this one, a quick glance at RFC 3411 suggests this
> is just a binary string, so uint8_t is more appropriate.
>
> Any snmp nerds around?
>
> clang complained about this:
>
> /usr/src/usr.sbin/snmpd/snmpd.c:349:47: warning:
Florian Obser writes:
> this made my head hurt, pointed out by clang.
>
> "logical not is only applied to the left hand side of this comparison
> [-Wlogical-not-parentheses]"
>
> OK?
oh I realized I had forgotten something,
I've this change in my tree for months and ok'ed by millert@.
please c
Not sure about this one, a quick glance at RFC 3411 suggests this
is just a binary string, so uint8_t is more appropriate.
Any snmp nerds around?
clang complained about this:
/usr/src/usr.sbin/snmpd/snmpd.c:349:47: warning: implicit conversion from 'int'
to 'char' changes value from 128 to -128
not really a problem, errstr are just various static strings, but still...
pointed out by clang, OK?
diff --git snmpd/parse.y snmpd/parse.y
index efd1159c3ab..cc3d4194556 100644
--- snmpd/parse.y
+++ snmpd/parse.y
@@ -273,14 +273,14 @@ main : LISTEN ON STRING {
clang...
OK?
diff --git route6d/log.c route6d/log.c
index 3dd3aefe558..efaba6900e5 100644
--- route6d/log.c
+++ route6d/log.c
@@ -93,7 +93,7 @@ vlog(int pri, const char *fmt, va_list ap)
(void)vsnprintf(tmpbuf, sizeof(tmpbuf), fmt, ap);
(void)strlcpy(logbuf, logqueue, sizeof(lo
clang...
OK?
diff --git ripctl/parser.c ripctl/parser.c
index e82045f0eb7..08a7e88e71a 100644
--- ripctl/parser.c
+++ ripctl/parser.c
@@ -54,8 +54,6 @@ static const struct token t_main[];
static const struct token t_fib[];
static const struct token t_show[];
static const struct token t_show_i
this can probably go. I wandered in there because clang says:
/usr/src/usr.sbin/mtrace/mtrace.c:949:12: warning: taking the absolute value of
unsigned type 'unsigned int' has no effect [-Wabsolute-value]
if (*s || abs(ntohl(n->tr_vifout) - ntohl(p->tr_vifout)) > 10) {
this made my head hurt, pointed out by clang.
"logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]"
OK?
diff --git ldapd/modify.c ldapd/modify.c
index f5d9007faaa..485d0fcfba9 100644
--- ldapd/modify.c
+++ ldapd/modify.c
@@ -132,7 +132,7 @@ ldap_add(s
... pointed out by clang
OK?
diff --git dvmrpctl/parser.c dvmrpctl/parser.c
index ffbf7c05a1e..17ec5fbb33a 100644
--- dvmrpctl/parser.c
+++ dvmrpctl/parser.c
@@ -54,7 +54,6 @@ static const struct token t_show_iface[];
static const struct token t_show_nbr[];
static const struct token t_show_mfc
> Date: Thu, 27 Jul 2017 19:50:26 +
> From: Florian Obser
>
> ... to silence clang warnings, it kinda has a point...
>
> e.g.:
>
> /usr/src/usr.sbin/nsd/zonec.c:642:6: warning: implicit declaration of
> function
> '__b64_pton' is invalid in C99 [-Wimplicit-function-declaratio
On Fri, Jul 28, 2017 at 01:19:39PM +0200, Theo Buehler wrote:
> On Thu, Jul 27, 2017 at 10:31:51AM +0100, Larry Hynes wrote:
> > Hi
> >
> > $ env | grep LESS
> > LESSHISTFILE=-
> > LESS="-i -M -R -g -c"
> > LESSCHARSET=utf-8
> >
> > $ unset LESS
> > $ unset LESSCHARSET
> > $ unset LESSHISTFILE
>
On Thu, Jul 27, 2017 at 10:31:51AM +0100, Larry Hynes wrote:
> Hi
>
> $ env | grep LESS
> LESSHISTFILE=-
> LESS="-i -M -R -g -c"
> LESSCHARSET=utf-8
>
> $ unset LESS
> $ unset LESSCHARSET
> $ unset LESSHISTFILE
>
> $ LESS="-g"
> $ echo 'foo\nbar\nfoo\nbar\nfoo\nbar' | less
>
> While in less, '/
I proposed this changed in 2015 and sadly it exposed two bugs at that
time.
The first one has been found and fixed during g2k16: a default route
was referencing a stale ifa and considered invalid by rtisvalid().
The second one has been found by Matthias Pitzl and fixed this week
by bluhm@: em(4)
On Fri, Jul 28, 2017 at 06:13:50PM +1000, Jonathan Gray wrote:
> The handling of 'add' used by bridge and switch in ifconfig does not
> error out if the ioctl returns EEXIST. Do the same for the switch
> specific 'addlocal' and 'portno' ioctls so netstart won't error out
> when rerun with the same
The handling of 'add' used by bridge and switch in ifconfig does not
error out if the ioctl returns EEXIST. Do the same for the switch
specific 'addlocal' and 'portno' ioctls so netstart won't error out
when rerun with the same settings in hostname.switchN.
Index: brconfig.c
=
40 matches
Mail list logo