gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r2784 - in GNUnet/src: include util


From: grothoff
Subject: [GNUnet-SVN] r2784 - in GNUnet/src: include util
Date: Sat, 13 May 2006 13:21:51 -0700 (PDT)

Author: grothoff
Date: 2006-05-13 13:21:48 -0700 (Sat, 13 May 2006)
New Revision: 2784

Modified:
   GNUnet/src/include/gnunet_util.h
   GNUnet/src/util/osconfig.c
Log:
const

Modified: GNUnet/src/include/gnunet_util.h
===================================================================
--- GNUnet/src/include/gnunet_util.h    2006-05-13 19:14:33 UTC (rev 2783)
+++ GNUnet/src/include/gnunet_util.h    2006-05-13 20:21:48 UTC (rev 2784)
@@ -2529,7 +2529,9 @@
  * @param groupname name of the group to use
  * @return 0 on success
  */
-int autostartService(int doAutoStart, char *username, char *groupname);
+int autostartService(int doAutoStart, 
+                    const char *username, 
+                    const char *groupname);
 
 /**
  * @brief Checks if we can add an user for the GNUnet service
@@ -2551,12 +2553,13 @@
  * @param name the name of the new user
  * @return 0 on success
  */
-int createGroupUser(char *group_name, char *user_name);
+int createGroupUser(const char *group_name, 
+                   const char *user_name);
 
 /**
  * @brief Format a Windows specific error code
  */
-char *winErrorStr(char *prefix, int dwErr);
+char *winErrorStr(const char *prefix, int dwErr);
 
 /**
  * Checks if gnunetd is running

Modified: GNUnet/src/util/osconfig.c
===================================================================
--- GNUnet/src/util/osconfig.c  2006-05-13 19:14:33 UTC (rev 2783)
+++ GNUnet/src/util/osconfig.c  2006-05-13 20:21:48 UTC (rev 2784)
@@ -114,7 +114,9 @@
  * @param groupname name of the group to use
  * @return 0 on success
  */
-int autostartService(int doAutoStart, char *username, char *groupname) {
+int autostartService(int doAutoStart, 
+                    const char * username, 
+                    const char * groupname) {
 #ifdef WINDOWS
   if (doAutoStart)
     {
@@ -328,10 +330,12 @@
  * @param name the name of the new user
  * @return 0 on success
  */
-int createGroupUser(char *group_name, char *user_name) {
+int createGroupUser(const char *group_name, 
+                   const char *user_name) {
        int haveGroup;
 
-       if (!user_name || !strlen(user_name))
+       if ( (user_name == NULL) ||
+            (0 == strlen(user_name)) ) 
                return 0;
        
 #ifdef WINDOWS
@@ -369,7 +373,7 @@
        return 0;
 }
 
-char *winErrorStr(char *prefix, int dwErr)
+char *winErrorStr(const char *prefix, int dwErr)
 {
 #ifdef WINDOWS
        char *err, *ret;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]