Date: Thu, 12 Jul 2007 12:17:55 -0400 From: "Constantine A. Murenin" <cnst@FreeBSD.org> To: Alexey Tarasov <taleks@FreeBSD.org> Cc: Shteryana Shopova <syrinx@FreeBSD.org>, Perforce Change Reviews <perforce@FreeBSD.org>, "Constantine A. Murenin" <cnst@FreeBSD.org> Subject: Re: PERFORCE change 123376 for review Message-ID: <46965433.6050207@FreeBSD.org> In-Reply-To: <200707121428.l6CESBSj045007@repoman.freebsd.org> References: <200707121428.l6CESBSj045007@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/07/2007 10:28, Alexey Tarasov wrote: > http://perforce.freebsd.org/chv.cgi?CH=123376 > > Change 123376 by taleks@taleks_th on 2007/07/12 14:27:18 > ... > @@ -104,11 +107,11 @@ > } > > if ( (from == 0) && (size == 0) ) { > - sprintf(http_data, "GET /%s HTTP/1.1\r\nHost: %s\r\nConnection: Close\r\n\r\n", > + sprintf(http_data, "GET /%s HTTP/1.1\r\nHost: %s\r\nConnection: Close\r\nUser-Agent: pxe_http/0\r\n\r\n", > filename, server_name > ); > } else { > - sprintf(http_data, "GET /%s HTTP/1.1\r\nHost: %s\r\nRange: %d-%d\r\nConnection: Close\r\n\r\n", > + sprintf(http_data, "GET /%s HTTP/1.1\r\nHost: %s\r\nRange: bytes=%d-%d\r\nConnection: Close\r\nUser-Agent: pxe_http/0\r\n\r\n", > filename, server_name, from, from + size > ); > } You might want to change long lines like these to something as follows: if ( (from == 0) && (size == 0) ) sprintf(http_data, "GET /%s HTTP/1.1\r\nHost: %s\r\n" "Connection: Close\r\nUser-Agent: pxe_http/0\r\n\r\n", filename, server_name); else sprintf(http_data, "GET /%s HTTP/1.1\r\nHost: %s\r\n" "Range: bytes=%d-%d\r\n" "Connection: Close\r\nUser-Agent: pxe_http/0\r\n\r\n", filename, server_name, from, from + size); Also note that ");" should not appear on a line by itself, if I'm reading style(9) correctly. Removing curly brackets is optional in this case, because lines are somewhat long, but personally, I do like them removed, too. :) Cheers, Constantine.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46965433.6050207>