]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libwbclient: fix wbcResolveWinsByName() to take char * instead of const char **
authorMichael Adam <obnox@samba.org>
Sun, 20 Apr 2008 20:13:40 +0000 (22:13 +0200)
committerMichael Adam <obnox@samba.org>
Sun, 20 Apr 2008 20:29:36 +0000 (22:29 +0200)
This fixes a compile warning and seems the correct thing to me as
the returned data is talloc_strdup't, so not const anyways.

Michael

source/nsswitch/libwbclient/wbc_util.c
source/nsswitch/libwbclient/wbclient.h
source/nsswitch/wbinfo.c

index d7af4d1bf2cebc773e00336eecca40c7eaccabe0..69cad380dadaf2724ade7ffa1d0e57122bcd2a94 100644 (file)
@@ -197,12 +197,12 @@ wbcErr wbcDomainInfo(const char *domain, struct wbcDomainInfo **dinfo)
  * @return #wbcErr
  *
  **/
-wbcErr wbcResolveWinsByName(const char *name, const char **ip)
+wbcErr wbcResolveWinsByName(const char *name, char **ip)
 {
        struct winbindd_request request;
        struct winbindd_response response;
        wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-       const char *ipaddr;
+       char *ipaddr;
 
        ZERO_STRUCT(request);
        ZERO_STRUCT(response);
index 05cee9ab2b926f09bc58f133143ce732a6678191..a444c91da4b2353fd1c61792bfb79e6001789e49 100644 (file)
@@ -425,7 +425,7 @@ wbcErr wbcAuthenticateUserEx(const struct wbcAuthUserParams *params,
 /*
  * Resolve functions
  */
-wbcErr wbcResolveWinsByName(const char *name, const char **ip);
+wbcErr wbcResolveWinsByName(const char *name, char **ip);
 wbcErr wbcResolveWinsByIP(const char *ip, const char **name);
 
 /*
index ed49be74316501ba11902c2173100eb646e40c24..00d772a74c225297525de91ee40f2e1818435701 100644 (file)
@@ -300,7 +300,7 @@ static bool wbinfo_get_userdomgroups(const char *user_sid_str)
 static bool wbinfo_wins_byname(const char *name)
 {
        wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-       const char *ip = NULL;
+       char *ip = NULL;
 
        wbc_status = wbcResolveWinsByName(name, &ip);
        if (!WBC_ERROR_IS_OK(wbc_status)) {