ia64/xen-unstable

changeset 9657:b7802a60b09f

Initialise offsetopt when offset == 0. Closes bug #599.

Report and diagnosis by Robert Hendrickx <robert.hendrickx@advalvas.be>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Mon Apr 10 16:28:52 2006 +0100 (2006-04-10)
parents 7af0d54f598c
children c668b024b2c7
files tools/pygrub/src/fsys/ext2/ext2module.c
line diff
     1.1 --- a/tools/pygrub/src/fsys/ext2/ext2module.c	Mon Apr 10 16:26:23 2006 +0100
     1.2 +++ b/tools/pygrub/src/fsys/ext2/ext2module.c	Mon Apr 10 16:28:52 2006 +0100
     1.3 @@ -228,7 +228,10 @@ ext2_fs_open (Ext2Fs *fs, PyObject *args
     1.4      }
     1.5  
     1.6  #ifdef HAVE_EXT2FS_OPEN2
     1.7 -    if (offset != 0) {
     1.8 +    if (offset == 0) {
     1.9 +        offsetopt[0] = '\0';
    1.10 +    }
    1.11 +    else {
    1.12          snprintf(offsetopt, 29, "offset=%d", offset);
    1.13      }
    1.14