- Use FUNCTION_MACRO, not __FUNCTION__.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 22 Mar 2003 23:25:44 +0000 (23:25 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 22 Mar 2003 23:25:44 +0000 (23:25 +0000)
- Add some const
(This used to be commit e149e70717f38e082ce35d55f9b4d84ba8419af7)

source3/lib/getsmbpass.c
source3/lib/util.c
source3/sam/gumm_tdb.c

index c271d554047c6d172aec700cc1b3a0bf08aad2e3..b6ae09b3181fd0ecc38076d0f1ec818d754b2390 100644 (file)
@@ -83,7 +83,7 @@ static int tcsetattr(int fd, int flags, struct sgttyb *t)
 static struct termios t;
 #endif /* SYSV_TERMIO */
 
-char *getsmbpass(char *prompt)
+char *getsmbpass(const char *prompt)
 {
   FILE *in, *out;
   int echo_off;
index 4f564b332a097bd4f487c637fe6faf6fd18b8530..b67896c648a80b156bc3bb3d40809d43096846b4 100644 (file)
@@ -1040,7 +1040,7 @@ BOOL get_mydomname(fstring my_domname)
  Interpret a protocol description string, with a default.
 ****************************************************************************/
 
-int interpret_protocol(char *str,int def)
+int interpret_protocol(const char *str,int def)
 {
        if (strequal(str,"NT1"))
                return(PROTOCOL_NT1);
index 53ea872a11a934f79fa2030530708f01cb362764..5e390490cf07fc9034926c42b76b139f127af9f5 100644 (file)
@@ -38,8 +38,8 @@ static int tdbgumm_debug_level = DBGC_ALL;
 
 #define TDB_FORMAT_STRING      "ddB"
 
-#define TALLOC_CHECK(ptr, err, label) do { if ((ptr) == NULL) { DEBUG(0, ("%s: Out of memory!\n", __FUNCTION__)); err = NT_STATUS_NO_MEMORY; goto label; } } while(0)
-#define SET_OR_FAIL(func, label) do { if (NT_STATUS_IS_ERR(func)) { DEBUG(0, ("%s: Setting gums object data failed!\n", __FUNCTION__)); goto label; } } while(0)
+#define TALLOC_CHECK(ptr, err, label) do { if ((ptr) == NULL) { DEBUG(0, ("%s: Out of memory!\n", FUNCTION_MACRO)); err = NT_STATUS_NO_MEMORY; goto label; } } while(0)
+#define SET_OR_FAIL(func, label) do { if (NT_STATUS_IS_ERR(func)) { DEBUG(0, ("%s: Setting gums object data failed!\n", FUNCTION_MACRO)); goto label; } } while(0)
 
 struct tdbsam2_enum_objs {
        uint32 type;