MogileFS::Util: avoid calling syswrite on zero-length buffer
commit83dfe9644cbbc83b0f3bd05537874eecc8ad0a8c
authorEric Wong <normalperson@yhbt.net>
Wed, 3 Dec 2008 22:47:22 +0000 (3 14:47 -0800)
committerEric Wong <normalperson@yhbt.net>
Wed, 3 Dec 2008 22:47:22 +0000 (3 14:47 -0800)
treef61fe9a24fc086e388b3d76f64703de5c5b70374
parent02393ab1f3517436f1b8adee3c97e2b71a1f41f4
MogileFS::Util: avoid calling syswrite on zero-length buffer

This bug can't have a noticeable effect since writing a
zero-length buffer would result in nothing being written, but
this is more correct and can save a method dispatch and syscall.
lib/mogilefs/util.rb