[hipl-commit] [trunk] Rev 4411: Mark functions only used within their files as static.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Mon, 26 Apr 2010 21:15:19 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 26/04/2010 at 21:15:19
Revision: 4411
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Mark functions only used within their files as static.

Modified:
  M  test/demo/stdinclient.c
  M  test/demo/stdinserver.c
  M  test/performance/cookiesolver.c

=== modified file 'test/demo/stdinclient.c'
--- test/demo/stdinclient.c     2010-03-19 09:00:54 +0000
+++ test/demo/stdinclient.c     2010-04-26 18:15:03 +0000
@@ -17,7 +17,7 @@
 #include <sys/time.h>
 #include <time.h>
 
-int create_socket(int proto) {
+static int create_socket(int proto) {
   int fd;
 
   if (proto == IPPROTO_TCP) {

=== modified file 'test/demo/stdinserver.c'
--- test/demo/stdinserver.c     2010-03-19 09:00:54 +0000
+++ test/demo/stdinserver.c     2010-04-26 18:15:03 +0000
@@ -17,7 +17,7 @@
 #include <sys/time.h>
 #include <time.h>
 
-int create_serversocket(int proto, int port) {
+static int create_serversocket(int proto, int port) {
   int fd;
   struct sockaddr_in6 addr;
 

=== modified file 'test/performance/cookiesolver.c'
--- test/performance/cookiesolver.c     2010-04-21 16:08:58 +0000
+++ test/performance/cookiesolver.c     2010-04-26 18:15:03 +0000
@@ -36,7 +36,7 @@
 } __attribute__ ((packed));
 
 
-uint64_t calculate_digest(unsigned char *data, const uint64_t j)
+static uint64_t calculate_digest(unsigned char *data, const uint64_t j)
 {
         unsigned char buf[SHA_DIGEST_LENGTH]; // openssl
         uint64_t result = 0;
@@ -57,8 +57,9 @@
  * errors
 */
 /* Unportable code ? */
-int solve_puzzle(struct hip_birthday_cookie *cookie, const struct in6_addr 
*initiator,
-                 const struct in6_addr *responder)
+static int solve_puzzle(struct hip_birthday_cookie *cookie,
+                        const struct in6_addr *initiator,
+                        const struct in6_addr *responder)
 {
     uint64_t challenge_resp = 0;
     uint64_t randval = 0; /* j */

Other related posts:

  • » [hipl-commit] [trunk] Rev 4411: Mark functions only used within their files as static. - Diego Biurrun