Minor change to rusers (Was: Re: minor header change in src/bin/dd/misc.c)

Joachim Strömbergson <[email protected]>
Newsgroups gmane.os.freebsd.devel.audit
Organization Strömbergson Intergalactic AB
Message-ID <[email protected]>
Aloha!

Mike Barcroft wrote:
> Giorgos Keramidas <[email protected]> writes:
> 
>>The source of bin/dd/misc.c doesn't use any of the functions of
>><strings.h> but uses strlen, which is defined in <string.h>.  The
>>following seems to fix the only warning this file triggers for me.
>>Does it seem ok to you all?
> 
> 
> Yes, it's correct.  <strings.h> is almost always wrong for BSD code.
> I removed the include of <string.h> from <strings.h> when I cleaned up
> those headers for POSIX compatibility, so there are probably other
> mis-includes throughout the system.

It seems that this applies to /usr/bin/rusers too. AFAIK the compilation
goes through and the behaviour seems to be unaltered. How about this patch?

<quote>
--- rusers.c    Wed Jul  4 22:20:31 2001
+++ rusers.c    Fri Jun 21 00:18:02 2002
@@ -46,7 +46,7 @@
 #include <netdb.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <strings.h>
+#include <string.h>
 #include <unistd.h>

 #define MAX_INT                0x7fffffff
</quote>

-- 
Med vänlig hälsning, Cheers!

Joachim Strömbergson
============================================================================
Joachim Strömbergson - ASIC designer, nice to *cute* animals.
    snail:                  phone:                     mail & web:
Sävenäsgatan 5A        +46 31 - 27 98 47          [email protected]
416 72 Göteborg        +46 733 75 97 02           www.ludd.luth.se/~watchman
============================================================================


To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.