From 54325147eee82997db08ca83f04a9b3752a718a3 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 12 Jul 2011 14:19:55 +0000 Subject: [PATCH] Reacted on warning of cppcheck about libburn/sg-freebsd-port.c --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/sg-freebsd-port.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 354633e..b978fe1 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2011.07.12.141838" +#define Cdrskin_timestamP "2011.07.12.141932" diff --git a/libburn/sg-freebsd-port.c b/libburn/sg-freebsd-port.c index ba016ba..a59a5fa 100644 --- a/libburn/sg-freebsd-port.c +++ b/libburn/sg-freebsd-port.c @@ -1,11 +1,14 @@ /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ /* - Copyright (c) 2006 - 2010 Thomas Schmitt + Copyright (c) 2006 - 2011 Thomas Schmitt Provided under GPL version 2 or later. */ + /* THIS CODE IS NOT FUNCTIONAL YET !!! */ + + /* This is the main operating system dependent SCSI part of libburn. It implements @@ -721,13 +724,11 @@ int burn_os_stdio_capacity(char *path, off_t *bytes) struct stat stbuf; struct statvfs vfsbuf; char *testpath = NULL, *cpt; - long blocks; off_t add_size = 0; int fd, ret; BURN_ALLOC_MEM(testpath, char, 4096); testpath[0] = 0; - blocks = *bytes / 512; if (stat(path, &stbuf) == -1) { strcpy(testpath, path); cpt = strrchr(testpath, '/'); @@ -744,7 +745,9 @@ int burn_os_stdio_capacity(char *path, off_t *bytes) } else if(S_ISBLK(stbuf.st_mode)) { int open_mode = O_RDWR, fd, ret; + long blocks; + blocks = *bytes / 512; if(burn_sg_open_o_excl) open_mode |= O_EXCL; fd = open(path, open_mode);