aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_uri.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
commit7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch)
treebdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/fs/fs_uri.c
parent01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff)
downloadgnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz
gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip
tighten formatting rules
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r--src/fs/fs_uri.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 7eb9f86b0..c1faf4f12 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -265,6 +265,7 @@ percent_decode_keyword (const char *in, char **emsg)
265 return ret; 265 return ret;
266} 266}
267 267
268
268#define GNUNET_FS_URI_KSK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX 269#define GNUNET_FS_URI_KSK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX
269 270
270/** 271/**
@@ -397,6 +398,7 @@ uri_sks_parse (const char *s, char **emsg)
397 return ret; 398 return ret;
398} 399}
399 400
401
400#define GNUNET_FS_URI_CHK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX 402#define GNUNET_FS_URI_CHK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX
401 403
402 404
@@ -1679,6 +1681,8 @@ get_keywords_from_tokens (const char *s, char **array, int index)
1679 GNUNET_free (ss); 1681 GNUNET_free (ss);
1680 return seps; 1682 return seps;
1681} 1683}
1684
1685
1682#undef TOKENS 1686#undef TOKENS
1683 1687
1684 1688
@@ -1719,8 +1723,7 @@ gather_uri_data (void *cls,
1719 * If given non-utf8 string it will, most likely, find it to be invalid, 1723 * If given non-utf8 string it will, most likely, find it to be invalid,
1720 * and will return the length of its valid part, skipping the keyword. 1724 * and will return the length of its valid part, skipping the keyword.
1721 * If it does - fix the extractor, not this check! 1725 * If it does - fix the extractor, not this check!
1722 */ 1726 */if (u8_strcount ((const uint8_t *) data) <= 2)
1723 if (u8_strcount ((const uint8_t *) data) <= 2)
1724 return 0; 1727 return 0;
1725 if ((EXTRACTOR_METATYPE_MIMETYPE == type) && 1728 if ((EXTRACTOR_METATYPE_MIMETYPE == type) &&
1726 (NULL != (sep = memchr (data, '/', data_len))) && (sep != data)) 1729 (NULL != (sep = memchr (data, '/', data_len))) && (sep != data))
@@ -2049,4 +2052,5 @@ GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri)
2049 } 2052 }
2050} 2053}
2051 2054
2055
2052/* end of fs_uri.c */ 2056/* end of fs_uri.c */