diff options
author | Andrew Tridgell <tridge@samba.org> | 1999-12-13 13:27:58 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1999-12-13 13:27:58 +0000 |
commit | 453a822a76780063dff23526c35408866d0c0154 (patch) | |
tree | 804feffcd5e60153e27d3ca2b007021e66e5bd0a /source/nmbd/nmbd_serverlistdb.c | |
parent | 054195df9b6187c663ede5cf4489499abbdc29fc (diff) | |
download | samba-453a822a76780063dff23526c35408866d0c0154.tar.gz samba-453a822a76780063dff23526c35408866d0c0154.tar.xz samba-453a822a76780063dff23526c35408866d0c0154.zip |
first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
Diffstat (limited to 'source/nmbd/nmbd_serverlistdb.c')
-rw-r--r-- | source/nmbd/nmbd_serverlistdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/nmbd/nmbd_serverlistdb.c b/source/nmbd/nmbd_serverlistdb.c index d30e8da64ce..41009bc68f0 100644 --- a/source/nmbd/nmbd_serverlistdb.c +++ b/source/nmbd/nmbd_serverlistdb.c @@ -156,7 +156,7 @@ workgroup %s. This is a bug.\n", name, work->work_group)); return NULL; } - bzero((char *)servrec,sizeof(*servrec)); + memset((char *)servrec,'\0',sizeof(*servrec)); servrec->subnet = work->subnet; @@ -399,7 +399,8 @@ void write_browse_list(time_t t, BOOL force_write) slprintf(tmp, sizeof(tmp)-1, "\"%s\"", my_netbios_names[i]); fprintf(fp, "%-25s ", tmp); fprintf(fp, "%08x ", stype); - slprintf(tmp, sizeof(tmp)-1, "\"%s\" ", lp_serverstring()); + slprintf(tmp, sizeof(tmp)-1, "\"%s\" ", + string_truncate(lp_serverstring(), MAX_SERVER_STRING_LENGTH)); fprintf(fp, "%-30s", tmp); fprintf(fp, "\"%s\"\n", global_myworkgroup); } |