~11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount/ubuntu/karmic/powertop/fixes-bug-428254

« back to all changes in this revision

Viewing changes to ethernet.c

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Winnertz
  • Date: 2007-08-20 22:23:53 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070820222353-cu1bkhc17vudikzl
Tags: 1.8-1
* Packaging new upstream release. 
* Correct the suggests to laptop-mode-tools. (Closes: #438616)
* Correct the command line syntax of hal-disable-polling (Closes: #435882)
* Allow powertop to build on all archs since some information are still
  there (wakeup counts).

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
 
67
67
        /* Check if the interface is up */
68
68
        ret = ioctl(sock, SIOCGIFFLAGS, &ifr);
69
 
        if (ret<0)
 
69
        if (ret<0) {
 
70
                close(sock);
70
71
                return;
 
72
        }
71
73
 
72
74
        if (ifr.ifr_flags & (IFF_UP | IFF_RUNNING)) {
73
75
                close(sock);
105
107
 
106
108
        /* Check if the interface is up */
107
109
        ret = ioctl(sock, SIOCGIFFLAGS, &ifr);
108
 
        if (ret<0)
 
110
        if (ret<0) {
 
111
                close(sock);
109
112
                return;
 
113
        }
110
114
 
111
115
        if (ifr.ifr_flags & (IFF_UP | IFF_RUNNING)) {
112
116
                close(sock);