Samba 3.0.20pre1 Available for Download
Richard Bollinger
rabollinger at comcast.net
Wed Jun 22 21:15:26 GMT 2005
Agreed... my patch was quick and dirty... I suspect that sizeof(...)-1 would
have been the correct replacement for strlen.
Thanks, Rich B
----- Original Message -----
From: "Herb Lewis" <hlewis at panasas.com>
To: "Richard Bollinger" <rabollinger at comcast.net>
Cc: "Gerald (Jerry) Carter" <jerry at samba.org>; <samba-technical at samba.org>
Sent: Wednesday, June 22, 2005 5:07 PM
Subject: Re: Samba 3.0.20pre1 Available for Download
> at least on linux those are not equivelent. Try the following program. I
> get different lengths printed.
>
> #include <stdio.h>
>
> #define MSG "Hello world\n"
> #define LEN1 sizeof(MSG)
> #define LEN2 strlen(MSG)
>
> main ()
> {
> printf(MSG);
> printf("len1=%d len2=%d\n",LEN1,LEN2);
> }
>
>
> Richard Bollinger wrote:
> > One more clunker... in client/smbspool.c. The Sun compiler doesn't
like
> > using strlen in an array length expression.
> >
> > Thanks, Rich B
> >
> > --- ../source/client/smbspool.c Mon May 9 12:05:29 2005
> > +++ ./client/smbspool.c Fri May 20 08:59:25 2005
> > @@ -29,7 +29,7 @@
> > #define TICKET_CC_DIR "/tmp"
> > #define CC_PREFIX "krb5cc_" /* prefix of the ticket
cache */
> > #define CC_MAX_FILE_LEN 24
> > -#define CC_MAX_FILE_PATH_LEN strlen(TICKET_CC_DIR)+
CC_MAX_FILE_LEN+2
> > +#define CC_MAX_FILE_PATH_LEN sizeof(TICKET_CC_DIR)+
CC_MAX_FILE_LEN+2
> > #define OVERWRITE 1
> > #define KRB5CCNAME "KRB5CCNAME"
More information about the samba-technical
mailing list