diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-02-22 07:41:23 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-02-22 07:41:23 -0800 |
commit | 745de067999ec229f7253b5fd91e624e33861008 (patch) | |
tree | 3a3b41f362e4435b752090675f72162dd56d28fe | |
parent | 2cdd5bf0e73eff343d4ca085b315e78982e76202 (diff) | |
download | xdelta1-745de067999ec229f7253b5fd91e624e33861008.tar.gz xdelta1-745de067999ec229f7253b5fd91e624e33861008.tar.bz2 xdelta1-745de067999ec229f7253b5fd91e624e33861008.zip |
Fixed build
-rwxr-xr-x | libedsio/edsio.c | 2 | ||||
-rwxr-xr-x | xdelta.m4 | 2 | ||||
-rwxr-xr-x | xdmain.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/libedsio/edsio.c b/libedsio/edsio.c index 4d110f6..1c445fb 100755 --- a/libedsio/edsio.c +++ b/libedsio/edsio.c @@ -296,7 +296,7 @@ edsio_time_of_day (SerialGenericTime* setme) struct timeval tv; time_t t = time (NULL); - if (t < 0) + if (t == ((time_t)-1)) { edsio_generate_errno_event (EC_EdsioTimeFailure); goto bail; @@ -4,7 +4,7 @@ dnl AM_PATH_XDELTA([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for XDELTA, and define XDELTA_CFLAGS and XDELTA_LIBS, if "gmodule" or dnl -AC_DEFUN(AM_PATH_XDELTA, +AC_DEFUN([AM_PATH_XDELTA], [dnl dnl Get the cflags and libraries from the xdelta-config script dnl @@ -1063,7 +1063,7 @@ xd_handle_read (XdFileHandle *fh, guint8 *buf, gsize nbyte) if (! (fh->in_read) (fh, buf, nbyte)) /* This is suspicious */ { - xd_error ("read failed: %s\n", g_strerror (errno)); + xd_error ("read failed: %s\n", errno?g_strerror (errno):"Unexpected end of file"); return -1; } @@ -1225,7 +1225,7 @@ static gssize xd_handle_map_page (XdFileHandle *fh, guint pgno, const guint8** mem) { LRU* lru; - guint to_map; + gint to_map; #ifdef DEBUG_MAP g_print ("map %p:%d\n", fh, pgno); @@ -1299,7 +1299,7 @@ xd_handle_map_page (XdFileHandle *fh, guint pgno, const guint8** mem) return -1; } #else - if (! (lru->buffer = mmap (NULL, to_map, PROT_READ, MAP_PRIVATE, fh->fd, pgno * XD_PAGE_SIZE))) + if ( (lru->buffer = mmap (NULL, to_map, PROT_READ, MAP_PRIVATE, fh->fd, pgno * XD_PAGE_SIZE)) == MAP_FAILED ) { xd_error ("mmap failed: %s\n", g_strerror (errno)); return -1; @@ -1504,7 +1504,7 @@ delta_command (gint argc, gchar** argv) XdeltaSource* src; XdeltaControl* cont; gboolean from_is_compressed = FALSE, to_is_compressed = FALSE; - guint32 control_offset, header_offset; + gint32 control_offset, header_offset; const char* from_name, *to_name; guint32 header_space[HEADER_WORDS]; int fd; |