Commit Graph

27 Commits

Author SHA1 Message Date
asomers
36c8720073 Delete dead code in chat(8)
It's always been dead, ever since first import in 1994.  It's still dead in
OpenBSD's version, too.

Reported by:	Coverity
CID:		270586
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
2017-01-04 16:24:40 +00:00
truckman
c577669dd3 Fix off by one error that overflowed the rep_len array when doing
the final NUL termination.

Reported by:	Coverity
CID:		1007617
MFC after:	1 week
2016-05-16 19:48:02 +00:00
pfg
fbf894cd86 chat(8): use NULL instead of zero for initializing a pointer. 2016-05-12 02:02:16 +00:00
ed
af31e8843c More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
2012-10-19 14:49:42 +00:00
kevlo
07ebfe1b9c Make sure that each va_start has one and only one matching va_end,
especially in error cases.
2012-05-29 01:48:06 +00:00
delphij
6d5f005346 Merge revisions 1.10 and 1.11 from DragonFly:
- Use real getopt() handling instead of the hand-rolled and
   IOCCC-worthy "Micro getopt()" macros, plus clean up to the
   option handling code:
    * Sort the options in the switch statement;
    * Plug piddling memory leaks when processing repeated options
      by freeing strings before allocating them for a second time;
    * Die with a fatal error if the requested report file cannot
      be opened for appending;
    * Don't call init() before usage() (to prevent the usage
      message being mangled by changes to the terminal settings;)
 - Clean up the usage message, both in usage() and in the main
   program comment, both stylistically (sort and combine options)
   and for accuracy (following the manual page, make note of the -s
   and -S flags, and use the term 'send' instead of 'say' to reduce
   confusion (SAY is the name of a command for output to the user,
   not the connection.))

Obtained from:	DragonFly
2008-03-07 00:01:19 +00:00
kientzle
be1f9cb502 Rename logf --> chat_logf to avoid naming conflicts
with GCC built-in (and with C90 reserved library name).

Approved by:	gordon (Mentor)
2003-10-31 06:22:03 +00:00
markm
598a90a3bd Big cleanup. Remove unused stuff, make closer to style(9).
OK'ed by:	peter (long time ago)
2003-08-22 17:47:40 +00:00
charnier
7dd9d47059 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
jmallett
2b6e4e1504 Remove local prototypes for main(). 2002-08-19 03:07:56 +00:00
imp
74d826c7a6 remove __P 2002-03-22 01:22:50 +00:00
sheldonh
9bfb9eedcd Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.

Submitted by:   David Hill <david@phobia.ms>
2001-07-26 11:02:39 +00:00
kris
9aee982353 Fix a buffer overflow due to sending strings >1k in length. This is unlikely
to be a security problem, but it's not totally impossible. OpenBSD take note

Reviewed by:	imp
1999-11-25 07:28:54 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
archie
167c036e91 Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]). 1998-12-06 22:58:23 +00:00
peter
1fd5135a7b Merge ppp 2.3.3 -> 2.3.5 changes (for what it's worth) 1998-06-23 21:58:41 +00:00
peter
d0a0b2bbfb merge ppp-2.3.3 changes onto mainline 1998-03-21 20:47:53 +00:00
alex
005e82d0d4 -Wall cleanup. 1997-12-29 00:09:06 +00:00
peter
7072a26c53 Merge ppp-2.3.1 changes onto mainline 1997-08-22 15:24:36 +00:00
charnier
c8e3da3b20 Remove use of program_name variable. 1997-06-24 06:52:33 +00:00
jmg
cbecc84afb make it so that chat doesn't fail when it can't get terminal params..
this allows it to work on non-tty input...  also don't warn when this
happens as it could get noisy...

Silence is Acceptance
1997-04-02 09:55:26 +00:00
peter
f390c26dd9 Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
peter
77550cade3 Merge in changes from ppp-2.2's chat onto the mainline... 1995-10-31 23:28:29 +00:00
rgrimes
a14d555c87 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
ache
141b6b09cc Use proper lock dir name 1994-12-19 01:02:11 +00:00
lars
91bf4b94c3 chat for ppp, from ppp 2.1.2 1994-11-12 05:25:32 +00:00