diff options
author | wm4 <wm4@nowhere> | 2015-07-10 12:45:49 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-10 12:45:49 +0200 |
commit | 4c04f74a506d6bddca413a0cf2ea0fb77050b022 (patch) | |
tree | d4ae96b2954918a9c4e1ab5876b5d3ee0a5a42a5 /stream | |
parent | 707fe102b610d1f1aa547109bc7fac80757e14b9 (diff) | |
download | mpv-4c04f74a506d6bddca413a0cf2ea0fb77050b022.tar.bz2 mpv-4c04f74a506d6bddca413a0cf2ea0fb77050b022.tar.xz |
stream_file: cosmetics: shorten variable name
Can't be bothered to type this much.
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_file.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c index 54a848e4c8..8228cdbc81 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -230,11 +230,11 @@ static bool check_stream_network(int fd) static int open_f(stream_t *stream) { int fd; - struct priv *priv = talloc_ptrtype(stream, priv); - *priv = (struct priv) { + struct priv *p = talloc_ptrtype(stream, p); + *p = (struct priv) { .fd = -1 }; - stream->priv = priv; + stream->priv = p; stream->type = STREAMTYPE_FILE; bool write = stream->mode == STREAM_WRITE; @@ -254,8 +254,8 @@ static int open_f(stream_t *stream) MP_ERR(stream, "Invalid FD: %s\n", stream->url); return STREAM_ERROR; } - priv->fd = fd; - priv->close = false; + p->fd = fd; + p->close = false; } else if (!strcmp(filename, "-")) { if (!write) { MP_INFO(stream, "Reading from stdin...\n"); @@ -267,8 +267,8 @@ static int open_f(stream_t *stream) #ifdef __MINGW32__ setmode(fd, O_BINARY); #endif - priv->fd = fd; - priv->close = false; + p->fd = fd; + p->close = false; } else { mode_t openmode = S_IRUSR | S_IWUSR; #ifndef __MINGW32__ @@ -291,15 +291,15 @@ static int open_f(stream_t *stream) } #ifndef __MINGW32__ if (S_ISREG(st.st_mode)) { - priv->regular = true; + p->regular = true; // O_NONBLOCK has weird semantics on file locks; remove it. int val = fcntl(fd, F_GETFL) & ~(unsigned)O_NONBLOCK; fcntl(fd, F_SETFL, val); } #endif } - priv->fd = fd; - priv->close = true; + p->fd = fd; + p->close = true; } off_t len = lseek(fd, 0, SEEK_END); |