aboutsummaryrefslogtreecommitdiffstats
path: root/pcapio.c
diff options
context:
space:
mode:
authortuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>2012-02-21 15:38:30 +0000
committertuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>2012-02-21 15:38:30 +0000
commitfba8bb78f3695f67b84663b576e8190d101086d2 (patch)
tree0939499afe9afd0eb937c77c2783a5cfd8821d6d /pcapio.c
parent3c3b4f8ddef98d7545a4dab94d61ad6f96a444a5 (diff)
Whitespace changes.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41113 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'pcapio.c')
-rw-r--r--pcapio.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/pcapio.c b/pcapio.c
index 021b0f4a43..acd72e8429 100644
--- a/pcapio.c
+++ b/pcapio.c
@@ -289,28 +289,28 @@ libpcap_write_session_header_block(FILE *fp,
/* Size of base header */
block_total_length = sizeof(struct shb) +
sizeof(guint32);
- if ((comment)&&(strlen(comment) > 0) && (strlen(comment) < G_MAXUINT16)) {
+ if ((comment != NULL) && (strlen(comment) > 0) && (strlen(comment) < G_MAXUINT16)) {
block_total_length += sizeof(struct option) +
(guint16)(ADD_PADDING(strlen(comment) + 1));
have_options = TRUE;
}
- if ((hw)&&(strlen(hw) > 0) && (strlen(hw) < G_MAXUINT16)) {
+ if ((hw != NULL) && (strlen(hw) > 0) && (strlen(hw) < G_MAXUINT16)) {
block_total_length += sizeof(struct option) +
(guint16)(ADD_PADDING(strlen(hw) + 1));
have_options = TRUE;
}
- if ((os)&&(strlen(os) > 0) && (strlen(os) < G_MAXUINT16)) {
+ if ((os != NULL) && (strlen(os) > 0) && (strlen(os) < G_MAXUINT16)) {
block_total_length += sizeof(struct option) +
(guint16)(ADD_PADDING(strlen(os) + 1));
have_options = TRUE;
}
- if ((appname)&&(strlen(appname) > 0) && (strlen(appname) < G_MAXUINT16)) {
+ if ((appname != NULL) && (strlen(appname) > 0) && (strlen(appname) < G_MAXUINT16)) {
block_total_length += sizeof(struct option) +
(guint16)(ADD_PADDING(strlen(appname) + 1));
have_options = TRUE;
}
/* If we have options add size of end-of-options */
- if(have_options){
+ if (have_options) {
block_total_length += sizeof(struct option);
}
/* write shb header */
@@ -322,7 +322,7 @@ libpcap_write_session_header_block(FILE *fp,
shb.section_length = section_length;
WRITE_DATA(fp, &shb, sizeof(struct shb), *bytes_written, err);
- if ((comment)&&(strlen(comment) > 0) && (strlen(comment) < G_MAXUINT16)) {
+ if ((comment != NULL) && (strlen(comment) > 0) && (strlen(comment) < G_MAXUINT16)) {
/* write opt_comment options */
option.type = OPT_COMMENT;
option.value_length = (guint16)(strlen(comment) + 1);
@@ -332,7 +332,7 @@ libpcap_write_session_header_block(FILE *fp,
WRITE_DATA(fp, &padding, 4 - (strlen(hw) + 1) % 4, *bytes_written, err);
}
}
- if ((hw)&&(strlen(hw) > 0) && (strlen(hw) < G_MAXUINT16)) {
+ if ((hw != NULL) && (strlen(hw) > 0) && (strlen(hw) < G_MAXUINT16)) {
/* write shb_hardware options */
option.type = SHB_HARDWARE;
option.value_length = (guint16)(strlen(hw) + 1);
@@ -342,7 +342,7 @@ libpcap_write_session_header_block(FILE *fp,
WRITE_DATA(fp, &padding, 4 - (strlen(hw) + 1) % 4, *bytes_written, err);
}
}
- if ((os)&&(strlen(os) > 0) && (strlen(os) < G_MAXUINT16)) {
+ if ((os != NULL) && (strlen(os) > 0) && (strlen(os) < G_MAXUINT16)) {
/* write shb_os options */
option.type = SHB_OS;
option.value_length = (guint16)(strlen(os) + 1);
@@ -352,7 +352,7 @@ libpcap_write_session_header_block(FILE *fp,
WRITE_DATA(fp, &padding, 4 - (strlen(os) + 1) % 4, *bytes_written, err);
}
}
- if ((appname)&&(strlen(appname) > 0) && (strlen(appname) < G_MAXUINT16)) {
+ if ((appname != NULL) && (strlen(appname) > 0) && (strlen(appname) < G_MAXUINT16)) {
/* write shb_userappl options */
option.type = SHB_USERAPPL;
option.value_length = (guint16)(strlen(appname) + 1);
@@ -362,7 +362,7 @@ libpcap_write_session_header_block(FILE *fp,
WRITE_DATA(fp, &padding, 4 - (strlen(appname) + 1) % 4, *bytes_written, err);
}
}
- if(have_options){
+ if (have_options) {
/* write end of options */
option.type = OPT_ENDOFOPT;
option.value_length = 0;