Re: error: expected ')' before '*' token -- What is this ?
- From: santosh <santosh.k83@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 17:42:50 +0530
Ram Prasad wrote:
Please don't remove attribution lines.
[Richard wrote]
Post all the code in that file and then "line 42" will be in context. It
isn't even apparent from above what IS on line 42. "----"? ". . . "? or
SPF_ ?
The file is here
----
#include "mdef.h"
FILE* LOGFILE;
It idiomatic in C to reserve all uppercase names for macros.
/*
* Opens file ( /var/log/milter.log ) for debug log
* any milter code can print to log file using addlog function
*/
void opendbglog(void){
LOGFILE=NULL;
LOGFILE=fopen(LOGFILENAME,"a");
if(LOGFILE==NULL){
fprintf(stderr,"Couldnot open logfile\n");
exit(1);
}
fprintf(LOGFILE,"opened logfile\n");
setvbuf(LOGFILE, (char *)NULL, _IONBF, 0);
The cast is not needed.
}
/*
* Debug function
* using va_args for number of args
* usage addlog(number_of_arguments,arg1,arg2,arg3,arg4...)
*/
void addlog(int num_args, ... ) {
va_list ap;
if(LOGFILE == NULL ) return;
va_start(ap,num_args);
while(num_args--) fprintf(LOGFILE," %s ", va_arg(ap,char*));
va_end(ap);
fprintf(LOGFILE,"\n");
return;
}
SPF_result_t spfcheck_s(SPF_request_t *ecm_spf_request, char* ip,
char* helo, char* sender) {
SPF_response_t *spf_response = NULL;
SPF_result_t t;
SPF_request_set_ipv4_str( ecm_spf_request, ip );
SPF_request_set_helo_dom( ecm_spf_request, helo );
SPF_request_set_env_from( ecm_spf_request, sender );
SPF_request_query_mailfrom(ecm_spf_request, &spf_response);
t = SPF_response_result(spf_response);
SPF_response_free(spf_response);
return t;
}
We'll need to see the definitions for SPF_*_t types. I can't spot anything
amiss, just looking at the above code.
.
- References:
- error: expected ')' before '*' token -- What is this ?
- From: Ram Prasad
- Re: error: expected ')' before '*' token -- What is this ?
- From: Richard
- Re: error: expected ')' before '*' token -- What is this ?
- From: Ram Prasad
- error: expected ')' before '*' token -- What is this ?
- Prev by Date: Re: circular shift array
- Next by Date: Re: error: expected ')' before '*' token -- What is this ?
- Previous by thread: Re: error: expected ')' before '*' token -- What is this ?
- Next by thread: Re: error: expected ')' before '*' token -- What is this ?
- Index(es):
Relevant Pages
|