commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 01/12: libmachdev: fix getting parameter for get_status


From: Samuel Thibault
Subject: [hurd] 01/12: libmachdev: fix getting parameter for get_status
Date: Wed, 10 Dec 2014 15:16:58 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch dde
in repository hurd.

commit 88b4990e161cfbdd7740f987fd18e422e45a7917
Author: Justus Winter <address@hidden>
Date:   Fri Nov 14 18:28:12 2014 +0100

    libmachdev: fix getting parameter for get_status
    
    Complements aa949401.
    
    * libmachdev/net.c (device_get_status): Use count as number of parameter,
    not number of bytes. Take status as integer, not short.
---
 libmachdev/net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libmachdev/net.c b/libmachdev/net.c
index e04b558..53edcd0 100644
--- a/libmachdev/net.c
+++ b/libmachdev/net.c
@@ -513,10 +513,10 @@ device_get_status (void *d, dev_flavor_t flavor, 
dev_status_t status,
 
   if (flavor == NET_FLAGS)
     {
-      if (*count != sizeof(short))
+      if (*count != 1)
        return D_INVALID_SIZE;
 
-      *(short *) status = netdev_flags (net->dev);
+      *(int *) status = netdev_flags (net->dev);
       return D_SUCCESS;
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]