Assorted whitespace cleanup and typo fixes.
[haiku.git] / src / bin / makeudfimage / MemoryStream.cpp
blobfbcab6f9e9c099f0bdcf15ce50abcfc9699cb31c
1 //----------------------------------------------------------------------
2 // This software is part of the OpenBeOS distribution and is covered
3 // by the OpenBeOS license.
4 //
5 // Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
6 //----------------------------------------------------------------------
8 /*! \file MemoryStream.cpp
9 */
11 #include "MemoryStream.h"
13 #include <stdlib.h>
14 #include <string.h>
16 MemoryStream::MemoryStream(void *buffer, size_t length)
17 : PositionIOStream(fMemory)
18 , fMemory(buffer, length)
19 , fInitStatus(buffer ? B_OK : B_NO_INIT)
23 status_t
24 MemoryStream::InitCheck() const
26 status_t error = PositionIOStream::InitCheck();
27 if (!error)
28 error = fInitStatus;
29 return error;