[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1143903 - in /subversion/branches/revprop-packing/subversion/libsvn_fs_fs: fs.h fs_fs.c

From: Peter Samuelson <peter_at_p12n.org>
Date: Thu, 7 Jul 2011 12:12:29 -0500

[hwright_at_apache.org]
> + /* Update the manifest. */
> + SVN_ERR(svn_stream_printf(manifest_stream, iterpool,
> + "%016" APR_OFF_T_FMT, next_offset));
> + next_offset += finfo.size;

Bikeshed time! I think space-padding (either %16 or %-16) would look
better than the zero-padding. The only reason to use ASCII digits is
for human readability, after all, right? left-alignint (%-16) also
means the scanf at the other end only has to scan 6 or so digits
instead of all 16, not that that's meaningful. (:

Also, for purely theoretical defense against ridiculousness, should we
assert(next_offset <= 9999999999999999llu) or so? (Not sure if there's
a portable suffix for a 64-bit constant.) Overflow is basically
impossible with today's computing and disk resources, but it would be
kinda bad if anyone managed to get it to happen.

-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
Received on 2011-07-07 19:13:04 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.