Skip to content

Commit

Permalink
get_devname: fix a couple warnings
Browse files Browse the repository at this point in the history
Change-Id: I0dd2b109cbe015f30905169a573368716c2a73c5
  • Loading branch information
tpruvot authored and Flinny committed Apr 12, 2015
1 parent 352389a commit 68016f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions util-linux/volume_id/get_devname.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,18 @@ char *get_fstype_from_devname(const char *device)
{
#if ENABLE_FEATURE_BLKID_TYPE
struct uuidCache_s *uc;
struct stat *statbuf;
struct stat statbuf;

if (stat(device, statbuf) < 0)
if (stat(device, &statbuf) < 0)
return NULL;

if (!S_ISBLK(statbuf->st_mode) && !S_ISREG(statbuf->st_mode))
if (!S_ISBLK(statbuf.st_mode) && !S_ISREG(statbuf.st_mode))
return NULL;

add_to_uuid_cache(device);
uc = uuidcache_init(0);

return uc->type;
return (char*)uc->type;
#else
return NULL;
#endif
Expand Down

0 comments on commit 68016f9

Please sign in to comment.