bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Small fix I'd like to see make it to 2.0.5 =)


From: Chris (Ducky) Chapin
Subject: Small fix I'd like to see make it to 2.0.5 =)
Date: Fri, 13 Dec 2002 10:46:05 -0800 (PST)

In prototypes.h, SplitCommand explicitly declares *arg as 4096. But
bufsize is already defined in cf.defs.h for this purpose. If you do need
to change the buffer size for some reason (you have a LOT of classes, for
instance), you need to change the value in both places.

Or, prototypes.h can be fixed to use the macro. =)

I noticed 2.0.5pre2 still had this, so I figured I'd bring it up. It's
nitpicking, really, but a small contribution to a cleaner code base, which
is always a Good Thing. Diff below.

-Ducky

==========
diff -u cfengine-2.0.5pre2.orig/src/prototypes.h 
cfengine-2.0.5pre2/src/prototypes.h
--- cfengine-2.0.5pre2.orig/src/prototypes.h    Wed Aug 21 01:14:20 2002
+++ cfengine-2.0.5pre2/src/prototypes.h Fri Dec 13 10:28:13 2002
@@ -711,7 +711,7 @@
 FILE *cfpopen_shsetuid ARGLIST((char *command, char *type, uid_t uid, gid_t 
gid, char *chdirv, char *chrootv));
 int cfpclose ARGLIST((FILE *pp));
 int cfpclose_def ARGLIST((FILE *pp, char *defines, char *elsedef));
-int SplitCommand ARGLIST((char *comm, char (*arg)[4096]));
+int SplitCommand ARGLIST((char *comm, char (*arg)[bufsize]));
 
 /* process.c */
 
==========

--

 Christopher 'Ducky' Chapin                        address@hidden
 Unix Systems Administrator - Qualcomm, Inc.           (858) 651-5433
 IT Host Services - AE-209F                                 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]