summaryrefslogtreecommitdiffstats
path: root/stream/stream_smb.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 02:26:13 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 02:34:35 +0300
commit0eb321bf2c1cc0e048faff26a01f86cdd3ec254f (patch)
tree71cb9bd9ed121156d3382066c0722c73189afe04 /stream/stream_smb.c
parent6d908205fbadbdf7ccdc6c5e0eb918f0b43f16e0 (diff)
downloadmpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.bz2
mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.xz
Remove trailing whitespace from most files
Diffstat (limited to 'stream/stream_smb.c')
-rw-r--r--stream/stream_smb.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/stream/stream_smb.c b/stream/stream_smb.c
index 0c6fcac923..f1b11f8d9b 100644
--- a/stream/stream_smb.c
+++ b/stream/stream_smb.c
@@ -35,23 +35,23 @@ static void smb_auth_fn(const char *server, const char *share,
char *password, int pwmaxlen)
{
char temp[128];
-
- strcpy(temp, "LAN");
+
+ strcpy(temp, "LAN");
if (temp[strlen(temp) - 1] == 0x0a)
temp[strlen(temp) - 1] = 0x00;
-
+
if (temp[0]) strncpy(workgroup, temp, wgmaxlen - 1);
-
- strcpy(temp, smb_username);
+
+ strcpy(temp, smb_username);
if (temp[strlen(temp) - 1] == 0x0a)
temp[strlen(temp) - 1] = 0x00;
-
+
if (temp[0]) strncpy(username, temp, unmaxlen - 1);
-
- strcpy(temp, smb_password);
+
+ strcpy(temp, smb_password);
if (temp[strlen(temp) - 1] == 0x0a)
temp[strlen(temp) - 1] = 0x00;
-
+
if (temp[0]) strncpy(password, temp, pwmaxlen - 1);
}
@@ -98,9 +98,9 @@ static int open_f (stream_t *stream, int mode, void *opts, int* file_format) {
mode_t m = 0;
off_t len;
int fd, err;
-
+
filename = stream->url;
-
+
if(mode == STREAM_READ)
m = O_RDONLY;
else if (mode == STREAM_WRITE) //who's gonna do that ?
@@ -110,27 +110,27 @@ static int open_f (stream_t *stream, int mode, void *opts, int* file_format) {
m_struct_free (&stream_opts, opts);
return STREAM_UNSUPPORTED;
}
-
+
if(!filename) {
mp_msg(MSGT_OPEN,MSGL_ERR, "[smb] Bad url\n");
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
-
+
err = smbc_init(smb_auth_fn, 1);
if (err < 0) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Cannot init the libsmbclient library: %d\n",err);
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
-
+
fd = smbc_open(filename, m,0644);
- if (fd < 0) {
+ if (fd < 0) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Could not open from LAN: '%s'\n", filename);
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
-
+
stream->flags = mode;
len = 0;
if(mode == STREAM_READ) {
@@ -148,7 +148,7 @@ static int open_f (stream_t *stream, int mode, void *opts, int* file_format) {
stream->write_buffer = write_buffer;
stream->close = close_f;
stream->control = control;
-
+
m_struct_free(&stream_opts, opts);
return STREAM_OK;
}