r5314: Some const, and an uninitialized variable fix.
authorVolker Lendecke <vlendec@samba.org>
Thu, 10 Feb 2005 13:36:18 +0000 (13:36 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:55:37 +0000 (10:55 -0500)
Volker

source/nsswitch/winbind_nss_linux.c

index 0ea5db74da6e91d4d8bca08a7cc4b84437958ffd..d8d4f93676915ca4354036e1113f0eb525b7b16e 100644 (file)
@@ -62,7 +62,7 @@ static char *get_static(char **buffer, size_t *buflen, size_t len)
    lib/util_str.c as I really don't want to have to link in any other
    objects if I can possibly avoid it. */
 
-BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize)
+BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
 {
        char *s;
        BOOL quoted;
@@ -976,11 +976,11 @@ _nss_winbind_sidtoname(const char *sid, char **name, char *buffer,
        fprintf(stderr, "[%5d]: sidtoname %s\n", getpid(), sid);
 #endif
 
+       ZERO_STRUCT(response);
+       ZERO_STRUCT(request);
+
        /* we need to fetch the separator first time through */
        if (!sep_char) {
-               ZERO_STRUCT(response);
-               ZERO_STRUCT(request);
-
                ret = winbindd_request(WINBINDD_INFO, &request, &response);
                if (ret != NSS_STATUS_SUCCESS) {
                        *errnop = errno = EINVAL;