diff options
author | Jeremy Allison <jra@samba.org> | 2004-10-27 00:52:12 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2004-10-27 00:52:12 +0000 |
commit | 10d7fc1ca989240b4373e1020bc8466211c63dfa (patch) | |
tree | 295289ffa65a2c5c64e164d463dff84364bcb68d /source/client/smbspool.c | |
parent | c3f3ea812c3b5dd8c04f340e85f6815e2ac8dfda (diff) | |
download | samba-10d7fc1ca989240b4373e1020bc8466211c63dfa.tar.gz samba-10d7fc1ca989240b4373e1020bc8466211c63dfa.tar.xz samba-10d7fc1ca989240b4373e1020bc8466211c63dfa.zip |
r3275: Fix from Michael Sweet <mike@easysw.com> for bug #1892.
Jeremy.
Diffstat (limited to 'source/client/smbspool.c')
-rw-r--r-- | source/client/smbspool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/client/smbspool.c b/source/client/smbspool.c index a67ccadb90b..f838c5de5bf 100644 --- a/source/client/smbspool.c +++ b/source/client/smbspool.c @@ -118,13 +118,13 @@ static int smb_print(struct cli_state *, char *, FILE *); * Find the URI... */ - if (strncmp(argv[0], "smb://", 6) == 0) - strncpy(uri, argv[0], sizeof(uri) - 1); - else if (getenv("DEVICE_URI") != NULL) + if (getenv("DEVICE_URI") != NULL) strncpy(uri, getenv("DEVICE_URI"), sizeof(uri) - 1); + else if (strncmp(argv[0], "smb://", 6) == 0) + strncpy(uri, argv[0], sizeof(uri) - 1); else { - fputs("ERROR: No device URI found in argv[0] or DEVICE_URI environment variable!\n", stderr); + fputs("ERROR: No device URI found in DEVICE_URI environment variable or argv[0] !\n", stderr); return (1); } |