httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ICS.UCI.EDU>
Subject Re: Am I really this stupid
Date Fri, 27 Jun 1997 20:11:54 GMT
In message <9706270948.AA22604@ jrc.it>, "Dirk.vanGulik" writes:
>
>Just a tidbit of mod_negotiate.c; which keeps doing
>strange things to the variant record;
>
>This is the bit of code
>
>#define DEBUG(x) { printf("mod_neg: "); printf x; printf("\n"); }
>
>void set_encoding_quality(negotiation_state *neg, var_rec *variant)
>{
>    int i;
>    accept_rec *accept_recs = (accept_rec *)neg->accept_encodings->elts;
>    char *enc = variant->content_encoding;
>
>    if (!enc || is_identity_encoding(enc)) {
>        variant->encoding_quality = 1.0;		/* ?? */
>DEBUG(("Exit %f",variant->encoding_quality));
>        return;
>    	};
>
>And this is the debug output
>
>	Exit 0.0
>
>I am being braindead; what zaps that value ?!?!???

mod_negotiation.c:    int   encoding_quality;  /* ditto encoding (1 or 0 only

Your compiler should have been smart enough to warn about a float
constant being place in an int.

....Roy

Mime
View raw message