summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-22 07:41:23 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-02-22 07:41:23 -0800
commit745de067999ec229f7253b5fd91e624e33861008 (patch)
tree3a3b41f362e4435b752090675f72162dd56d28fe
parent2cdd5bf0e73eff343d4ca085b315e78982e76202 (diff)
downloadxdelta1-745de067999ec229f7253b5fd91e624e33861008.tar.gz
xdelta1-745de067999ec229f7253b5fd91e624e33861008.tar.bz2
xdelta1-745de067999ec229f7253b5fd91e624e33861008.zip
Fixed build
-rwxr-xr-xlibedsio/edsio.c2
-rwxr-xr-xxdelta.m42
-rwxr-xr-xxdmain.c8
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;
diff --git a/xdelta.m4 b/xdelta.m4
index 5a0dc11..5ffaf73 100755
--- a/xdelta.m4
+++ b/xdelta.m4
@@ -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
diff --git a/xdmain.c b/xdmain.c
index b1abc74..db801ff 100755
--- a/xdmain.c
+++ b/xdmain.c
@@ -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;