[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12529 - Extractor/src/plugins
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12529 - Extractor/src/plugins |
Date: |
Sat, 14 Aug 2010 21:51:53 +0200 |
Author: grothoff
Date: 2010-08-14 21:51:53 +0200 (Sat, 14 Aug 2010)
New Revision: 12529
Modified:
Extractor/src/plugins/asf_extractor.c
Log:
reducing strlen calls
Modified: Extractor/src/plugins/asf_extractor.c
===================================================================
--- Extractor/src/plugins/asf_extractor.c 2010-08-14 15:09:49 UTC (rev
12528)
+++ Extractor/src/plugins/asf_extractor.c 2010-08-14 19:51:53 UTC (rev
12529)
@@ -735,6 +735,7 @@
const char *options)
{
demux_asf_t this;
+ size_t slen;
memset (&this, 0, sizeof (demux_asf_t));
this.input = data;
@@ -743,38 +744,38 @@
if (0 == asf_read_header (&this))
return 0;
- if ( ( (strlen(this.title) > 0) &&
+ if ( ( (0 < (slen = strlen(this.title))) &&
(0 != proc (proc_cls,
"asf",
EXTRACTOR_METATYPE_TITLE,
EXTRACTOR_METAFORMAT_C_STRING,
"text/plain",
this.title,
- strlen(this.title) + 1)) ) ||
- ( (strlen(this.author) > 0) &&
+ slen + 1)) ) ||
+ ( (0 < (slen = strlen(this.author))) &&
(0 != proc (proc_cls,
"asf",
EXTRACTOR_METATYPE_AUTHOR_NAME,
EXTRACTOR_METAFORMAT_C_STRING,
"text/plain",
this.author,
- strlen(this.author) + 1)) ) ||
- ( (strlen(this.comment) > 0) &&
+ slen + 1)) ) ||
+ ( (0 < (slen = strlen(this.comment))) &&
(0 != proc (proc_cls,
"asf",
EXTRACTOR_METATYPE_COMMENT,
EXTRACTOR_METAFORMAT_C_STRING,
"text/plain",
this.comment,
- strlen(this.comment) + 1)) ) ||
- ( (strlen(this.copyright) > 0) &&
+ slen + 1)) ) ||
+ ( (0 < (slen = strlen(this.copyright))) &&
(0 != proc (proc_cls,
"asf",
EXTRACTOR_METATYPE_COPYRIGHT,
EXTRACTOR_METAFORMAT_C_STRING,
"text/plain",
this.copyright,
- strlen(this.copyright) + 1)) ) ||
+ slen + 1)) ) ||
(0 != proc (proc_cls,
"asf",
EXTRACTOR_METATYPE_MIMETYPE,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12529 - Extractor/src/plugins,
gnunet <=