Commit 50a33ca4 authored by Mat's avatar Mat
Browse files

Fix comparisons between signed and unsigned numbers

parent e8517aa7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ static PyObject *do_attach(const char *name)
	}

	/* Ignore short files */
	if (file_info.st_size < sizeof (*meta)) {
	if (file_info.st_size < (off_t) sizeof (*meta)) {
		close(fd);
		PyErr_SetString(PyExc_IOError, "No SharedArray at this address");
		return NULL;
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ static PyObject *do_delete(const char *name)
	}

	/* Ignore short files */
	if (file_info.st_size < sizeof (*meta)) {
	if (file_info.st_size < (off_t) sizeof (*meta)) {
		close(fd);
		PyErr_SetString(PyExc_IOError, "No SharedArray at this address");
		return NULL;
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ static int get_meta(const char *filename, struct array_meta *meta)
		goto ret;

	/* Ignore short files */
	if (file_info.st_size < sizeof (*meta))
	if (file_info.st_size < (off_t) sizeof (*meta))
		goto ret;

	/* Seek to the meta data location */