openbsd-ports/devel/libmtp/patches/patch-examples_delfile_c
jasper 8756029f01 - update libmtp to 1.0.3
from LEVAI Daniel, with some tweaks by me
ok william@ (MAINTAINER)
2010-12-21 18:16:04 +00:00

19 lines
530 B
Plaintext

$OpenBSD: patch-examples_delfile_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
Fix compilation with GCC2.
--- examples/delfile.c.orig Thu May 7 01:04:19 2009
+++ examples/delfile.c Tue Dec 21 14:02:39 2010
@@ -43,10 +43,10 @@ void
delfile_function(char * path)
{
uint32_t id = parse_path (path,files,folders);
+ int ret = 1;
if (id > 0) {
printf("Deleting %s which has item_id:%d\n",path,id);
- int ret = 1;
ret = LIBMTP_Delete_Object(device, id);
if (ret != 0) {
LIBMTP_Dump_Errorstack(device);