summaryrefslogtreecommitdiff
authorerik <erik>2007-05-10 23:34:29 (UTC)
committer erik <erik>2007-05-10 23:34:29 (UTC)
commite87affd3d9a8a7d705d0dc3d1a4905e1e3f902d0 (patch) (unidiff)
treea5b03a9e3dbff8f004f10d33c15fd86601f213f9
parent34975323367e4a903886cd317b34192f1271a1f2 (diff)
downloadopie-e87affd3d9a8a7d705d0dc3d1a4905e1e3f902d0.zip
opie-e87affd3d9a8a7d705d0dc3d1a4905e1e3f902d0.tar.gz
opie-e87affd3d9a8a7d705d0dc3d1a4905e1e3f902d0.tar.bz2
application of proper parens for the socket call check
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/irdaapplet/irda.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp
index d57104b..848ddb4 100644
--- a/core/applets/irdaapplet/irda.cpp
+++ b/core/applets/irdaapplet/irda.cpp
@@ -25,65 +25,65 @@
25#include <qpe/ir.h> 25#include <qpe/ir.h>
26 26
27 27
28/* QT */ 28/* QT */
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qfile.h> 30#include <qfile.h>
31#include <qtimer.h> 31#include <qtimer.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33 33
34/* STD */ 34/* STD */
35#include <unistd.h> 35#include <unistd.h>
36#include <net/if.h> 36#include <net/if.h>
37#include <netinet/in.h> 37#include <netinet/in.h>
38#include <sys/types.h> 38#include <sys/types.h>
39#include <sys/socket.h> 39#include <sys/socket.h>
40#include <sys/ioctl.h> 40#include <sys/ioctl.h>
41 41
42//=========================================================================== 42//===========================================================================
43 43
44IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) : 44IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) :
45 QWidget ( parent, name ), 45 QWidget ( parent, name ),
46 m_irda_active( false ), 46 m_irda_active( false ),
47 m_irda_discovery_active( false ), 47 m_irda_discovery_active( false ),
48 m_receive_active( false ), 48 m_receive_active( false ),
49 m_receive_state_changed( false ), 49 m_receive_state_changed( false ),
50 m_popup( 0 ), 50 m_popup( 0 ),
51 m_wasOn( false ), 51 m_wasOn( false ),
52 m_wasDiscover( false ) 52 m_wasDiscover( false )
53{ 53{
54 setFixedHeight( AppLnk::smallIconSize() ); 54 setFixedHeight( AppLnk::smallIconSize() );
55 setFixedWidth( AppLnk::smallIconSize() ); 55 setFixedWidth( AppLnk::smallIconSize() );
56 56
57 if (m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ) == -1) 57 if ( ( m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ) ) == -1)
58 perror ( "failed grabbing IrDA socket" ); 58 perror ( "failed grabbing IrDA socket" );
59 59
60 m_irdaOnPixmap = 60 m_irdaOnPixmap =
61 Opie::Core::OResource::loadPixmap( "irdaapplet/irdaon", 61 Opie::Core::OResource::loadPixmap( "irdaapplet/irdaon",
62 Opie::Core::OResource::SmallIcon ); 62 Opie::Core::OResource::SmallIcon );
63 m_irdaOffPixmap = 63 m_irdaOffPixmap =
64 Opie::Core::OResource::loadPixmap( "irdaapplet/irdaoff", 64 Opie::Core::OResource::loadPixmap( "irdaapplet/irdaoff",
65 Opie::Core::OResource::SmallIcon ); 65 Opie::Core::OResource::SmallIcon );
66 m_irdaDiscoveryOnPixmap = 66 m_irdaDiscoveryOnPixmap =
67 Opie::Core::OResource::loadPixmap( "irdaapplet/magglass", 67 Opie::Core::OResource::loadPixmap( "irdaapplet/magglass",
68 Opie::Core::OResource::SmallIcon ); 68 Opie::Core::OResource::SmallIcon );
69 m_receiveActivePixmap = 69 m_receiveActivePixmap =
70 Opie::Core::OResource::loadPixmap( "irdaapplet/receive", 70 Opie::Core::OResource::loadPixmap( "irdaapplet/receive",
71 Opie::Core::OResource::SmallIcon ); 71 Opie::Core::OResource::SmallIcon );
72 72
73 QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); 73 QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this );
74 connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), this, 74 connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), this,
75 SLOT(slotMessage(const QCString&,const QByteArray&) ) ); 75 SLOT(slotMessage(const QCString&,const QByteArray&) ) );
76} 76}
77 77
78int IrdaApplet::position() 78int IrdaApplet::position()
79{ 79{
80 return 6; 80 return 6;
81} 81}
82 82
83void IrdaApplet::show() 83void IrdaApplet::show()
84{ 84{
85 QWidget::show ( ); 85 QWidget::show ( );
86 startTimer ( 2000 ); 86 startTimer ( 2000 );
87} 87}
88 88
89IrdaApplet::~IrdaApplet() 89IrdaApplet::~IrdaApplet()